POV-Ray : Newsgroups : povray.general : Bending isosurface functions : Re: Bending isosurface functions Server Time
3 Aug 2024 02:20:07 EDT (-0400)
  Re: Bending isosurface functions  
From: Mike Williams
Date: 27 May 2004 02:14:31
Message: <ZfsVYKA4aYtAFwRO@econym.demon.co.uk>
Wasn't it  who wrote:
>With a little bit more thinking, I could find the right operation for
>bending an object (along the x-axis), so that a cylinder is bent to a
>torus:
>
>xnew = atan(z/x)*radius
>ynew = y
>znew = sqrt(x^2+z^2)-radius
>
>--> function(atan(z/x)*radius, y, sqrt(x^2+z^2)-radius)
>
>The rendering speed is ok, so I can use it.
>

I don't think you need the atan(z/x)*radius, you can just use

function { F(sqrt(x*x+z*z)-r1, y, z) }

See <http://www.econym.demon.co.uk/isotut/substitute.htm#sor>


-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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