Home
- POV-Ray Tutorial
Geometric Shapes
Index
Basic Shapes
Shapes by macro + CSG
Shapes in "shapes3.inc"
Other Shapes by macros
3D text shapes
Other Shapes
Non CSG Shapes
height_field + HF macros
- height_field by images
- height_field rastered
>height_field by functions
- height_fields massiv
>HF - Mountain + Valley
- HF_Square
- HF_Sphere
- HF_Cylinder
- HF_Torus
Isosurfaces
|
|
"height_field" by Functions
How to make "height_field" by functions
|
|
|
Sample "height_field" by Functions:
#declare HF_Res_X = 1024; // number of points in x
#declare HF_Res_Z = 1024; // number of points in z
#declare HF_Function = function{0.1+0.1*sin(x*30)}
#declare HF_Amplitude = 0.5;
height_field{
function HF_Res_X, HF_Res_Z
{ HF_Function(x,0,y) * HF_Amplitude }
//smooth
//water_level 0
texture { pigment{ color rgb<0.6,0.5,1>}
finish { phong 1 phong_size 400
reflection{0.25 metallic}}
} // end of texture
translate< 0,0.001,0>
scale <1,1,1>
}//------------------------------------------------ |
|
"height_field" by the function
function{0.1+0.1*sin(x*30)}
|
"height_field" by the function
function{0.1+0.1*sin(x*30)+0.1-0.1*cos(z*30))}
|
"height_field" by the function
function{0.2+0.05*sin(x*20)+0.035*sin(z*70)}
|
#declare HF_Res_X = 1024; // number of points in x
#declare HF_Res_Z = 1024; // number of points in z
#declare HF_Function =
function(x,y,z) {1+f_snoise3d(x*10,y*10,z*10)*0.3}
#declare HF_Amplitude = 0.5;
height_field{
function HF_Res_X, HF_Res_Z
{ HF_Function(x,0,y) * HF_Amplitude }
//smooth
//water_level 0
texture { pigment{ color rgb<0.83,0.42,0.67>}
finish { phong 1 phong_size 400
reflection{0.25 metallic}}
} // end of texture
translate< 0,-0.4,0>
scale <1,1,1>
}//------------------------------------------------ |
|
"height_field" by the function
function(x, y, z) {1 + f_snoise3d(x*10,y*10,z*10)*0.30 }
|
#declare HF_Res_X = 1024; // number of points in x
#declare HF_Res_Z = 1024; // number of points in z
#declare HF_Function =
function{
pigment{
crackle turbulence 0.45
color_map{
[0.00, color 0.00]
[0.10, color 0.25]
[0.12, color 0.30]
[0.30, color 0.30]
[0.70, color 0.27]
[1.00, color 0.25]
}// end color_map
scale <0.25,0.005,0.25>*0.7
} // end pigment
} // end function
#declare HF_Amplitude = 0.5;
height_field{
function HF_Res_X, HF_Res_Z
{ HF_Function(x,0,y).gray * HF_Amplitude }
//smooth
//water_level 0
texture { pigment{ color rgb<0.83,0.42,0.67>}
finish { phong 1 phong_size 400
reflection{0.25 metallic}}
} // end of texture
translate< 0,0.00,0>
scale <1,1,1>
}//------------------------------------------------ |
|
"height_field" by the function
function{
pigment{
crackle turbulence 0.45
color_map{
[0.00, color 0.00]
[0.10, color 0.25]
[0.12, color 0.30]
[0.30, color 0.30]
[0.70, color 0.27]
[1.00, color 0.25]
}// end color_map
scale <0.25,0.005,0.25>*0.7
} // end pigment
} // end function |
|
|