Descriptions and Examples for the POV-Ray Raytracer by Friedrich A. Lohmüller
    Scale Modelling with POV-Ray -
Italiano Italiano
Français français
Deutsch Deutsch

Home
- POV-Ray Tutorial

  - Scale Modelling
    with POV-Ray

 > Squared Background
      in m and cm
  - Orthographic View
  - Adapting Plans
      to Background Grid
  - Multiple Views Rendering




                                                 
Squared Background in 1 m and 0.1 m
or with 0.10 m and 0.01 m or in 10 mm and 1 mm
Macros for a Squared Background
A background plan with a raster width of 1m / 0.1m is made by the following macros (See also the opposite image!).
//------------------------------------- ////////////
#macro Raster_Lines (RScale, LineW, Intensity_)
 pigment{ gradient x scale RScale
          color_map{
           [0.000   color rgbt<1,1,1,0>*Intensity_]
           [0+LineW color rgbt<1,1,1,0>*Intensity_]
           [0+LineW color rgbt<1,1,1,1>]
           [1-LineW color rgbt<1,1,1,1>]
           [1-LineW color rgbt<1,1,1,0>*Intensity_]
           [1.000   color rgbt<1,1,1,0>*Intensity_]
           } // end color_map
         } // end pigment
 #end// of Raster(RScale, HLine)-macro
//------------------------------------- ////////////
//------------------------------------- ////////////
#macro Raster_Plate(
    RD1, Width1,//primary raster distance/width,
    RD2, Width2,//secondary raster distance/width,
    Base_Texture, //  non = pigment { Clear }
    Intensity, // Line gray intensity
    Start_Box, End_Box, // vectors
  ) //------------------------------------------
//----------------------------------------------
box{ Start_Box,End_Box
     texture{ Base_Texture }
  #if (RD1 > 0 ) // raster big  RD1, Width1,
    texture { Raster_Lines(RD1,Width1,Intensity) }
    texture { Raster_Lines(RD1,Width1,Intensity)
              rotate<0,90,0>}
  #end
  #if (RD2 > 0 ) // raster small RD2, Width2,
    texture { Raster_Lines(RD2,Width2,Intensity) }
    texture { Raster_Lines(RD2,Width2,Intensity)
              rotate<0,90,0>}
  #end
} // end box -----------------------------------
#end // ------------------------------ end of macro
//------------------------------------- ////////////

// How to use:  ------------------------------------

#declare Base_Texture =
  texture{ pigment{ color rgb<1,1,1<*1.2}}
//--------------------------------------------------
object{ Raster_Plate(
    1.0, 0.010,// 1st raster distance/width,
    0.1, 0.045,// 2nd raster distance/width,
    Base_Texture, // non = pigment{Clear}
    0.6, // Intensity, // Line gray intensity
    <-2,-0.05,-2>, <2,0,2>, //Start/End
  ) //----------------------------------------------
  rotate<0,0,0>
  translate<0,0.001,0>
} //------------------------------------------------
This squared background can easily be used in any direction we want! (See the opposite image)

Squared Background
 Making a squared background
Possible Scales
 Possible scales
squared background
 squared background

This scene in POV-Ray:
Squared_Background_000.pov

top

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