Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Aug 2002
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Internet Explorer Graphing in the (+,+) Plane

    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!
    Attached Files Attached Files
    Last edited by rsci; 12-27-2002 at 06:38 PM.

  • #2
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    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

  • #3
    New Coder
    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".

  • #4
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    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...

  • #5
    New Coder
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •