SportMJW
August 29th, 2001, 12:03 PM
I'm trying to put an object in motion in an eliptical path on the VB screen. Any help would be greatly appreciated ASAP
Matt
Matt
|
Click to See Complete Forum and Search --> : DOES ANYONE KNOW how to program an ellipse? SportMJW August 29th, 2001, 12:03 PM I'm trying to put an object in motion in an eliptical path on the VB screen. Any help would be greatly appreciated ASAP Matt shree August 29th, 2001, 07:54 PM x*x/(a*a) + y*y/(b*b) = 1 or, y = + and - sqr(b*b*(1-x*x/(a*a)) vary x from one end of the major diameter to the other end, and calculate the two values of y. And then do whatever you like with the points of the ellipse. Note however that for serious applications, this method is not good for reasons of speed and uniformity. It gives you points that are densely located at one region than at the other. For better methods of getting the points of an ellipse, refer to the Mid-Point algorithm, available in any fundamental graphics book. codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |