Git Product home page Git Product logo

point-plotter's Introduction

point-plotter

Plots displayed by point-plotter

Input prompts for point-plotter players

Blank-Canvas program which plots a set of random points on a graph. Two players are then each asked to write an inequality function so as to try and cover as many points on the graph as possible.

runghc point-plotter.hs to run, and CTRL+C to quit.

example expressions:

  • y <= [(2,3),(0.5,2)] is like y <= 2x^3 + (0.5)x^2
  • y >= [(-0.1,0)] is like y >= (-0.1)

helpful tip:

If you're using polynomials of degree > 1, make your coefficients small --- they are plotted on a 600x600 graph, so even x^2 goes off the charts fairly quickly.

tested on an Ubuntu 14.04 virtualbox under Vagrant.

requires

a rough to-do list

  • Plot chart setup function
  • Function to complete box after function to be filled in
  • Generate random numbers within range
  • Function to plot random points on graph
  • Function to change color of dot if within plot
  • Function to check status of MVar for user input
  • Data types for simple-parse polynomial expressions
  • Function to prompt for user equation
  • Display values of lines on plot
  • Break into server/client threads
  • Data type and parser for better representation of polynomials
  • ~~ Applicative/Monadic point, as in class example~~

point-plotter's People

Contributors

caseyjackmiles avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.