次の include文で、ここで示しているすべてのものを使用することができる。

#include "colors.inc" #include "textures.inc" #include "Woods.inc" #include "stones.inc" #include "glass.inc" #include "metals.inc" #include "skies.inc" #include "stars.inc" #include "chars.inc" #include "shapes.inc" #include "shapes2.inc" #include "shapes3.inc"


▷ 前の「14.9 形状1」へ


14.10 形状2

POV-Rayでは、プリミティブとしてさまざまな形状が用意されているが、インクルードファイルには違った形状が定義されている。ここでは、shapes2.inc に含まれている主なものを示す。

形状2を使うために必要なインクルード文

#include "shapes2.inc"

ここには次の形状がある。

 ▷ 14.10-1 正4面体[Tetrahedron]
 ▷ 14.10-2 正8面体[Octahedron]
 ▷ 14.10-3 正12面体[Dodecahedron]
 ▷ 14.10-4 正20面体[Icosahedron]
 ▷ 14.10-5 長斜方形[Rhomboid]
 ▷ 14.10-6 正6角柱[Hexagon]


14.10-1 正4面体[Tetrahedron]

正4面体は、4 つの正3角形で構成される形状である。

図14.10-1a 正4面体[Tetrahedron]

正4面体は、下図14.10-1b のような位置に生成される。y 軸と頂点の1つが一致している。

図14.10-1b 正4面体の生成位置

//------------------ Fig.14.10-1a Tetrahedron #version 3.7 #include "colors.inc" #include "textures.inc" #include "Woods.inc" #include "stones.inc" #include "glass.inc" #include "metals.inc" #include "skies.inc" #include "stars.inc" #include "chars.inc" #include "shapes.inc" #include "shapes2.inc" #include "shapes3.inc" global_settings { assumed_gamma 2.2 } //-----------------------------camera - light camera{ location <0,-14,8> sky <0, 0, 1> right <-image_width/image_height,0,0> look_at <0, 0, 0> angle 25 } light_source{ <300,-400,500> color rgb 1.5} //=================================== Tetrahedron #declare T1=texture{pigment{Coral*1.2 } normal{agate 0.3 scale 0.8} } #declare T2=texture{T_Grnt25 finish{reflection 0.3} scale 0.8} object{ Tetrahedron texture{T1} rotate x*90 scale 0.6 rotate z*20 translate <-1.5,-0.5,0> } object{ Tetrahedron texture{T2} rotate x*90 scale 0.8 rotate y*15 translate <1.5,1,0> } //---------------------------------------floor #declare CA1=rgb<0.85,0.85,0.8>; #declare CA2=rgb<0.85,0.85,0.8>*1.2; plane{ z, -1.01 pigment{ checker color CA1, color CA2 scale 0.3 } } //----------------sky sky_sphere{ pigment{ wrinkles color_map{ [ 0.3 SkyBlue] [ 0.9 White ] } scale <1, 0.2, 0.2> } }
//------------------ Fig.14.10-1b Tetrahedron #version 3.7 #include "colors.inc" #include "textures.inc" #include "Woods.inc" #include "stones.inc" #include "glass.inc" #include "metals.inc" #include "skies.inc" #include "stars.inc" #include "chars.inc" #include "shapes.inc" #include "shapes2.inc" #include "shapes3.inc" global_settings { assumed_gamma 2.2 } //-----------------------------camera - light camera{ location <60,60,10> sky <0, 0, 1> right <-image_width/image_height,0,0> look_at <0, 0, 1.2> angle 6.8 } light_source{ <200,400,300> color rgb 1.5} background {color rgb<1,1,0.9>*0.9 } //=================================== Tetrahedron object{ Tetrahedron pigment{rgbf<1,1,0,0.3>} } //--------------------------------coordinate axis #declare SX=5; #declare SY=4; #declare SZ=4; #declare SC=0.8; union{ union{ cylinder{x*-5,x*(SX-0.5),0.05} cone{x*(SX-0.5),0.1,x*(SX+0.1),0} text{ttf "cyrvetic.ttf","X",0.1,0 scale SC rotate<90,0,-30> translate <SX+0.4, 0, -0.5> } pigment{color rgb<0.2,1,0.2>} } union{ cylinder{y*-5,y*(SY+0.5),0.05} cone{y*(SY+0.5),0.1,y*(SY+1.1),0} text{ttf "cyrvetic.ttf","Y",0.1,0 scale SC rotate<90,0,-30> translate <-0.1,SY+2,-0.5> } pigment{color rgb<0.2,0.2,1.0>} } union{ cylinder{z*-5,z*(SZ-0.5),0.05} cone{z*(SZ-0.5),0.1,z*(SZ+0.1),0} text{ttf "cyrvetic.ttf","Z",0.1,0 scale SC rotate<90,0,120> translate <-0.2,0.2,SZ-0.2> } pigment{color rgb<1.0,0.2,0.2>} } }

< Tetrahedron の構文 >

object{ Tetrahedron [ OBJECT_MODIFIERS... ] }
object 物体のキーワード
Tetrahedron 正4面体
OBJECT_MODIFIERS... 物体の変形・テクスチャなどの設定

 


14.10-2 正8面体[Octahedron]

正8面体は、8 つの 3 角形で構成され、3 角錐を2つ合わせた形状である。

図14.10-2a 正8面体[Octahedron]

正8面体は、下図14.9-1b のような位置に生成される。3 角錐の頂点が y 軸と一致している。

図14.10-2b 正8面体の生成位置

//------------------ Fig.14.10-2a Octahedron #version 3.7 #include "colors.inc" #include "textures.inc" #include "Woods.inc" #include "stones.inc" #include "glass.inc" #include "metals.inc" #include "skies.inc" #include "stars.inc" #include "chars.inc" #include "shapes.inc" #include "shapes2.inc" #include "shapes3.inc" global_settings { assumed_gamma 2.2 } //-----------------------------camera - light camera{ location <0,-14,8> sky <0, 0, 1> right <-image_width/image_height,0,0> look_at <0, 0, 0> angle 25 } light_source{ <100,-400,500> color rgb 1.5} //=================================== Octahedron #declare T1=texture{pigment{rgb<0.3,0.8> } finish{reflection 0.3}} #declare T2=texture{T_Grnt23 finish{reflection 0.0} } object{ Octahedron texture{T1} rotate x*0 scale <1,1.5,1>*0.8 rotate z*90 translate <-1.5,1,0.3> } object{ Octahedron texture{T2} rotate x*90 scale <0.8,0.8,1> rotate z*10 translate <1.5,-2,1.2> } //---------------------------------floor #declare CA1=rgb<0.85,0.85,0.8>; #declare CA2=rgb<0.85,0.85,0.8>*1.2; plane{ z, -1.01 pigment{ checker color CA1, color CA2 scale 0.3 } } //----------------sky sky_sphere{ pigment{ wrinkles color_map{ [ 0.3 SkyBlue] [ 0.9 White ] } scale <1, 0.2, 0.2> } }
//------------------ Fig.14.10-2b Octahedron #version 3.7 #include "colors.inc" #include "textures.inc" #include "Woods.inc" #include "stones.inc" #include "glass.inc" #include "metals.inc" #include "skies.inc" #include "stars.inc" #include "chars.inc" #include "shapes.inc" #include "shapes2.inc" #include "shapes3.inc" global_settings { assumed_gamma 2.2 } //-----------------------------camera - light camera{ location <80,60,15> sky <0, 0, 1> right <-image_width/image_height,0,0> look_at <0, 0.6, 0.6> angle 5 } light_source{ <200,400,300> color rgb 1.5} background {color rgb<1,1,0.9>*0.9 } //=================================== Octahedron object{ Octahedron pigment{rgbf<1,1,0,0.3>} } //--------------------------------coordinate axis #declare SX=4; #declare SY=3; #declare SZ=3; #declare SC=0.8; union{ union{ cylinder{x*-5,x*(SX-0.5),0.05} cone{x*(SX-0.5),0.1,x*(SX+0.1),0} text{ttf "cyrvetic.ttf","X",0.1,0 scale SC rotate<90,0,-30> translate <SX+0.4, 0, -0.5> } pigment{color rgb<0.2,1,0.2>} } union{ cylinder{y*-5,y*(SY+0.5),0.05} cone{y*(SY+0.5),0.1,y*(SY+1.1),0} text{ttf "cyrvetic.ttf","Y",0.1,0 scale SC rotate<90,0,-30> translate <-0.1,SY+2,-0.5> } pigment{color rgb<0.2,0.2,1.0>} } union{ cylinder{z*-5,z*(SZ-0.5),0.05} cone{z*(SZ-0.5),0.1,z*(SZ+0.1),0} text{ttf "cyrvetic.ttf","Z",0.1,0 scale SC rotate<90,0,120> translate <-0.2,0.2,SZ-0.2> } pigment{color rgb<1.0,0.2,0.2>} } }

< Octahedron の構文 >

object{ Octahedron [ OBJECT_MODIFIERS... ] }
object 物体のキーワード
Octahedron 正8面体
OBJECT_MODIFIERS... 物体の変形・テクスチャなどの設定

 


14.10-3 正12面体[Dodecahedron]

正12面体は、12 の 5 角形で構成された形状である。

図14.10-3a 正12面体[Dodecahedron]

正12面体は、下図14.10-3b のような位置に生成される。2 つの 5 角形の中心を y 軸が通っている。

図14.10-3b 正12面体の生成位置

//------------------ Fig.14.10-3a Dodecahedron #version 3.7 #include "colors.inc" #include "textures.inc" #include "Woods.inc" #include "stones.inc" #include "glass.inc" #include "metals.inc" #include "skies.inc" #include "stars.inc" #include "chars.inc" #include "shapes.inc" #include "shapes2.inc" #include "shapes3.inc" global_settings { assumed_gamma 2.2 } //-----------------------------camera - light camera{ location <0,-14,8> sky <0, 0, 1> right <-image_width/image_height,0,0> look_at <0, 0, 0> angle 25 } light_source{ <100,-400,500> color rgb 1.5} //=================================== Dodecahedron #declare T1=texture{pigment{rgb<0.8,1,1> } } #declare T2=texture{Blue_Agate finish{reflection 0.4} scale 0.5 } object{ Dodecahedron scale 1 texture{T1} rotate x*90 translate <-1.5,0,1> } object{ Dodecahedron scale 1.2 texture{T2} rotate <90,0,5> translate <1.5,-1,0.5> } //---------------------------------floor #declare CA1=rgb<0.85,0.85,0.8>; #declare CA2=rgb<0.85,0.85,0.8>*1.2; plane{ z, -1.01 pigment{ checker color CA1, color CA2 scale 0.3 } } //----------------sky sky_sphere{ pigment{ wrinkles color_map{ [ 0.3 SkyBlue] [ 0.9 White ] } scale <1, 0.2, 0.2> } }
//------------------ Fig.14.10-3b Dodecahedron #version 3.7 #include "colors.inc" #include "textures.inc" #include "Woods.inc" #include "stones.inc" #include "glass.inc" #include "metals.inc" #include "skies.inc" #include "stars.inc" #include "chars.inc" #include "shapes.inc" #include "shapes2.inc" #include "shapes3.inc" global_settings { assumed_gamma 2.2 } //-----------------------------camera - light camera{ location <80,70,10> sky <0, 0, 1> right <-image_width/image_height,0,0> look_at <0, 0.2, 0.6> angle 4.5 } light_source{ <300,400,300> color rgb 1.5} background {color rgb<1,1,0.9>*0.9 } //================================= Dodecahedron object{ Dodecahedron pigment{rgbf<1,1,0,0.3>} } //--------------------------------coordinate axis #declare SX=4; #declare SY=3; #declare SZ=3; #declare SC=0.7; union{ union{ cylinder{x*-5,x*(SX-0.5),0.05} cone{x*(SX-0.5),0.1,x*(SX+0.1),0} text{ttf "cyrvetic.ttf","X",0.1,0 scale SC rotate<90,0,-30> translate <SX+0.4, 0, -0.5> } pigment{color rgb<0.2,1,0.2>} } union{ cylinder{y*-5,y*(SY+0.5),0.05} cone{y*(SY+0.5),0.1,y*(SY+1.1),0} text{ttf "cyrvetic.ttf","Y",0.1,0 scale SC rotate<90,0,-30> translate <-0.1,SY+2,-0.5> } pigment{color rgb<0.2,0.2,1.0>} } union{ cylinder{z*-5,z*(SZ-0.5),0.05} cone{z*(SZ-0.5),0.1,z*(SZ+0.1),0} text{ttf "cyrvetic.ttf","Z",0.1,0 scale SC rotate<90,0,120> translate <-0.2,0.2,SZ-0.2> } pigment{color rgb<1.0,0.2,0.2>} } finish{phong 1} }

< Dodecahedron の構文 >

object{ Dodecahedron [ OBJECT_MODIFIERS... ] }
object 物体のキーワード
Dodecahedron 正12面体
OBJECT_MODIFIERS... 物体の変形・テクスチャなどの設定

 


14.10-4 正20面体[Icosahedron]

正20面体は、20 の 3 角形で構成された形状である。

図14.10-4a 正20面体[Icosahedron]

正20面体は、下図14.10-4b のような位置に生成される。5 つの 3 角形が集まった部分の角錐頂点 2 つを y 軸が通っている。

図14.10-4b 正20面体の生成位置

//------------------ Fig.14.10-4a Icosahedron #version 3.7 #include "colors.inc" #include "textures.inc" #include "Woods.inc" #include "stones.inc" #include "glass.inc" #include "metals.inc" #include "skies.inc" #include "stars.inc" #include "chars.inc" #include "shapes.inc" #include "shapes2.inc" #include "shapes3.inc" global_settings { assumed_gamma 2.2 } //-----------------------------camera - light camera{ location <0,-14,8> sky <0, 0, 1> right <-image_width/image_height,0,0> look_at <0, 0, 0> angle 25 } light_source{ <100,-400,500> color rgb 1.5} //=================================== Dodecahedron #declare T1=texture{T_Gold_1A} #declare T2=texture{pigment{Jade} finish{reflection 0.3} } object{ Icosahedron texture{T1} scale 1 rotate x*90 translate <-1.5,0.5,1> } object{ Icosahedron texture{T2} scale 1.2 rotate <90,0,10> translate <1.2,-2,1> } //---------------------------------floor #declare CA1=rgb<0.85,0.85,0.8>; #declare CA2=rgb<0.85,0.85,0.8>*1.2; plane{ z, -1.01 pigment{ checker color CA1, color CA2 scale 0.3 } } //----------------sky sky_sphere{ pigment{ wrinkles color_map{ [ 0.3 SkyBlue] [ 0.9 White ] } scale <1, 0.2, 0.2> } }
//------------------ Fig.14.10-4b Icosahedron #version 3.7 #include "colors.inc" #include "textures.inc" #include "Woods.inc" #include "stones.inc" #include "glass.inc" #include "metals.inc" #include "skies.inc" #include "stars.inc" #include "chars.inc" #include "shapes.inc" #include "shapes2.inc" #include "shapes3.inc" global_settings { assumed_gamma 2.2 } //-----------------------------camera - light camera{ location <80,70,10> sky <0, 0, 1> right <-image_width/image_height,0,0> look_at <0,0.2,0.6> angle 4.5 } light_source{ <300,400,300> color rgb 1.5} background {color rgb<1,1,0.9>*0.9 } //================================== Icosahedron object{ Icosahedron pigment{rgbf<1,1,0,0.3>} } //--------------------------------coordinate axis #declare SX=4; #declare SY=3; #declare SZ=3; #declare SC=0.7; union{ union{ cylinder{x*-5,x*(SX-0.5),0.05} cone{x*(SX-0.5),0.1,x*(SX+0.1),0} text{ttf "cyrvetic.ttf","X",0.1,0 scale SC rotate<90,0,-30> translate <SX+0.4, 0, -0.5> } pigment{color rgb<0.2,1,0.2>} } union{ cylinder{y*-5,y*(SY+0.5),0.05} cone{y*(SY+0.5),0.1,y*(SY+1.1),0} text{ttf "cyrvetic.ttf","Y",0.1,0 scale SC rotate<90,0,-30> translate <-0.1,SY+2,-0.5> } pigment{color rgb<0.2,0.2,1.0>} } union{ cylinder{z*-5,z*(SZ-0.5),0.05} cone{z*(SZ-0.5),0.1,z*(SZ+0.1),0} text{ttf "cyrvetic.ttf","Z",0.1,0 scale SC rotate<90,0,120> translate <-0.2,0.2,SZ-0.2> } pigment{color rgb<1.0,0.2,0.2>} } }

< Icosahedron の構文 >

object{ Icosahedron [ OBJECT_MODIFIERS... ] }
object 物体のキーワード
Icosahedron 正20面体
OBJECT_MODIFIERS... 物体の変形・テクスチャなどの設定

 


14.10-5 長斜方形[Rhomboid]

長斜方形は 6 面体で、せん断力を受けて変形したボックスの形をしている。

図14.10-5a 長斜方形[Rhomboid]

長斜方形は、下図14.10-5b のような位置に生成される。

図14.10-5b 長斜方形の生成位置

//------------------ Fig.14.10-5a Rhomboid #version 3.7 #include "colors.inc" #include "textures.inc" #include "Woods.inc" #include "stones.inc" #include "glass.inc" #include "metals.inc" #include "skies.inc" #include "stars.inc" #include "chars.inc" #include "shapes.inc" #include "shapes2.inc" #include "shapes3.inc" global_settings { assumed_gamma 2.2 } //-----------------------------camera - light camera{ location <0,-14,8> sky <0, 0, 1> right <-image_width/image_height,0,0> look_at <0, 0, 0> angle 25 } light_source{ <100,-400,500> color rgb 1.5} //======================================= Rhomboid #declare T1=texture{T_Wood1 rotate y*90 scale 4 } #declare T2= texture{pigment{crackle form<-1.9,2,0> color_map{ [0.0 color rgb<0.5,0.2,0>] [0.3 rgb<0.8,1,0.6>] } scale 0.2 } normal{crackle 0.8 form<-2,2,0> scale 0.2 } finish{phong 1} } object{ Rhomboid texture{T2} scale 0.8 rotate <90,30,40> translate -1.5*x } object{ Rhomboid texture{T1} scale 0.8 rotate <90,0,45> translate 1.5*x } //---------------------------------floor #declare CA1=rgb<0.85,0.85,0.8>; #declare CA2=rgb<0.85,0.85,0.8>*1.2; plane{ z, -1.01 pigment{ checker color CA1, color CA2 scale 0.3 } } //----------------sky sky_sphere{ pigment{ wrinkles color_map{ [ 0.3 SkyBlue] [ 0.9 White ] } scale <1, 0.2, 0.2> } }
//------------------ Fig.14.10-5b Rhomboid #version 3.7 #include "colors.inc" #include "textures.inc" #include "Woods.inc" #include "stones.inc" #include "glass.inc" #include "metals.inc" #include "skies.inc" #include "stars.inc" #include "chars.inc" #include "shapes.inc" #include "shapes2.inc" #include "shapes3.inc" global_settings { assumed_gamma 2.2 } //-----------------------------camera - light camera{ location <15,-5,30> sky <0, 0, 1> right <-image_width/image_height,0,0> look_at <0.7,0.2,0.6> angle 13 } light_source{ <300,-400,600> color rgb 1.5} background {color rgb<1,1,0.9>*0.9 } //================================== Rhomboid object{ Rhomboid pigment{rgbf<1,1,0,0.3>} } //--------------------------------coordinate axis #declare SX=2.5; #declare SY=1.5; #declare SZ=3; #declare SC=0.7; union{ union{ cylinder{x*-5,x*(SX-0.5),0.05} cone{x*(SX-0.5),0.1,x*(SX+0.1),0} text{ttf "cyrvetic.ttf","X",0.1,0 scale SC rotate<0,0,0> translate <SX+0.04, 0, -0.5> } pigment{color rgb<0.2,1,0.2>} } union{ cylinder{y*-5,y*(SY+0.5),0.05} cone{y*(SY+0.5),0.1,y*(SY+1.1),0} text{ttf "cyrvetic.ttf","Y",0.1,0 scale SC rotate<0,0,0> translate <-0.1,SY+1.2,-0.5> } pigment{color rgb<0.2,0.2,1.0>} } union{ cylinder{z*-5,z*(SZ-0.5),0.05} cone{z*(SZ-0.5),0.1,z*(SZ+0.1),0} text{ttf "cyrvetic.ttf","Z",0.1,0 scale SC rotate<0,0,70> translate <-0.2,0.2,SZ-0.2> } pigment{color rgb<1.0,0.2,0.2>} } finish{phong 1} }

< Rhomboid の構文 >

object{ Rhomboid> [ OBJECT_MODIFIERS... ] }
object 物体のキーワード
Rhomboid 長斜方形
OBJECT_MODIFIERS... 物体の変形・テクスチャなどの設定

 


14.10-6 正6角柱[Hexagon]

正6角形の柱、柱の向きは x 軸方向になっている。

図14.10-6a 正6角柱[Hexagon]

正6角柱は、下図14.10-6b のような位置に生成される。柱の中心は x 軸である。

図14.10-6b 正6角柱の生成位置

//------------------ Fig.14.10-6a Hexagon #version 3.7 #include "colors.inc" #include "textures.inc" #include "Woods.inc" #include "stones.inc" #include "glass.inc" #include "metals.inc" #include "skies.inc" #include "stars.inc" #include "chars.inc" #include "shapes.inc" #include "shapes2.inc" #include "shapes3.inc" global_settings { assumed_gamma 2.2 } //-----------------------------camera - light camera{ location <0,-14,8> sky <0, 0, 1> right <-image_width/image_height,0,0> look_at <0, 0, 0> angle 25 } light_source{ <100,-400,500> color rgb 1.5} //================================== Hexagon #declare T1=texture{T_Wood1 rotate y*90 scale 4 } #declare T2=texture{T_Wood10 rotate y*90 scale 1 } object{ Hexagon texture{T2} scale <1.5,1,1>*0.8 rotate <0,0,-30> translate <-1.5,0,0.5> } object{ Hexagon texture{T1} scale x*1.3 rotate <0,90,0> translate <1.5,-1,0.5> } //---------------------------------floor #declare CA1=rgb<0.85,0.85,0.8>; #declare CA2=rgb<0.85,0.85,0.8>*1.2; plane{ z, -1.01 pigment{ checker color CA1, color CA2 scale 0.3 } } //----------------sky sky_sphere{ pigment{ wrinkles color_map{ [ 0.3 SkyBlue] [ 0.9 White ] } scale <1, 0.2, 0.2> } }
//------------------ Fig.14.10-6b Hexagon #version 3.7 #include "colors.inc" #include "textures.inc" #include "Woods.inc" #include "stones.inc" #include "glass.inc" #include "metals.inc" #include "skies.inc" #include "stars.inc" #include "chars.inc" #include "shapes.inc" #include "shapes2.inc" #include "shapes3.inc" global_settings { assumed_gamma 2.2 } //-----------------------------camera - light camera{ location <80,70,30> sky <0, 0, 1> right <-image_width/image_height,0,0> look_at <0,0.2,0.6> angle 4.2 } light_source{ <300,400,300> color rgb 1.5} background {color rgb<1,1,0.9>*0.9 } //================================== Hexagon object{ Hexagon pigment{rgbf<1,1,0,0.3>} } //--------------------------------coordinate axis #declare SX=4; #declare SY=3; #declare SZ=3; #declare SC=0.7; union{ union{ cylinder{x*-5,x*(SX-0.5),0.05} cone{x*(SX-0.5),0.1,x*(SX+0.1),0} text{ttf "cyrvetic.ttf","X",0.1,0 scale SC rotate<90,0,-30> translate <SX+0.4, 0, -0.5> } pigment{color rgb<0.2,1,0.2>}// no_shadow } union{ cylinder{y*-5,y*(SY+0.5),0.05} cone{y*(SY+0.5),0.1,y*(SY+1.1),0} text{ttf "cyrvetic.ttf","Y",0.1,0 scale SC rotate<90,0,-30> translate <-0.1,SY+2,-0.5> } pigment{color rgb<0.2,0.2,1.0>} //no_shadow } union{ cylinder{z*-5,z*(SZ-0.5),0.05} cone{z*(SZ-0.5),0.1,z*(SZ+0.1),0} text{ttf "cyrvetic.ttf","Z",0.1,0 scale SC rotate<90,0,120> translate <-0.2,0.2,SZ-0.2> } pigment{color rgb<1.0,0.2,0.2>}// no_shadow } }

< Hexagon の構文 >

object{ Hexagon [ OBJECT_MODIFIERS... ] }
object 物体のキーワード
Hexagon 正6角柱
OBJECT_MODIFIERS... 物体の変形・テクスチャなどの設定


(End) 14.10 形状2

▷ 次の「14.11 形状3(a)」へ