## Torus with elliptical cross-section? (POV-Ray)

### Torus with elliptical cross-section? (POV-Ray)

I am using POV-Ray but have been unable to find a simple way of making a
torus-like shape that has an elliptical cross-section (if this is the
right way to describe it).

The torus looks like a circle that has been rotated around an axis to form
the shape; I would like to obtain a similar shape formed from an ellipse.
Instead of looking like a round "tube" bent into a circle, it would be a
squashed elliptical tube bent into a circle.

I could make such a shape by using lots of spheres scaled down on one axis
and placed in a circular formation, but this would require a huge number
of spheres to look smooth.

Is there another way of defining such a shape?

--
Mario Becroft                        Auckland, New Zealand

Tariland, Atari Support in New Zealand                        _.|o o  |_   ) )

### Torus with elliptical cross-section? (POV-Ray)

> I am using POV-Ray but have been unable to find a simple way of making a
> torus-like shape that has an elliptical cross-section (if this is the
> right way to describe it).

> The torus looks like a circle that has been rotated around an axis to form
> the shape; I would like to obtain a similar shape formed from an ellipse.
> Instead of looking like a round "tube" bent into a circle, it would be a
> squashed elliptical tube bent into a circle.

> I could make such a shape by using lots of spheres scaled down on one axis
> and placed in a circular formation, but this would require a huge number
> of spheres to look smooth.

> Is there another way of defining such a shape?

The simple answer is to unevenly scale a torus, eg:

torus {10, 1}

gives you a cross-section that is a 1 unit radius circle.  If you then
scale that only along the y-axis:

torus {10, 1 scale <1, 2, 1>}

you now have a cross section that is a 1x2 unit ellipse (making the
torus more like a tube).  Using a number smaller than 1 would give you
an object more like a flat disc with a whole in it.

### Torus with elliptical cross-section? (POV-Ray)

> I am using POV-Ray but have been unable to find a simple way of making a
> torus-like shape that has an elliptical cross-section (if this is the
> right way to describe it).

You're gonna kick yourself over this one.  Simply scale your torus along
the y-axis like so:

torus {
1, 0.1
scale <1,2,1>

Quote:}

Scaling values > 1 give a shape like this:  (excuse awful ascii art)

______
/      \
|      |
\______/

------------------------   <- torus center axis

______
/      \
|      |
\______/

While scaling values < 1 give a shape like this:

__
/  \
|  |
\__/

--------------------   <- torus center axis

__
/  \
|  |
\__/

That should do it.
--

"Evil will always win because good is dumb."

### Torus with elliptical cross-section? (POV-Ray)

Oops... isn't it strange, that the moment I post the message it suddenly
occurs to me how it is done.

Of course it is a simple matter of scaling the torus to obtain the desired
shape.

--
Mario Becroft                        Auckland, New Zealand

Tariland, Atari Support in New Zealand                        _.|o o  |_   ) )

Hi,

I have a torus  and a line. How can I obtain the point (one of the points)
on the section of the torus in the plane defined by the axis of the torus
and the line at which the tangent to the section is parallel to the line?

This is simple if the line is perpendicular to the axis of the torus or if
the projection of the line along the axis of the torus is through the
center of the torus. And in the other cases?

Observe that the equation that describes a generic section of the torus is
of order 4!

Thank you very much for any hints.

Ciao da Massimo Schivalocchi