POV-Ray : Newsgroups : povray.general : Landscape generation : Re: Landscape generation Server Time
7 Aug 2024 21:20:35 EDT (-0400)
  Re: Landscape generation  
From: Nekar Xenos
Date: 5 Jun 2001 08:44:28
Message: <3b1cd42c@news.povray.org>
Cool!

I just turned the page on the tutorial and there it was - CSG. I guess I should
have waited before posting(!)

Thanks,
--
/* Nekar Xenos */#local N=<-20,40,100>;#local K=<20,-40,100>;#local R=seed(0);
blob{#while((K-N).x>0)#local X=N;#local N=N+<rand(R),rand(R),1>/3;#local N=(
vlength(N-K)<vlength(X-K)?N:2*X-N);sphere{<N.y,-N.x,N.z>,1,1 scale .02}sphere{N
,1,1 scale.02}sphere{<-N.x-40,N.y,N.z>1,1 scale.01}sphere{<N.x+40,-N.y,N.z>1,1
scale.01 }#end pigment{rgbt 1}interior{media{emission <2,4,5>*5}}hollow}
"Tom Melly" <tom### [at] tomandlucouk> wrote in message
news:3b1cd040@news.povray.org...
> "Nekar Xenos" <j-p### [at] citywalkcoza> wrote in message
> news:3b1cc4fb@news.povray.org...
> >
> >
> > Ok, that sounds good. Can I do CSG with these iso-objects then? (I guess
not -
> > but it owuld be nice =)
> >
>
> Yep, you can treat iso's like any other CSG (although read the docs and don't
forget
> max_trace) - try the following code in megapov (a difference of a box and an
iso):
>
> #version unofficial MegaPov 0.6;
>
> #include "colors.inc"
> light_source{<0,0,0> color rgb<1,1,1>*2 translate <0, 0, -5>}
> camera{location  <0.0, 0.5, -5.0> look_at   <0.0, 0.0,  0.0>}
> sky_sphere{pigment{Blue}}
>
> difference{
>   box{<-1,-1,0>,<1,1,1/2> pigment{red 1}}
>   isosurface{
>     function {(x*x + y*y + z*z) - noise3d(x*5,y*5,z*5)}
>     max_trace 10 // try removing this!
>     contained_by{box{-5,5}}
>   }
>   pigment{rgb 1}
> }
>
>
>
>


Post a reply to this message

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