File: A8_p_kleinbottle_1.txt

package info (click to toggle)
povray 1%3A3.7.0.8-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 146,780 kB
  • sloc: cpp: 845,005; ansic: 122,118; sh: 34,206; pascal: 6,420; asm: 3,355; ada: 1,681; makefile: 1,387; cs: 879; awk: 590; perl: 245; xml: 95
file content (55 lines) | stat: -rw-r--r-- 2,353 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//-------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------
//Klein-bottle
#declare R=function(u){4*(1-cos(u)/2)}
#declare F1=function(u,v){ 
  select(
    u<=pi,
    (6*cos(u)*(1+sin(u))+(R(u)*cos(v+pi))),  
    (6*cos(u)*(1+sin(u))+(R(u)*cos(v+pi))),  
    (6*cos(u)*(1+sin(u))+(R(u)*cos(u)*cos(v)))
  )
}
#declare F2=function(u,v){ 
  select(
    u<=pi,
    (16*sin(u)),  
    (16*sin(u)),  
    (16*sin(u)+(R(u)*sin(u)*cos(v)))
  )
}
#declare F3=function(u,v){R(u)*sin(v)}
//-------------------------------------------------------------------------------------------------
#include "meshmaker.inc"
//-------------------------------------------------------------------------------------------------
object{ // Parametric(Fx,Fy, Fz, <UVmin>, <UVmax>, Iter_U, Iter_V, FileName)
   Parametric( // Builds a parametric surface out of three given functions. 
               // The uv_coordinates for texturing the surface come from the square <0,0> - <1,1>. 
      F1, F2, F3, //three functions
      <0, 0>,< 2*pi, 2*pi>,// range within to calculate surface: <u min, v min>,<u max, v max>. 
      75,75, // resolution of the mesh in the u range and v range.
      "" // FileName: ""= non, "NAME.obj'= Wavefront objectfile, "NAME.pcm" compressed mesh file 
         // "NAME.arr" = include file with arrays to build a mesh2 from, 
         //  others: includefile with a mesh2 object 
   ) //---------------------------------------------------------------------------------------------
   /*
   interior_texture {  // inside texture
     uv_mapping
   //  pigment{ color rgb <1,1,1> }
     pigment{ checker color rgb <0.5,0.0,0.1> rgb <1,1,1> scale <0.02,0.025,0.01>}
     finish { specular 0.25}
   } // 
   */
   texture{            //  outside (interior_texture)
     uv_mapping
     pigment{ checker color rgb <0.0,0,0.0> rgb <1,0.9,0.9>  scale <0.015 ,0.035,1>}
     finish { phong 0.5 }
   } // 
    
   scale< 1,1,1>*0.125
   rotate <0,0,90>
   rotate <0, 0,0>
   translate< 0, 0, 0 >
} // end of object 
//---------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------