Results 1 to 2 of 2

Thread: Graphing equations

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2004
    Posts
    10

    Graphing equations

    Hi,

    im in the middle of producing a program in which quadratic, cubic and even any polynomial graph can be sketched by entering the equation into a text box. However, i am clueless asto how to go about coding. Could you guys assist me with the code needed to produce a basic y = x^2 graph?

    thanks

  2. #2
    Lively Member Doddddy's Avatar
    Join Date
    Jul 2004
    Location
    Cluj-Napoca, Romania
    Posts
    109
    as you could posibly tell, it is impossible to calculate a perfect equation shape... and even if you could it would still not look perfect on screen (due to limited pixel system).

    so what you do is take some x values and calculate the y for them... then link those points you found with lines, so it looks like a graphic...


    i dont understand if you wanted to know that, or how to read the equation from a textbox, cause that is much harder... you need some kind of compiler of your own... a good start is to transform this kind of equation:
    Code:
    a+b-c*x+y/z
    into this kind:
    Code:
    +a+-b*cx/yz
    ... hope you understand what i mean...
    'nothin last forever even cold november rain

Posting Permissions

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



Click Here to Expand Forum to Full Width