Author |
Message |
cycro1234
|
Posted: Sat Oct 30, 2004 8:35 pm Post subject: x^2/a^2 + y^2/b^2 = 1 |
|
|
What do I do with it though??? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
bugzpodder
|
Posted: Sat Oct 30, 2004 8:46 pm Post subject: (No subject) |
|
|
what do you want to do with it? |
|
|
|
|
|
cycro1234
|
Posted: Sat Oct 30, 2004 9:59 pm Post subject: (No subject) |
|
|
make a ball travel in an arc |
|
|
|
|
|
AsianSensation
|
Posted: Sun Oct 31, 2004 5:36 pm Post subject: (No subject) |
|
|
well, you can substitute a value for x, and then it spits out a value for y, and then use the x and y values to draw your thingie, and it will follow an elliptical path. |
|
|
|
|
|
bugzpodder
|
Posted: Sun Oct 31, 2004 7:38 pm Post subject: (No subject) |
|
|
the parametric equation for an ellipse is:
x=acos(t)
y=bsin(t)
just plug in your angle
(or if you want it the other way...
x=asin(t)
y=bcos(t)
) |
|
|
|
|
|
wtd
|
Posted: Sun Oct 31, 2004 11:14 pm Post subject: (No subject) |
|
|
I would recommend breaking this down into a data structure and a number of associated functions and procedures.
code: | type Point : record
x, y : int
end record
type Arc : record
center : Point
radius : int
end record
function makeArc(x, y, radius : int) : Arc
var a : Arc
a.center.x := x
a.center.y := y
a.radius := radius
result a
end makeArc
function pointOnArcAtAngle(a : Arc; angle : int) : Point
var p : Point
p.x := a.radius * sin(angle) + a.center.x
p.y := a.radius * cos(angle) + a.center.y
result p
end pointOnArcAtAngle |
|
|
|
|
|
|
cycro1234
|
Posted: Tue Nov 02, 2004 1:25 pm Post subject: Un huh |
|
|
AsianSensation, u mentione to substitute a value for x, nd it will spit out a valur for y. What about a and b??? Or will the answer be in terms of a and b? |
|
|
|
|
|
bugzpodder
|
Posted: Tue Nov 02, 2004 1:44 pm Post subject: (No subject) |
|
|
of course the answer will be in terms of a and b |
|
|
|
|
|
Sponsor Sponsor
|
|
|
cycro1234
|
Posted: Tue Nov 02, 2004 6:29 pm Post subject: ok... |
|
|
Alright, but then wat exactly are the variables a and b?? Are they the angle of the circle? |
|
|
|
|
|
AsianSensation
|
Posted: Tue Nov 02, 2004 8:08 pm Post subject: (No subject) |
|
|
no, they are just some constant, where 2a is the length of the major axis, and the 2b is the length of the minor axis of an ellipse. I suggest searching some math sites, or you'll be learning about ellipses in Gr. 11 math. |
|
|
|
|
|
templest
|
|
|
|
|
rizzix
|
Posted: Wed Nov 03, 2004 4:35 pm Post subject: (No subject) |
|
|
ah yea.. nice stuff.. |
|
|
|
|
|
cycro1234
|
Posted: Wed Nov 03, 2004 7:27 pm Post subject: hehehe |
|
|
dam straight! |
|
|
|
|
|
|