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
bicubic_patch{ ...}
Une forme de surface courbé crée avec un réseau de triangles

built-in shape, non-CSG


//Syntaxe : ------------------------------
bicubic_patch{
   patch_type  // (boolean: 0 or 1)
  // 0 = Bezier patch, stores only the triangular vertices.
  // 1 = Bezier patch, stores all plane equations defined by
  // the triangulation of the patch into sub patches
  // (faster, needs more RAM)
  flatness //value from 0.0 to 1.0,
  // higher values are giving flatter, less smooth results!
  u_steps u_steps_number // number of triangles to subdivide (1 to 5)
  v_steps u_steps_number // number of triangles to subdivide (1 to 5)
  <vertex_11>,<vertex_12>,<vertex_13>,<vertex_14>,
  <vertex_21>,<vertex_22>,<vertex_23>,<vertex_24>,
  <vertex_31>,<vertex_32>,<vertex_33>,<vertex_34>,
  <vertex_41>,<vertex_42>,<vertex_43>,<vertex_44>,
 } //--------------------- 
// Default values: flatness : 0.0
//                 u_steps  : 0
//                 v_steps  : 0
bicubic_patch
Example:
bicubic_patch{
  type 1
  flatness 0.1
  u_steps 4
  v_steps 4
  <0, 0, 2>,<1, 0, 0>,<2, 0, 0>,<3, 0,-2>,
  <0, 1, 0>,<1, 1, 0>,<2, 1, 0>,<3, 1, 0>,
  <0, 2, 0>,<1, 2, 0>,<2, 2, 0>,<3, 2, 0>,
  <0, 3, 2>,<1, 3, 0>,<2, 3, 0>,<3, 3,-2>
  texture{ pigment{ color rgb<0.75,0.5,1>}
           finish { phong 0.3}
         } // end of texture
  scale<1,1,1>
  rotate< 0,90,0>
  translate<0,0,0>
} // end of bicubic_patch ---------------- 

Attention : habituellement un "bicubic_patch" non est crée par la main mais par conversion de fichiers d'autres programmes.

Exemple pour un bicubic_patch
crée "par la main" :
bicubic_patch
// --------------------------------------
#local A = <1.20,3.50,0>;
#local B = <0.00,3.00,0>;
#local C = <3.00,0.30,0>;
#local D = <0.00,0.00,0>;
#local Blow = < 0,0, 0.8>;
// blowing in z direction
#local DB = B-D; #local DC = C-D;
#local CA = A-C; #local DB = B-D;

#local P01=  3/3*A      ;
#local P02=  2/3*A+1/3*B;
#local P03=  1/3*A+2/3*B;
#local P04=        3/3*B;

#local P13=  3*C/3;
#local P14=  2*C/3+1*D/3;
#local P15=  1*C/3+2*D/3;
#local P16=        3*D/3;

#local P05=  2/3*CA + C+0.25*Blow;
#local P09=  1/3*CA + C+0.25*Blow;
#local P08=  2/3*DB + D;
#local P12=  1/3*DB + D;

#local P10=P16+2/3*DC+1/3*(P02-P14)+Blow;
#local P11=P16+1/3*DC+1/3*(P03-P15)+Blow;
#local P06=P16+2/3*DC+2/3*(P02-P14)+Blow;
#local P07=P16+1/3*DC+2/3*(P03-P15)+Blow;

bicubic_patch{ //------------------------
 type 1
 flatness 0
 u_steps 4 // 1~5
 v_steps 4 //
 P01, P02, P03, P04,
 P05, P06, P07, P08,
 P09, P10, P11, P12,
 P13, P14, P15, P16

 texture{ pigment{ color rgb<1,1,1>}
          finish { phong 1}
        } // end of texture
rotate<0,90,0>
} // end of bicubic_patch --------------- 

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