Beschreibungen und Beispiele zum Raytracer POV-Ray von Friedrich A. Lohmüller

            Geometrische Körper in POV-Ray

English English English
Italiano Italiano
Français français

Home
- POV-Ray Tutorial
 
Geometrische Körper
   Inhaltsübersicht
Grundkörper
Shapes by macro + CSG
3D-Text-Formen
Andere Körper

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

 height_field + HF macros
 Isosurfaces
                                   
mesh
mesh2{ } - Dreiecksnetz (mesh)
built-in shape, non-CSG
 
Einfaches mesh2:                                                     Erweiterte Optionen:
//Syntax: --------------------
// obligatory order:
//  Vectors,
//  Lists,
//  Indices
// --------------------

mesh2{
  vertex_vectors
  { number_of_vertices,
    vertex_00,
    vertex_01,
      //...
    vertex_nn
  }
// optional normal_vectors ->
// optional uv_vectors  ->
// optional texture lists ->

  face_indices
  { number_of_faces,
    <index_1, index_2, index_3>,
 // here optional with texture list:
 //[,texture_index
 //[,texture_index2,texture_index3]]
    <index_4, index_5, index_7>,
      // ...
    <index_p, index_q, index_r>
  } // ------------------
 // optional for
 // completely closed meshes:
 // making solid mesh:
    inside_vector <direction>
} //-------------------------

       
// Option für smooth surface:
  normal_vectors
  { number_of_normal_vectors,
    <normal_vector_00>,
    <normal_vector_01>,
    // ...
    <normal_vector_nn>
  }
// ---------
// Option für uv_mapped texture:
  uv_vectors
  { number_of_uv_vectors,
    <uv_vector_00>,
    <uv_vector_01>,
    // ...
    <uv_vector_nn>
  } //------------------------------
 // Lists --------------------------
 // optional texture lists:
  texture_list
  { number_of_textures,
    texture { Texture0 },
    texture { Texture1 },// ...
  }// ---------
// optional indices:
  normal_indices
  { number_of_faces,
    <index_1, index_2, index_3>,
    <index_4, index_5, index_7>,
      // ...
    <index_p, index_q, index_r>
  } // ------------------
// optional for uv_mapped texture:
  uv_indices
  { number_of_faces,
    <index_1, index_2, index_3>,
    <index_4, index_5, index_6>,
      // ...
    <index_p, index_q, index_r>
      }
 // --------------------------------
Sample mesh2:
mesh2 { // ----------------------- size: 5x5 points -----------------
vertex_vectors {25,
<0,1.88,0> <0,1.97,0.5> <0,2.06,1> <0,1.96,1.5> <0,2.05,2>
<0.5,1.93,0> <0.5,1.84,0.5> <0.5,1.94,1> <0.5,2.04,1.5> <0.5,2.00,2>
<1,2.00,0> <1,1.94,0.5> <1,1.96,1> <1,2.20,1.5> <1,2.00,2>
<1.5,1.92,0> <1.5,1.98,0.5> <1.5,2.21,1> <1.5,1.93,1.5> <1.5,2.03,2>
<2,2.10,0> <2,1.94,0.5> <2,2.15,1> <2,1.90,1.5> <2,2.04,2> }
uv_vectors {25,
<0,0> <0,0.25> <0,0.5> <0,0.75> <0,1>
<0.25,0> <0.25,0.25> <0.25,0.5> <0.25,0.75> <0.25,1>
<0.5,0> <0.5,0.25> <0.5,0.5> <0.5,0.75> <0.5,1>
<0.75,0> <0.75,0.25> <0.75,0.5> <0.75,0.75> <0.75,1>
<1,0> <1,0.25> <1,0.5> <1,0.75> <1,1> }
face_indices {32,
<0,5,6> <0,6,1> <1,6,7> <1,7,2>
<2,7,8> <2,8,3> <3,8,9> <3,9,4>
<5,10,11> <5,11,6> <6,11,12> <6,12,7>
<7,12,13> <7,13,8> <8,13,14> <8,14,9>
<10,15,16> <10,16,11> <11,16,17> <11,17,12>
<12,17,18> <12,18,13> <13,18,19> <13,19,14>
<15,20,21> <15,21,16> <16,21,22> <16,22,17>
<17,22,23> <17,23,18> <18,23,24> <18,24,19>}
uv_mapping

texture{ pigment{ checker
                  color rgb<1,1,1>*1.0
                  color rgb<1,1,1>*0.1 }
         finish { phong 0.1 }
         scale 0.2
       } // end texture
} //-----------------------------------------------------------------
Sample Mesh2
Dasselbe mesh2 unterteilt in 15x15 Punkte, mit Normalenvektoren und smooth:
Sample Mesh2
top

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