## Re: [Algorithms] elliptical arc parameterization

 Re: [Algorithms] elliptical arc parameterization From: Federico Pernici - 2001-08-18 17:04:36 Attachments: Message as HTML ``` Arcot Preetham wrote: > > > Without loss of generality, lets assume the simplest ellipse equation. > > x = a * cos(theta), y = b * sin(theta). > > You can find theta by > theta = atan2(y/b, x/a) > > You can therefore calculate theta_P and theta_Q for points P and Q. > Now, theta_t = (1-t)*theta_P + t*theta_Q, t = [0,1] Thank you very much!! It works! But now another pb arise.... How to select (always) the clockwise arc from P to Q ? FEd ```

 RE: [Algorithms] elliptical arc parameterization From: Arcot Preetham - 2001-08-16 19:37:56 Attachments: Message as HTML ```Without loss of generality, lets assume the simplest ellipse equation. x = a * cos(theta), y = b * sin(theta). You can find theta by theta = atan2(y/b, x/a) You can therefore calculate theta_P and theta_Q for points P and Q. Now, theta_t = (1-t)*theta_P + t*theta_Q, t = [0,1] Preetham -----Original Message----- From: Federico Pernici [mailto:pernici@...] Sent: Thursday, August 16, 2001 12:18 PM To: gdalgorithms-list@... Subject: Re: [Algorithms] elliptical arc parameterization Ok but how to calculate the variation of t ? I need to know the parameter for an arc of ellipse. From 0 to 2pi is all the ellipse i want an arc from P to Q. BYe. _______________________________________________ GDAlgorithms-list mailing list GDAlgorithms-list@... http://lists.sourceforge.net/lists/listinfo/gdalgorithms-list ```
 RE: [Algorithms] elliptical arc parameterization From: Arcot Preetham - 2001-08-20 17:29:00 Attachments: Message as HTML ```If clockwise corresponds to decreasing theta (the case when +x axis is to the right and +y axis is up), then do the following. if (theta_P < theta_Q) theta_P += 2*pi. This should make sure theta_P is always greater than theta_Q. Hence as t increases, theta decreases => clockwise direction. Preetham -----Original Message----- From: Federico Pernici [mailto:pernici@...] Sent: Saturday, August 18, 2001 10:13 AM To: gdalgorithms-list@... Subject: Re: [Algorithms] elliptical arc parameterization Arcot Preetham wrote: Without loss of generality, lets assume the simplest ellipse equation. x = a * cos(theta), y = b * sin(theta). You can find theta by theta = atan2(y/b, x/a) You can therefore calculate theta_P and theta_Q for points P and Q. Now, theta_t = (1-t)*theta_P + t*theta_Q, t = [0,1] Thank you very much!! It works! But now another pb arise.... How to select (always) the clockwise arc from P to Q ? FEd ```
 Re: [Algorithms] elliptical arc parameterization From: Federico Pernici - 2001-08-18 17:04:36 Attachments: Message as HTML ``` Arcot Preetham wrote: > > > Without loss of generality, lets assume the simplest ellipse equation. > > x = a * cos(theta), y = b * sin(theta). > > You can find theta by > theta = atan2(y/b, x/a) > > You can therefore calculate theta_P and theta_Q for points P and Q. > Now, theta_t = (1-t)*theta_P + t*theta_Q, t = [0,1] Thank you very much!! It works! But now another pb arise.... How to select (always) the clockwise arc from P to Q ? FEd ```