POV-Ray : Newsgroups : povray.general : Help! Can anyone figure this math? : Help! Can anyone figure this math? Server Time
13 Aug 2024 13:15:31 EDT (-0400)
  Help! Can anyone figure this math?  
From: Philippe Debar
Date: 28 Aug 1998 17:48:23
Message: <35e71797.0@news.povray.org>
I was totally unable to solve this problem for a pov scene.
I found a workaround, but I am not totally satisfied with it.

The problem is to get a smooth joint between differently
oriented surfaces. In this case, two boxes rotated around
the z-axis. I wanted to use a scaled cylinder (to get an
ellipse). What are (1) the location of the center of the scaled
cylinder, (2) the 'left' x radius and (3) the 'up' y radius to get
the cylinder tangeant to the boxes. I don't think that rotating the
cylinder around the z-axis is necessary.

I tried to solve the problem with the following equations:

An ellipse has to passes through point A(Xa, Ya) and
B(Xb, Yb). Its axis are parallel to the main axis. The
orientation of the tangent in A and B are given: Ta, Tb

P0(X0, Y0) the 'center' of the ellipse (center of a
scaled circle)
As I use a scaled circle, I use semi-axis of R and
s*R

So we have for each point

(Xa-X0)^2+(Ya-Y0)^2/L^2=R^2

this is equivalent to

Xa = X0 + R cos(Aa)
Ya = Y0 + L R sin(Aa)

Aa is the parametric angle A for point A
(note that this is in on way the real angle
from OX to OA)

And the tangent:
Xa'= -R sin(Aa)
Ya'= L R cos(Aa)

=> Ta = Ya' / Xa' =  -L / tan(Aa)

...same equations for point B...

So we have a system of 6 equations, with 6 unknowns:
X0, Y0, R, L, Aa, Ab.
Aa an Ab are of no interrest but can be necessary
to solve the system.

I tried but was unable to get an answer - it was to
complicated for me, and I can no longer access
a copy of Mathematica, so...


Any help welcome,

Thank you very much,

Philippe


Post a reply to this message

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