...

Graphing in the (+,+) Plane

rsci
12-27-2002, 06:05 PM
The attached was developed in IE 6. It will likely work in IE 5 but not Netscape, sorry.

J-Graph will plot a formula(function), solving for x, in the +,+ coordinate plane. (My terminology may be off, its been a while since my last math class.)

Max X and Max Y are the limits of the functions.
Dot Color is the color of the plotted points.
Axis Color is the color of the axis.
Detail is the number of plots (resolution) of the line. The higher the detail, the sharper the line, the longer it takes to plot.
Magnification allows you to zoom in and see more detail. The higher the magnification, the more detail you see, the longer it takes to plot.
Graph Lines is the interval at which to place lines on the graph. Zero results in no lines.
Graph Color allows you to change the colors of the x and y Graph Lines.

The function must be regraphed to view any change in the above parameters.

Although there are two functions only one can viewed at a time. Sample functions are provided so the format can be viewed. The functions are written in/with javascript parameters.

The "Show Math Functions" at the bottom of the page will provide a list of javascript math properties and methods.

Planned Updates:
Ability to mouseover a plotted point and display the coordinates.
Print the graph with the parameters.
Label the Graph Lines

Thoughts, suggestions, and changes welcome.

Enjoy!

jkd
12-27-2002, 06:57 PM
Quadrant 1 in the Cartesian plane.

I wrote one in SVG that works a little more like a graphing calculator (i.e. allows you to change the viewing window settings to any arbitrary plane), and also does polar coordinates and parametric equations. Used to do conics too, and will again when I stop being lazy. It's somewhere in this forum...

www.jasonkarldavis.com/scripts/grapher/grapher.xml

rsci
12-27-2002, 07:16 PM
I believe you had actually replied to one of my posts in the programming forum.

Unfortunately I don't have the SVG plugin and I wanted to see if it was possible to construct a graphing program with regular JS.

It would be possible to change (show multiple) planes with this program if the graph was 'shifted'. The current design uses a pixel reference to place the plots. Creating negative points that refrenced positive points(pixels) would allow other planes to be shown.

I guess this would be called a "proof of concept".

jkd
12-27-2002, 07:31 PM
Originally posted by rsci
Unfortunately I don't have the SVG plugin and I wanted to see if it was possible to construct a graphing program with regular JS.

You mean HTML. I use nothing but Javascript to construct path data. I then apply the path data to an SVG <path/> element. But it is still Javascript at work. :)

Just curious, is there any reason this is IE-only? Moving pixels around is very easily accomplished cross-browser...

rsci
12-27-2002, 07:42 PM
IE only for simplicity. It would be very easy to port over to Netscape... Switch a div here and there, change the iframe, etc.

There is really nothing 'tricky' about the program.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum