|
-
Mar 5th, 2001, 02:43 AM
#1
Thread Starter
New Member
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])
-
Mar 5th, 2001, 01:02 PM
#2
transcendental analytic
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|