|
|
You are working too hard. The scaled cylinder is not an ellipse. It is
merely a cylinder with a scaled axis. There are several differences,
not the least of being the definition. A cylinder is defined easily by
x = rcos(theta) and y = rsin(theta) (or vis versa) So try working with
x = rcos(theta)
y = Rsin(thete)
so the x position 30 degrees around the cylinder would be r*sqrt(3)/2
and the y position would be R*0.5 if you move the cylinder, simply add
the displacement to the values above.
Philippe Debar wrote:
>
> 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
|
|