POV-Ray : Newsgroups : povray.binaries.images : Cloud with fill light : Re: Cloud with fill light Server Time
2 May 2024 19:27:09 EDT (-0400)
  Re: Cloud with fill light  
From: And
Date: 30 Jan 2019 00:45:01
Message: <web.5c5139d68da54bb2b65c28970@news.povray.org>
ingo <ing### [at] tagpovrayorg> wrote:
> in news:web.5c503bec8da54bb25536cfec0@news.povray.org And wrote:
>
> > I have to develop some method to generate the cloud shape (using
> > tolerance, pattern, etc) to output df3 files.
> >
>
> Hope this helps, I'm not good at clouds but it gives an idea
>
> ingo
>
> ---%<------%<------%<---
> #version 3.7;
> global_settings{ assumed_gamma 1.0 }
> #default{ finish{ ambient 0.1 diffuse 0.9 }}
> #include "arrays.inc"
> #include "functions.inc"
>
> #declare Pigm = pigment {
>   function{(f_granite(x*10,y*10,z*10))}
>   warp{
>     turbulence 0.6
>     octaves 10
>     omega 0.5
>     lambda 0.2
>   }
>   color_map {
>     [0.0 color rgb 0.0 ]
>     [1.0 color rgb 1.0 ]
>   }
>   scale 0.4
> };
>
> #declare Fluff = function{pigment{Pigm}};
>
> #declare Container = pigment {
>   function{f_spherical(x,y,z)}
>   warp{
>     turbulence 0.6
>     octaves 3
>     omega 0.7
>     lambda 0.8
>   }
>   scale 0.4
>   translate 0.5
> };
> #declare fn_Container=function{pigment{Container}};
>
> #declare Cloud = function{
>   Fluff(x,y,z).gray*fn_Container(x,y,z).gray
> }
>
>
> #declare ResX = 50;
> #declare ResY = 50;
> #declare ResZ = 50;
> #declare DF_arr = array[ResX][ResY][ResZ];
> #for(Z,0,1-1/ResZ,1/ResZ)
>   #for(Y,0,1-1/ResY,1/ResY)
>     #for(X,0,1-1/ResX,1/ResX)
>       #declare Value = eval_pigment(pigment{function{Cloud(x,y,z)}},
> <X,Y,Z>);
>       #declare DF_arr[X*ResX][Y*ResY][Z*ResZ] = Value.gray;
>     #end
>   #end
> #end
>
> ARRAYS_WriteDF3(DF_arr, "test.df3", 16)
>

Well, you use a combination of two pattern. I should think of a more complex
method.

Thank


Post a reply to this message

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