| 
  | 
kurtz le pirate <kur### [at] gmail com> wrote:
> I have difficulty understanding the relationship between the value of
> the pattern and the value of the function and how to write pattern
> function for Povray.
>
> Classic equation for Gauss curve is :
>
>                 x^2     z^2
>           - ( (-----)+(-----) )
>                2.a^2   2.b^2
>    y = A.e
Based on:
https://en.wikipedia.org/wiki/Gaussian_function#Two-dimensional_Gaussian_function
my HSV color map:
http://news.povray.org/povray.binaries.scene-files/message/%3Cweb.56e1ce6a2f1b67735e7df57c0%40news.povray.org%3E/#%3Cwe
b.56e1ce6a2f1b67735e7df57c0%40news.povray.org%3E
try this:
#declare X0 = 0;
#declare Z0 = 0;
#declare A = 1;
#declare a = 0.5;
#declare b = 0;
#declare c = 0.5;
#declare Gaussian = function {y - A * exp(   -( a*pow((x-X0),2) -
2*b*(x-X0)*(z-Z0) + c*pow((z-Z0),2) )   ) }
isosurface{ //------------------------- "sombrero"
  function {Gaussian (x, y, z)}
 open
  threshold 0
  contained_by{box{<-10, -1, -10>, <10, 1, 10>}}
  texture{
    pigment{ TempGradient scale <1, 1.1, 1>}
    //normal { ripples 0.5 scale 0.125}
    //finish { phong 1}
 translate <0, -0.1, 0>
  } // end of texture
  scale <1, 5, 1>
  rotate <0,0,0>
  translate <0, 0, 0>
} // end of isosurface ----------------
 
 Post a reply to this message 
 | 
  |