This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

Duta
Duta presents ...

2012/3/4

Grapher

To scroll around, click and drag the mouse, or use the arrow keys.

y = tan(x) graphs draw the asymptotes - if this is unwanted I'll make it so this does not happen.

Currently this does not support zooming, so the program treats 1 pixel as 1 unit for the moment.

Also (I'm not sure if/how I'll change this) to create your own graphs you have to download the scenario and do it in Greenfoot. For notes on how to do this, continue reading.

README:
How to add a graph:
(1)Create a sub-class of Graph.class (see below).
(2)Add it in to the graphs[] array on line 15 of Pad.class.

Format for a sub-class of Graph.class:
import greenfoot.*;
public class <name> extends Graph
{
public <name>()
{
formula = "y = <the formula>";
}

protected double getY(double x)
{
return <Your formula in code form>;
}
}

Making getY(double x) - an example:
For the formula "y = 3x^4"
protected double getY(double x)
{
return 3*Math.pow(x, 4);
}

3400 views / 15 in the last 7 days

Tags: mouse game simulation physics demo uaslp math korea graph graphs

open in greenfoot
Your browser does not support the canvas tag.
A new version of this scenario was uploaded on Sun Mar 04 00:36:01 UTC 2012 Precision and ease of use update
A new version of this scenario was uploaded on Sun Mar 04 00:38:43 UTC 2012 Precision and ease of use update
DutaDuta

2012/3/4

Oops. double update >.<
DutaDuta

2012/3/4

My personal favourite is y = 300sin(x/250)
A new version of this scenario was uploaded on Sun Mar 04 13:20:35 UTC 2012 Slight performance update and a minor bug fix
A new version of this scenario was uploaded on Sun Mar 04 13:24:21 UTC 2012 Slight performance update and a minor bug fix
A new version of this scenario was uploaded on Sun Mar 04 14:44:10 UTC 2012 Bug fix. I think that's all of them

Want to leave a comment? You must first log in.

Who likes this?

No votes yet.