eloisamay
Mar 5th, 2001, 01:43 AM
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:neosgirl@eudoramail.com)
kedaman
Mar 5th, 2001, 12:02 PM
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)