Descriptions and Examples for the POV-Ray Raytracer by Friedrich A. Lohmüller
Geometric Shapes in POV-Ray
Italiano Italiano
Français français
Deutsch Deutsch

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
                                   
Sample raster mountains by height_field 600x450

Raster Mountains

How to create Rasters
on "height_field" Mountains


Sample "Raster Mountains":

// ground ----------------------------------
// settings of squared plane dimensions
// -- stripes distance - Strichabstand:
#declare RasterScale = 1.0;
// -- stripes width    - Strichbreite
#declare RasterHalfLine  = 0.05;
// -- dito in z direction
#declare RasterHalfLineZ = 0.05;
// -- stripes color    - Stichfarbe
#declare Raster_Color = <1,1,1>*0.2;
//------------------------------------------
#macro Raster(RScale, HLine)
       pigment{
           gradient x scale RScale
           color_map{
            [0.000   color rgb Raster_Color]
            [0+HLine color rgb Raster_Color]
            [0+HLine color rgbt<1,1,1,1>]
            [1-HLine color rgbt<1,1,1,1>]
            [1-HLine color rgb Raster_Color]
            [1.000   color rgb Raster_Color]
            }// end of color_map
           }// end of pigment
 #end// end of Raster(RScale, HLine)-macro
//-------------------------------------------

union{
plane{ <0,1,0>, 0  } //---------------

height_field{
       tga "MountLo1.tga"
       smooth
       double_illuminate
       translate<-0.5,-0.001,0>
       scale<150,15,150>
     } // end of height_field ---------------

//  with layered textures raster:
// 1. -- background texture -- Hintergrund Textur
 texture{ pigment{color White*1.1}}
// 2. layerd stripes - überlagerte Streifen
 texture{ Raster(RasterScale,RasterHalfLine )}
 texture{ Raster(RasterScale,RasterHalfLineZ)
                           rotate<0,90,0>}
}// end of union
//end of squared plane+mountain -----

In these samples we use the image "MountLo1.tga"
(also used in my "Insert Menu Add-on")to produce these height field mountain shapes. If you don't have this file yet you can download it here as "MountLo1.tga"(373 kB) or as zipped up "MountLo1.zip"(127 kB).
 
If this heigh_field image is too rough for you, than put it in a graphic program, size it up and smooth it again.
 
The strategy to put a scquared grid on these moutains is the same as in my tutorial "Grid Plane" - see there for details.

 
 
 
 
 
 
 
Scene description for POV-Ray:
"raster_mountain.txt" or
"raster_mountain.pov"

A variation
with vertical stripes:

A variation
with horizontal stripes:

Scene description for POV-Ray:
"raster_mountain_ver.txt" or
"raster_mountain_ver.pov"
Scene description for POV-Ray:
"raster_mountain_hor.txt" or
"raster_mountain_hor.pov"

© Friedrich A. Lohmüller, 2007
www.f-lohmueller.de
  top