Results 1 to 2 of 2

Thread: program:parabola w/ its tangent line

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2001
    Location
    philippines
    Posts
    4

    Question

    pls help me create a prgram that will draw a parabola and its tangent line with any specified point. pls help me! i need it before march 8,2001. this will be our final project in our computer class. pls...............



    (e-mail code/answers to:[email protected])

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    y=offsetY+a*(x-offsetX)^2
    will be the cordinates of each dot in a parabola from x=scaleleft to scaleleft+scalewidth

    a tangent at Tx would be:
    k=Tx^3/3 (constant trough all x, that is no need to recaculate it)
    y=offsetY+TX*(x-offsetX)

    To draw them you set currentX to scaleleft, Currenty to first value evaluated by resp expression, then loop trough all x values to scaleleft+scalewidth, by specifying step you specify it's accuracy, and plot the graph using line method of the form or picturebox, as follows:
    line -(x,y)
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

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