Descrizioni ed esempi per il raytracer POV-Ray di Friedrich A. Lohmüller
    Oggetti Geometrici in POV-Ray
English English English
Français français
Deutsch Deutsch

Home
- POV-Ray Tutorial
 
Oggetti Geometrici
   Indice
Oggetti di Base
Oggetti con macro + CSG
Oggetti in "shapes3.inc"
Altri Oggetti come Macros
Oggetti di Testo 3D
altri Oggetti

 Oggetti Non-CSG
  - disc
  - polygon
  - triangle
  - smooth_triangle
  - bicubic_patch
  ->mesh
  - mesh2

 height_field + HF macros
 Isosurfaces
                                   
mesh
mesh{ } - reticolo di triangoli o smooth_triangle
 
Reticolo di triangoli mesh:
//Sintassi: --------------------
mesh {
  triangle{vertex_1}
  triangle{vertex_2}
   //...
  triangle{vertex_3}
// option for uv_mapped texture:
  uv_vectors
  <uv_Corner_1>,
  <uv_Corner_2>,
  <uv_Corner_3>
// ---------
} //-------------------------
       
//optional with predeclared textures :
mesh {
  triangle{vertex_1 texture{Texture_1}}
  triangle{vertex_2 texture{Texture_2}}
   //...
  triangle{vertex_3 texture{Texture_3}}
} //----------------------------------
Reticolo di triangoli con smooth_triangle e vettori normali di superficie:
//Sintassi: -----------------------------------------------------------------
mesh {
 smooth_triangle{vertex_1, normal_1, vertex_2, normal_2, vertex_3, normal_3}
 //...
 smooth_triangle{vertex_1, normal_1, vertex_2, normal_2, vertex_3, normal_3}
} //----------------------------------------------------------------------

Esempio 1:
mesh {
 triangle{<0.20, 0, 0.55>,<0.25, 0, 0.17>,<0.00, 0, 0.00>}
 triangle{<0.65, 0, 0.50>,<0.50, 0, 0.15>,<0.00, 0, 0.00>}
 triangle{<0.50, 0, 0.15>,<0.00, 0, 0.00>,<0.50, 0,-0.15>}
 triangle{<0.50, 0, 0.15>,<0.50, 0,-0.15>,<1.00, 0, 0.00>}
 triangle{<0.00, 0, 0.00>,<0.50, 0,-0.15>,<0.65, 0,-0.50>}
 triangle{<0.25, 0,-0.52>,<0.25, 0,-0.17>,<0.00, 0, 0.00>}
 texture{ pigment{ color rgb<0.0,1.0,0.0>}}
} //----------------------------------------
mesh
 
mesh
  For use in POV-Tree with TOM_TREE.

Esempio 2: // Attenzione: La testura debbo essere dichiarato primo di parsing del reticolo!

#declare T_1 = texture{ pigment{ color rgb<0.2,0.5,0.0>}}
#declare T_2 = texture{ pigment{ color rgb<0.0,1.0,0.2>}}
#declare T_3 = texture{ pigment{ color rgb<0.0,0.5,0.0>}}
#declare T_4 = texture{ pigment{ color rgb<0.2,0.9,0.0>}}
mesh {
 triangle{<0.20, 0, 0.55>,<0.25, 0, 0.17>,<0.00, 0, 0.00> texture{T_1}}
 triangle{<0.65, 0, 0.50>,<0.50, 0, 0.15>,<0.00, 0, 0.00> texture{T_2}}
 triangle{<0.50, 0, 0.15>,<0.00, 0, 0.00>,<0.50, 0,-0.15> texture{T_4}}
 triangle{<0.50, 0, 0.15>,<0.50, 0,-0.15>,<1.00, 0, 0.00> texture{T_3}}
 triangle{<0.00, 0, 0.00>,<0.50, 0,-0.15>,<0.65, 0,-0.50> texture{T_2}}
 triangle{<0.25, 0,-0.52>,<0.25, 0,-0.17>,<0.00, 0, 0.00> texture{T_1}}
 rotate<0,0,10>
} //----------------------------------------
mesh
Esempio 3:

mesh {
smooth_triangle{<0.20,0, 0.55>,<0.30,1, 0.50>,
                <0.25,0, 0.17>,<0.00,1, 0.10>,
                <0.00,0, 0.00>,<0.00,1, 0.00>}
smooth_triangle{<0.65,0, 0.50>,<0.20,1, 0.70>,
                <0.50,0, 0.20>,<0.00,1, 0.00>,
                <0.00,0, 0.00>,<0.00,1, 0.00>}
smooth_triangle{<0.50,0, 0.15>,<0.20,1, 0.50>,
                <0.00,0, 0.00>,<0.00,1, 0.00>,
                <0.50,0,-0.20>,<0.00,1,-0.50>}
smooth_triangle{<0.50,0, 0.15>,<0.20,1, 0.50>,
                <0.50,0,-0.15>,<0.20,1,-0.50>,
                <1.00,0, 0.00>,<2.00,1, 0.00>}
smooth_triangle{<0.00,0, 0.00>,<0.00,1, 0.00>,
                <0.50,0,-0.15>,<0.20,1, 0.00>,
                <0.65,0,-0.50>,<0.30,1,-0.70>}
smooth_triangle{<0.25,0,-0.52>,<0.30,1,-0.50>,
                <0.25,0,-0.17>,<0.00,1,-0.10>,
                <0.00,0, 0.00>,<0.00,1,-0.30>}
 texture{ pigment{ color rgb<0.0,0.7,0.0>}}
 rotate<0,0,10>
} //----------------------------------------
mesh
top

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