POV-Ray : Newsgroups : povray.binaries.images : Torus problem (69KB) Server Time
2 Oct 2024 20:20:57 EDT (-0400)
  Torus problem (69KB) (Message 21 to 24 of 24)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Ken
Subject: Re: Torus problem (69KB)
Date: 28 Apr 2000 21:24:14
Message: <390A3816.A7666B7@pacbell.net>
Tor Olav Kristensen wrote:

> But I can not tell my macros to go and use an external utility...
> 
> ... Or can I ? :)

...but there is no reason why you cannot create the points for your
lathe object first and then utilize them in your macro.

-- 
Ken Tyler - 1400+ POV-Ray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Ken
Subject: Re: Torus problem (69KB)
Date: 28 Apr 2000 21:45:46
Message: <390A3D1E.C86A918D@pacbell.net>
Tor Olav Kristensen wrote:

> Btw.: Will such a lathe render slower than my "cigar" shape ?

Lathes can render quickly if you use a linear or quadratic spline.
Cubic splines are little slower. A lot of it depends on how many
points for the spline are specified and how well behaved it is.
If you specify a lot of points or require sharp bends from the
spline is can slow things down. For a simple cigar shape I see
no reason why it would not render in an acceptable amount of
time.

-- 
Ken Tyler - 1400+ POV-Ray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Adam Coffman
Subject: Re: Torus problem (69KB)
Date: 29 Apr 2000 15:51:36
Message: <390B3D47.F682C002@ipfw.edu>
Tor Olav Kristensen wrote:
> 
> Chris Huff wrote:
> >
> > Ken wrote:
> >
> > > Tor Olav Kristensen wrote:
> > > > ...How are we supposed to model such cigar shapes then?
> > >
> > > A lathe can do it with ease and can also be used in CSG operations.
> >
> > You can also do it with the poly or quartic objects, and it is quite
> > easy to do with the isosurface object.
> 
> I have been thinking about that, but I have not found the
> proper equation for that yet.
> 
> (Where the minor and major radii are a part of the equation.)
> 
> Any suggestions?
> 


Maybe this is what you are asking about?

Equations for a torus,

major radius R>0 centered at (x,y,z)=(0,0,0)
minor radius r>0 (any value: r<R, r=R, or r>R, all OK)
rotational symmetry axis = z-axis

Parametric equations, depending on parameters s and t from 0 to 2*Pi:

x:=(R+r*cos(t))*cos(s);

y:=(R+r*cos(t))*sin(s);

z:=r*sin(t);

Implicit quartic equation:

0 = (x^2+y^2+z^2+R^2-r^2)^2-4*R^2*(x^2+y^2)

which expands to:

0 = r^4 - 2*x^2*r^2 - 2*y^2*r^2 - 2*r^2*R^2 - 2*r^2*z^2 + R^4 -
2*R^2*x^2 - 2*y^2*R^2 + 2*R^2*z^2 + x^4 + 2*x^2*y^2 + 2*x^2*z^2 +
2*y^2*z^2 + z^4 + y^4


I gave an example of this when replying to a post in this newsgroup by
D. Fontaine, 12-19-99.

Adam C.


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Torus problem (69KB)
Date: 1 May 2000 09:37:08
Message: <390D887F.A1D5D706@hotmail.com>
Adam Coffman wrote:
> 
> Maybe this is what you are asking about?
> 
> Equations for a torus,
> ...

Yes. That helped a lot!

Thank you.

> I gave an example of this when replying to a post in this newsgroup by
> D. Fontaine, 12-19-99.

Sorry.

I had not discovered these news groups at that time.

Tor Olav
--
mailto:tor### [at] hotmailcom
http://www.crosswinds.net/~tok/tokrays.html


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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