
-----------------------------------
cycro1234
Sat Oct 30, 2004 8:35 pm

x^2/a^2 + y^2/b^2 = 1
-----------------------------------
What do I do with it though???

-----------------------------------
bugzpodder
Sat Oct 30, 2004 8:46 pm


-----------------------------------
what do you want to do with it?

-----------------------------------
cycro1234
Sat Oct 30, 2004 9:59 pm


-----------------------------------
make a ball travel in an arc

-----------------------------------
AsianSensation
Sun Oct 31, 2004 5:36 pm


-----------------------------------
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
Sun Oct 31, 2004 7:38 pm


-----------------------------------
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
Sun Oct 31, 2004 11:14 pm


-----------------------------------
I would recommend breaking this down into a data structure and a number of associated functions and procedures.

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
Tue Nov 02, 2004 1:25 pm

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
Tue Nov 02, 2004 1:44 pm


-----------------------------------
of course the answer will be in terms of a and b

-----------------------------------
cycro1234
Tue Nov 02, 2004 6:29 pm

ok...
-----------------------------------
Alright, but then wat exactly are the variables a and b?? Are they the angle of the circle?

-----------------------------------
AsianSensation
Tue Nov 02, 2004 8:08 pm


-----------------------------------
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
Wed Nov 03, 2004 1:41 pm


-----------------------------------
All girls take time and money
Girls = Time x Money
"Time is money" =>
Time = Money
Girls = Money x Money
Girls = Money^2
"Money is the root of all evil" = >
Evil = the square root of money
Girls = (Evil)^1/2 (Evil)^1/2 =>
Girls = Evil

:rofl: You get hundred bits now! http://bbs.pearl-jam.net/images/smilies/chinese.gif Good stuff. :lol:

-----------------------------------
rizzix
Wed Nov 03, 2004 4:35 pm


-----------------------------------
ah yea.. nice stuff..  :lol:

-----------------------------------
cycro1234
Wed Nov 03, 2004 7:27 pm

hehehe
-----------------------------------
dam straight!
