POV-Ray : Newsgroups : povray.advanced-users : Tangent to two ellipses? : Re: Tangent to two ellipses? Server Time
29 Jun 2024 01:47:24 EDT (-0400)
  Re: Tangent to two ellipses?  
From: Warp
Date: 17 Oct 2010 15:32:10
Message: <4cbb4f3a@news.povray.org>
Tim Cook <z99### [at] gmailcom> wrote:
> On 2010-10-17 13:23, Alain wrote:
> > No, an ellips is not an unevenly scalled circle. It's close but not
> > quite the same.

> Odd...what is the exact difference?

  I'm not sure there is a difference.

  The canonical form of an ellipse is: x^2/a^2 + y^2/b^2 = 1, where 'a' is
the horizontal radius and 'b' is the vertical radius.

  For the sake of simplicity, let's keep the vertical radius at 1 and only
modify the horizontal radius to get our ellipse. If we wanted a function
in terms of 'x' (so that we can eg. draw the top half of the ellipse), we
would solve 'y', so we get (assuming b=1): y = sqrt(1 - (x/a)^2)

  Now let's take the canonical form of a circle of radius 1: x^2 + y^2 = 1
If we solve 'y', we get: y = sqrt(1 - x^2)

  If we wanted to scale our circle horizontally, we would have to divide
'x' by the scaling factor. In other words, if we want to scale the circle
horizontally by factor 'f', we would have to divide 'x' by 'f'. (For example,
if we wanted to scale the circle to be twice as wide as it is tall, we would
have to divide 'x' by 2.)

  Thus we get: y = sqrt(1 - (x/f)^2), which is exactly the equation for the
ellipse where the vertical radius is 1 and the horizontal radius is 'f'.

-- 
                                                          - Warp


Post a reply to this message

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