POV-Ray : Newsgroups : povray.general : elongated torus? : Re: elongated torus? Server Time
30 Jul 2024 04:21:13 EDT (-0400)
  Re: elongated torus?  
From: Benix
Date: 14 Nov 2017 07:40:00
Message: <web.5a0ae3c4751c630accb9e8800@news.povray.org>
Hi everyone,

I just came across this thread and the very nice solutions presented here.

I had a similar issue with an elongated torus. However, I had the feeling that
the functions presented here require some calculation of the ray tracer. There
is a rather simple (quick and dirty) workaround, which might save some
computational effort:

When shapes overlap sufficiently, the ray tracer is rather quick. So I got my
elongated torus with a small trick using a for loop:

    #for (n, 1,99, 1)
        torus { 1,0.1
            translate<0,0.1*n,0>
          } // end of torus  -------------------------------
    #end

This makes you an elongated torus along the y-axis, from 0 to 10, with a major
radius of 1, and a radius of 0.1 for round corners.


Post a reply to this message

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