POV-Ray : Newsgroups : povray.general : Iso -> Parametric Iso ? : Re: Iso -> Parametric Iso ? Server Time
4 Aug 2024 18:22:00 EDT (-0400)
  Re: Iso -> Parametric Iso ?  
From: ABX
Date: 15 May 2003 14:13:23
Message: <iul7cvkt29isu4m42nr051lr8jv6qh7067@4ax.com>
On Thu, 15 May 2003 20:05:22 +0200, Christoph Hormann <chr### [at] gmxde>
wrote:
>#declare fn_rotated=
>  function { 
>    fn_original(
>      x*cos(Angle)+y*sin(Angle), 
>      -x*sin(Angle)+y*cos(Angle), z
>    ) 
>  }
>
>therefore twisting would be something like:
>
>#declare fn_twisted=
>  function { 
>    fn_original(
>      x*cos(AngleFactor*z)+y*sin(AngleFactor*z), 
>      -x*sin(AngleFactor*z)+y*cos(AngleFactor*z), z
>    ) 
>  }

writing both as:

#declare fn_rotated=
  function(x,y,z,Angle) { 
    ...
  }

#declare fn_twisted=
  function(x,y,z,AngleFactor) { 
    ...
  }

gives variable deforming along axis but calculations will be probably slower.

ABX


Post a reply to this message

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