Descriptions et exemples pour le POV-Ray raytracer par Friedrich A. Lohmueller
            Objets Géométriques en POV-Ray
English English English
Italiano  Italiano
Deutsch 

Page d'accueil
- Tutoriel POV-Ray
 
   Objets Géométriques
   Index :
Formes de Base
Objets par macro + CSG
Objets 3D text
Autre Objets

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

 height_field + HF macros
 Isosurfaces
                                       
mesh
mesh{ } - (mesh of triangles or smooth_triangles)
un réseau de triangles ou de triangles lisses.
 
Un réseau de triangles simple :
//Syntaxe : --------------------
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}}
} //----------------------------------
Un réseau de smooth_triangle avec vecteurs des normales de surface:
//Syntax: -----------------------------------------------------------------
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}
} //----------------------------------------------------------------------

Exemple 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.

Exemple 2 : // Attention : La texture doit être déclarée avant le parsing du réseau (mesh) !

#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
Example 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