POV-Ray : Newsgroups : povray.general : Iso -> Parametric Iso ? : Re: Iso -> Parametric Iso ? Server Time
4 Aug 2024 12:16:17 EDT (-0400)
  Re: Iso -> Parametric Iso ?  
From: Christoph Hormann
Date: 15 May 2003 14:05:23
Message: <3EC3D6E2.92607AD4@gmx.de>
Gilles Tran wrote:
> 
> > f_rbox(x,y,z) - f_def(x,y,z) = threshold
> 
> Just wondering: is it possible to "warp" a rounded box (bending, shearing,
> twisting...) or another shape? Simple surface displacement can be done using
> the formula above, but I've not been able to create more drastic
> deformations.

'bending' is somewhat unprecise mathematically.  Shrearing is even a
linear transformation (can be done with a matrix transform, of course
possible with functions as well).  Twisting is probably meant as 'rotating
with varying rotation angle' - rotation is

#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
    ) 
  }

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 28 Feb. 2003 _____./\/^>_*_<^\/\.______


Post a reply to this message

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