POV-Ray : Newsgroups : povray.advanced-users : Tangent to two ellipses? : Re: Tangent to two ellipses? Server Time
1 Jul 2024 05:47:29 EDT (-0400)
  Re: Tangent to two ellipses?  
From: Tim Cook
Date: 28 Oct 2010 19:06:56
Message: <4cca0210$1@news.povray.org>
A bit of research and fiddling later, I now have a simpler method for 
calculating the angle of tangency for a given point on an ellipse that 
doesn't even involve math beyond basic trig or terribly long equations. 
  It turns out that you can use the fact that an ellipse is just a 
squashed circle to do some indirect figuring.

Given unrotated ellipse at <x,y> with radii <a,b> and an angle T:

Point P <c,d> on ellipse is <a*cos(T)+x,b*sin(T)+y>

Tangent angle at P is:
If major axis is along x, atan2(d,a/cos(T)-c)
If major axis is along y, atan2(b/cos(90-T)-d,c)

That's it.

Now all I need to do is find at what angles for two ellipses the 
equations for the lines are the same.

-- 
Tim Cook


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.