POV-Ray : Newsgroups : povray.binaries.images : Cloud City II : Re: Cloud City II Server Time
22 Jun 2024 06:49:42 EDT (-0400)
  Re: Cloud City II  
From: And
Date: 1 Dec 2017 07:20:00
Message: <web.5a2148a42231f8ba7e12b7e70@news.povray.org>
Sven Littkowski <I### [at] SvenLittkowskiname> wrote:
> Is there any location, where "this" and "dens_cloud" are defined? I
> feel, I am missing some previous code here. :-)
>
> ---

> http://www.avg.com

"dens_cloud" is mine. It outputs the shape of the cloud from a function, I
usually use function to control the pattern. You can use your own density
pattern instead.

#include "functions.inc"

#declare f_test =
function(x,y,z) {
0.32*sum(i, 0, 4, pow(abs(f_noise3d(x*pow(2, i)/0.4, y*pow(2, i)/0.4, z*pow(2,
i)/0.4)), 2.5)/pow(2.0, i) )
}



#declare f_cloud_base =
function(x,y,z) {
0.5 - f_test(x,y,z)*3*3*z*exp(-3*z) - 0.32*3*3*z*exp(-3*z)
}


#declare dens_cloud =
density{
    function{0.5 - 0.2*f_cloud_base(x,y,z)}
    color_map{
        [0   rgb 0]
        [0.5 rgb 0]
        [0.56 rgb 1]
        [1   rgb 1]
    }
}


Post a reply to this message

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