POV-Ray : Newsgroups : povray.binaries.images : Ruined Place - WIP 4 : Re: Ruined Place - WIP 4 Server Time
2 Aug 2024 04:20:58 EDT (-0400)
  Re: Ruined Place - WIP 4  
From: Thomas de Groot
Date: 23 Feb 2008 05:23:06
Message: <47bff40a$1@news.povray.org>
"Kirk Andrews" <kir### [at] tektonartcom> schreef in bericht 
news:web.47bda203d1c20822af0d79570@news.povray.org...

> Also, I really think you need to use some isosurfaces to difference out 
> broken
> chunks of your columns.  I think that would add a lot of realism to the 
> scene.
>

As a first possibility, I have explored the use of isosurfaces for the whole 
column segment. As can be expected, for rendering a whole field of columns 
this way, render time is going to be preposterously long, even although the 
segments look good. Try this code and play with the max_gradient as you need 
to increase that to obtain smooth results:

//start code
#declare f_cyl = function {pow(x,2) + pow(y,2) + pow(z,2) - 1}
#declare f_flute = function {f_cyl(x*10-10, 0, z*10)}
// a square hole on top and bottom of the column segment:
#declare f_hole = function {max((y*y-1),(x*x-1),(z*z-1)) }

#declare f_rough = function{f_wrinkles(x*.4, y*.4, z*.4)}

#declare Angle = 15;
#declare Flutes = 0;

isosurface {
function {max(f_cyl(x, 0, z),
              -f_hole(y,x*8,z*8),
              -f_hole(y-10,x*8,z*8)
              #if (Flutes)
              ,
              -f_flute(x, 0, z),
              #while (Angle<345)
                -f_flute(x*cos(radians(Angle)) - z*sin(radians(Angle)), 0, 
x*sin(radians(Angle)) + z*cos(radians(Angle))),
                #local Angle = Angle+15;
              #end //of Angle
              #local Angle = Angle+15;
              -f_flute(x*cos(radians(Angle)) - z*sin(radians(Angle)), 0, 
x*sin(radians(Angle)) + z*cos(radians(Angle)))
              #end //of flutes
          )
          + f_rough(x, y, z)*0.3
         }
  max_gradient 10.0
  contained_by {box {<-1, 0, -1>, < 1, 1, 1>}}
  accuracy 1e-3
  rotate <0,0,0>
}
//end code

Thomas


Post a reply to this message

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