Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!pyramid!ut-sally!seismo!cmcl2!lanl!jp From: jp@lanl.ARPA Newsgroups: net.math Subject: Re: moRe: Conic sections (new problem) Message-ID: <613@lanl.ARPA> Date: Sun, 2-Feb-86 00:54:37 EST Article-I.D.: lanl.613 Posted: Sun Feb 2 00:54:37 1986 Date-Received: Mon, 3-Feb-86 05:13:43 EST References: <1165@homxb.UUCP> <557@well.UUCP> <532@well.UUCP> <11591@ucbvax.BERKELEY.EDU> <660@eagle.ukc.ac.uk> Reply-To: jp@a.UUCP (James Potter) Organization: Los Alamos National Laboratory Lines: 28 I am not sure why you care about the rotation of a circle, but I have implemented an algorithm for plotting circles and ellipses with arbitrary starting angles. A good way to see how to do this is to look at the matrix equations: x(theta) -x_c cos(theta) e sin(theta) | r cos(phi) = | | y(theta) - y_c | e^-1 sin(theta) cos(theta) | r sin(phi) This yields essentiall parametric equations for the circle (e=1) or ellipse whose major axis (if e > 1) makes an angle phi with the x axis. I choose a small value for theta and by successive multiplications plot out a circle. If theta =360/1000 there will be 1000 points on the circle/ ellipse. I make the size of the angle inversely proportional to r to keep a reasonable point density. If the rotation matrix has sufficiently accurate values for the trig functions and multiplication is reasonably precise the figure will hold together for angles much larger than 360 degrees. As a test a made a 1000 point circle and went around it 10 times, that's 10000 multiplications and the end point was within 1 half pixel (actually better - I just don't remember how close) on a 4096 X 3072 display. Oh,yes the calculations were done with an 80287 math coprocessor. Don't really know if this is in anyway related to your problem and it's not a very highbrow math problem, but maybe someone is interested. Jim Potter jp@lanl.arpa