POV-Ray : Newsgroups : povray.general : Warping an Isosurface : Warping an Isosurface Server Time
7 Nov 2024 11:31:06 EST (-0500)
  Warping an Isosurface  
From: Dave Matthews
Date: 10 Oct 2003 11:00:03
Message: <web.3f86c7b410a16da310dd5cfd0@news.povray.org>
I'm not sure that this discovery adds much to the stockpile of useful POVRay
techniques, but I thought I'd share it anyway.

I wanted to directly warp an isosurface -- not add or subtract a noise
function, but apply the "black_hole," "turbulence," etc. to the isosurface
function itself.

By going through Mike Williams' "Isosurface Tutorial,"
http://www.econym.demon.co.uk/isotut/index.htm, I came up with the
following (but don't blame him if I missed some incredibly easy method of
doing the same thing):

Use the function in question as a pigment, but run it through a "high-low"
filter, so that it doesn't repeat itself for values >1 and < -1.  If the
function has a threshold of 0, I do this:

#declare My_F = function { stuff };

#declare Warped_F =
            function {
              pigment {
                 function {min(max(-0.5, My_F(x,y,z)),0.5) + 0.5}
                 warp { warping stuff }
                      }
                     };

isosurface { function { Warped_F(x,y,z).gray - 0.5 }
             threshold 0
             other isosurface stuff
            }

Depending on the function, sometimes I've had to use "0.5 -
Warped_F(x,y,z).gray" .

Question:  Is there an easier way of directly "warping" an isosurface?

Question #2 (I'll answer this):  Why not just add/subtract a pigment?
(Answer:  I don't know.  Maybe I'm just being difficult.)


Post a reply to this message

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