Enjoy an ad free experience by logging in. Not a member yet? Register.


Results 1 to 5 of 5
Thread: Graphing in the (+,+) Plane

12272002, 06:05 PM #1
 Join Date
 Aug 2002
 Posts
 70
 Thanks
 0
 Thanked 0 Times in 0 Posts
Graphing in the (+,+) Plane
The attached was developed in IE 6. It will likely work in IE 5 but not Netscape, sorry.
JGraph 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!Last edited by rsci; 12272002 at 06:38 PM.
12272002, 06:57 PM
#2
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...
http://www.jasonkarldavis.com/script...er/grapher.xml
12272002, 07:16 PM
#3
 Join Date
 Aug 2002
 Posts
 70
 Thanks
 0
 Thanked 0 Times in 0 Posts
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".
12272002, 07:31 PM
#4
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.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.
Just curious, is there any reason this is IEonly? Moving pixels around is very easily accomplished crossbrowser...
12272002, 07:42 PM
#5
 Join Date
 Aug 2002
 Posts
 70
 Thanks
 0
 Thanked 0 Times in 0 Posts
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.