POV-Ray : Newsgroups : povray.advanced-users : A New Isosurface question : Re: A New Isosurface question Server Time
28 Jul 2024 16:32:49 EDT (-0400)
  Re: A New Isosurface question  
From: Mike Williams
Date: 22 Oct 2004 10:16:03
Message: <LGBBOFABLReBFw$X@econym.demon.co.uk>
Wasn't it Rob Richards who wrote:
>Hi,
>
>I have the following code that generates a flat plane with steep sided
>polygons.
>
>-------------snip-------------
>#declare f9=
>function{
>        pigment{
>                crackle
>                        color_map{
>                                [0 Black]
>                                [.3 Black]
>                                [.4 White]
>                                [1 White]
>                                 }
>
>               }
>}
>isosurface{
>                function{y-f9(x/2,0,z/2).gray*2}
>                ........
>                }
>-------------snip-------------
>
>What I'd like to do is to make some cracks or holes in the steep sides of
>the polygons. But I can't figure out how to do it ! Subtracting or adding
>another function just seems to deform the flat parts of the surface.
>

I can make holes everywhere, but restricting the holes to just the
vertical faces might be rather tricky.

#declare holes=function {pattern {leopard}} // or whatever

isosurface {
  function{max((y-f9(x/2,0,z/2).gray*2),holes(x*10,y*10,z*10)-0.45)}


-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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