POV-Ray : Newsgroups : povray.advanced-users : Logarithmic spiral tube : Re: Logarithmic spiral tube Server Time 1 Mar 2024 00:25:22 EST (-0500)
 Re: Logarithmic spiral tube
 From: Mike Horvath Date: 22 Feb 2021 13:53:51 Message: <6033fdbf\$1@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#6033fdbf%241%40news.povray.org",
"dateCreated": "2021-02-22T18:53:51+00:00",
"datePublished": "2021-02-22T18:53:51+00:00",
"author": {
"@type": "Person",
"name": "Mike Horvath"
}
}
On 1/26/2021 7:42 PM, Robert McGregor wrote:
> Mike Horvath <mik### [at] gmailcom> wrote:
>> How would I create a tube in the shape of a logarithmic spiral? It
>> should have an even thickness. Do I need to use an isosurface once
>> again? Thanks.
>
> If you have the parametric equation already for a spiral isosurface and you just
> a need a smooth tube, then a difference of two sphere sweeps would render *much*
> faster than an isosurface.
>
> Just make the radius of the outer one a bit larger and the length of the
> differenced sweep a bit longer, so you get open ends (or just use other
> differencing objects to snip off the ends).
>
> Maybe something like this non-logarithmic spiral:
>
>     #local pt_cnt = int(pi/incr+0.5);
>     #local tt = 0;
>     sphere_sweep {
>        cubic_spline
>        pt_cnt
>        #while (tt < pi)
>           #local xt = outer_rad * cos(turns*2*tt) * sin(tt);
>           #local yt = outer_rad * sin(turns*2*tt) * sin(tt);
>           #local zt = outer_rad * cos(tt);
>           #local tt = tt + incr;
>        #end
>        tolerance 0.1
>     }
> #end
>
> difference {
>     object { Spherical_Spiral(5, 3, 0.12, 0.03) pigment {color Red} }
>     object { Spherical_Spiral(5, 3, 0.10, 0.03) pigment {color Blue} }
>     box {-1, 1 scale 12 translate x*12}
>     rotate y*40
> }
>
>
> Cheers,
> Rob
>
>

Good idea thank you!

Another option is to create a mesh parametrically.

Mike
```