次の 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

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

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

#include "shapes.inc"

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

 ▷ 14.9-1 超トーラス[Supertorus]
 ▷ 14.9-2 楕円体[Spheroid]
 ▷ 14.9-3 ワイヤーボックス[Wire_Box]
 ▷ 14.9-4 丸ボックス[Round_Box]
 ▷ 14.9-5 丸円柱[Round_Cylinder]
 ▷ 14.9-6 丸コーン[Round_Cone]
 ▷ 14.9-7 丸コーン2[Round_Cone2]


14.9-1 超トーラス[Supertorus]

この超トーラスは、典型的なドーナツ(円環)の形だけではなく、形状が変化できるトーラスである。

図14.9-1a 超トーラス[Supertorus]

超トーラスは、下図14.9-1b のような位置に生成される。トーラスの中心は原点で、xz 平面上に生成される。

図14.9-1b 超トーラスの生成位置

//------------------ Fig.14.9-1a Supertorus #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,10> //18> sky <0, 0, 1> right <-image_width/image_height,0,0> look_at <0, 0, 0> angle 22 } light_source{ <100, -400, 500> color rgb 1.5} //=========================================== Supertorus #declare T1=texture{pigment{color rgb<1,0.6,0.8>} finish{phong 1} } #declare T2=texture{pigment{color rgb<0.4,1,0.6>} finish{phong 1} } #declare T3=texture{pigment{color rgb<0.8,0.7,0.0>} finish{phong 1} } object{ Supertorus( 1.00, 0.25, 1, 1, 0.001, 1.50) texture{T1} scale 1 rotate x*90 translate<-1.5,-1.3,0> } object{ Supertorus( 1.00, 0.25, 0.7, 0.8, 0.001, 1.50) texture{T2} scale 1 rotate x*90 translate y*2.2 } object{ Supertorus( 1.00, 0.25, 0.1, 1 0.001, 1.50) texture{T3} scale 1 rotate x*90 translate<1.5,-1.3,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.5 pigment{ checker color CA1, color CA2 scale 0.3 } }
//------------------ Fig.14.9-1b Supertorus #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, 0.8> angle 6.8 } light_source{ <200,400,300> color rgb 1.5} background {color rgb<1,1,0.9>*0.9 } //====================================== Supertorus object{ Supertorus( 1.00, 0.25, 1, 1, 0.001, 1.50) pigment{rgbf<1,1,0,0.3>} finish{phong 1} scale 1.5 } //----------------------------------coordinate axis #declare SX=5; #declare SY=4; #declare SZ=3.5; #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>} } finish{phong 1} }

< Supertorus の構文 >

object{ Supertorus ( Major_Radius , Minor_Radius , Major_Control , Minor_Control , Accuracy , Max_Gradient ) [ OBJECT_MODIFIERS... ] }
object 物体のキーワード
Supertorus 超トーラス
Major_Radius 大半径、超トーラスの大きさ
Minor_Radius 小半径(断面円の半径)、超トーラスの太さ
Major_Control 超トーラスの形状コントロール、1.0 で円になる。
Minor_Control 超トーラスの断面形状コントロール、1.0 で断面が円になる。
Accuracy 精度の設定、例: 0.001
Max_Gradient 最大勾配の設定、例: 1.5
OBJECT_MODIFIERS... 物体の変形・テクスチャなどの設定

図14.9-1c 超トーラスの形状コントロール

//------------------ Fig.14.9-1c Supertorus #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 and light camera{ location <0.5,-40,4> sky<0,0,1> right <-image_width/image_height,0,0> look_at<0,0,3.9> angle 20 } light_source {<-30,-100,80> color White*1.2} background{ rgb 1 } //====================================== Supertorus #declare TTT=texture{ pigment{color rgb<1,0.65,0.0>} finish{phong 1 reflection 0.2} } #declare TRA0=transform{scale 1.3 rotate x*-45} #declare TRA1=transform{TRA0 translate z*6.5} #declare TRA2=transform{TRA0 translate z*3.5} #declare TRA3=transform{TRA0 translate z*0.5} union{ object{ Supertorus( 1.00, 0.25, 0.1, 0.1, 0.001, 1.50) transform TRA1 } object{ Supertorus( 1.00, 0.25, 1.0, 0.1, 0.001, 1.50) transform TRA2 } object{ Supertorus( 1.00, 0.25, 2.0, 0.1, 0.001, 1.50) transform TRA3 } texture{TTT} translate x*-3.3 no_reflection no_shadow } union{ object{ Supertorus( 1.00, 0.25, 0.1, 1, 0.001, 1.50) transform TRA1 } object{ Supertorus( 1.00, 0.25, 1.0, 1, 0.001, 1.50) transform TRA2 } object{ Supertorus( 1.00, 0.25, 2.0, 1, 0.001, 1.50) transform TRA3 } texture{TTT} translate x*0.7 no_reflection no_shadow } union{ object{ Supertorus( 1.00, 0.25, 0.1, 2, 0.001, 1.50) transform TRA1 } object{ Supertorus( 1.00, 0.25, 1, 2, 0.001, 1.50) transform TRA2 } object{ Supertorus( 1.00, 0.25, 2, 2, 0.001, 1.50) transform TRA3 } texture{TTT} translate x*4.7 no_reflection no_shadow } //-------------------------------------character #declare Font="cyrvetic.ttf" union{ text{ttf Font,"Minor",0.1,0 no_reflection no_shadow rotate x*90 scale 0.55 translate <-6.3,-1,8.5> } text{ttf Font,"Control",0.1,0 no_reflection no_shadow rotate x*90 scale 0.55 translate <-6.1,-1,7.9> } text{ttf Font,"0.1",0.1,0 no_reflection no_shadow rotate x*90 scale 0.6 translate <-3.6,-1,8> } text{ttf Font,"1",0.1,0 no_reflection no_shadow rotate x*90 scale 0.6 translate <0.4,-1,8> } text{ttf Font,"2",0.1,0 no_reflection no_shadow rotate x*90 scale 0.6 translate <4.2,-1,8> } pigment{rgb Red} } union{ text{ttf Font,"Major",0.1,0 no_reflection no_shadow rotate x*90 scale 0.55 translate <-6.8,0,7.3> } text{ttf Font,"Control",0.1,0 no_reflection no_shadow rotate x*90 scale 0.55 translate <-6.8,0,6.7> } text{ttf Font,"0.1",0.1,0 no_reflection no_shadow rotate x*90 scale 0.6 translate <-6.5,0,5.7> } text{ttf Font,"1",0.1,0 no_reflection no_shadow rotate x*90 scale 0.6 translate <-6.3,0,3.2> } text{ttf Font,"2",0.1,0 no_reflection no_shadow rotate x*90 scale 0.6 translate <-6.3,0,0.4> } pigment{Blue*1.5} }


14.9-2 楕円体[Spheroid]

この形状は、x,y,z 各方向の3つの半径を設定する楕円体である。

図14.9-2 楕円体[Spheroid]

//-------------------- Fig.14.9-2 Spheroid #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,1.7> angle 25 } light_source{ <100,-400,500> color rgb 1.5} //========================================= Spheroid #declare T1=texture{pigment{Goldenrod} finish{phong 1} } #declare T2=texture{ pigment{Red_Marble} finish{phong 1} } object{ Spheroid(<0,0,0>,<2.0,1.6,2.4> ) texture{T1} scale 0.6 translate<-1.3,0,2> } object{ Spheroid(<0,0,0>,<1.5,2.4,2.6> ) texture{T2} scale 0.6 translate<1.3,0,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 } }

< Spheroid の構文 >

object{ Spheroid ( <Center>, <Radius> ) [ OBJECT_MODIFIERS... ] }
object 物体のキーワード
Spheroid 楕円体
<Center> 楕円体の中心、x,y,z 座標
<Radius> 楕円体の x,y,z 方向の各半径
OBJECT_MODIFIERS... 物体の変形・テクスチャなどの設定

 


14.9-3 ワイヤーボックス[Wire_Box]

ワイヤーボックスは、円柱と球から構成されるワイヤーフレームのボックスである。

図14.9-3a ワイヤーボックス[Wire_Box]

下図14.9-3b に示すように、ワイヤーボックスは対角点により生成される。また、ワイヤーボックスを透明にすると円柱と球から構成されている様子がわかる。内側に見える境界は、UseMerg を 1 にすると消える。

図14.9-3b ワイヤーボックスの位置座標

//-------------------- Fig.14.9-3a Wire_Box #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.5, 0, 0.2> angle 25 } light_source{ <100,-400,500> color rgb 1.5} //========================================== Wire_Box #declare T1=pigment{color rgb<0.4,0.65,0.3>} #declare T2=texture{pigment{color rgb<1,0.6,0.5>} finish{phong 1} } object { Wire_Box( <0,0,0>,<1.8,2,2>, 0.1, 0) texture{T1} scale 1.2 translate<-2.7,-3,0> } object { Wire_Box( <0,0,0>,<2,4,2>, 0.25, 0) texture{T2} scale 1 translate<0,-3,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 } }
//-------------------- Fig.14.9-3b Wire_Box #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 } background {color rgb<1,1,0.9>*0.9 } //-----------------------------camera - light camera{ location <60,50,10> sky <0, 0, 1> right <-image_width/image_height,0,0> look_at <0.5, 1, 0.2> angle 5.8 } light_source{ <200,400,300> color rgb 1.5} //========================================== Wire_Box object{ Wire_Box( <1,-1,-1>,<-1.6,1.6,1.6>,0.2,0 ) pigment{rgbf<0.7,1,1,0.5>*1.1} finish{phong 1} } sphere {<1,-1,-1> 0.1 pigment{ rgbf<1,0.6,>*0.8} } sphere {<-1.6,1.6,1.6> 0.1 pigment{ rgbf<1,0.6,>*0.8} }

< Wire_Box の構文 >

object{ Wire_Box ( <A_Point> , <B_Point> , Edge_Radius , UseMerge ) [ OBJECT_MODIFIERS... ] }
object 物体のキーワード
Wire_Box ワイヤーボックス
<A_Point> , <B_Point> ボックスの対角の頂点の x,y,z 座標
Edge_Radius 円柱・球の半径
UseMerge マージの使用: 無 0 、有 1
OBJECT_MODIFIERS... 物体の変形・テクスチャなどの設定

 


14.9-4 丸ボックス[Round_Box]

丸ボックスは、上記14.9-3 のワイヤーボックスに面を追加したもので、パラメータも同じである。

図14.9-4a 丸ボックス[Round_Box]

下図14.9-4b に示すように、丸ボックスは直方体が対角点により生成される。透明による内側の境界は、UseMerg を 1 にすると消える。

図14.9-4b 丸ボックスの位置座標

//-------------------- Fig.14.9-4a Round_Box #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.5, 0, 0.2> angle 25 } light_source{ <100,-400,500> color rgb 1.5} //========================================== Round_Box #declare T1=texture{pigment{color rgb<0.7,1,0.8>} normal{ bozo 3 scale 0.1 } } #declare T2=texture{pigment{color rgb<1,0.6,0.3>} finish{phong 0.6 } normal{crackle 0.6 form<-2,2.5,0> scale 0.2} } texture{ T_Grnt20a } object { Round_Box( <0,0,0>,<1.8,2,2>, 0.1, 0) texture{T1} scale 1.2 translate<-2.7,-3,0> } object { Round_Box( <0,0,0>,<2,4,2>, 0.4, 0) texture{T2} scale 1 translate<0,-3,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 } }
//-------------------- Fig.14.9-4b Round_Box #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 } background {color rgb<1,1,0.9>*0.9 } //-----------------------------camera - light camera{ location <60,50,10> sky <0, 0, 1> right <-image_width/image_height,0,0> look_at <0.5, 1, 0.2> angle 5.8 } light_source{ <200,400,300> color rgb 1.5} //========================================== Round_Box object{ Round_Box( <1,-1,-1>,<-1.6,1.6,1.6>,0.2,0 ) pigment{rgbf<0.7,1,1,0.5>*1.1} finish{phong 1} } sphere {<1,-1,-1> 0.1 pigment{ rgbf<1,0.6,>*0.8} } sphere {<-1.6,1.6,1.6> 0.1 pigment{ rgbf<1,0.6,>*0.8} }

< Round_Box の構文 >

object{ Round_Box ( <A_Point> , <B_Point> , Edge_Radius , UseMerge ) [ OBJECT_MODIFIERS... ] }
object 物体のキーワード
Round_Box 丸ボックス
<A_Point> , <B_Point> ボックスの対角の頂点 x,y,z 座標
Edge_Radius 円柱の半径(ボックスの丸み)
UseMerge マージの使用: 無 0 、有 1
OBJECT_MODIFIERS... 物体の変形・テクスチャなどの設定

 


14.9-5 丸円柱[Round_Cylinder]

丸円柱は 角が丸い円柱で、円柱と2つのトーラスから構成されている。

図14.9-5a 丸円柱[Round_Cylinder]

下図14.9-5b に示すように、丸円柱はA点とB点で指定する位置に生成される。

図14.9-5b 丸円柱の位置座標

//-------------------- Fig.14.9-5a Round_Cylinder #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} //======================================== Round_Cylinder #declare T1=texture{pigment{color rgb<1,0.4,0.3>} finish{phong 1} } #declare T2=texture{pigment{color rgb<0.5,0.7,0.8>*1.3} finish{phong 1} normal{bumps 0.2 scale 0.01} } object { Round_Cylinder(<0,0,0>, <0,0,1.8>, 0.6, 0.1, 0) texture{T1} scale 1.5 translate<-1.5,-2,0> } object { Round_Cylinder(<0,0,0>, <0,0,1.8>, 0.6, 0.3, 0) texture{T2} scale 1.5 translate<1.5,-2,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 } }
//-------------------- Fig.14.9-5b Round_Cylinder #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 } background {color rgb<1,1,0.9>*0.9 } //-----------------------------camera - light camera{ location <60,50,10> sky <0, 0, 1> right <-image_width/image_height,0,0> look_at <-1.2, 1, -0.4> angle 5.8 } light_source{ <200,400, 300> color rgb 1.5} //==================================== Round_Cylinder object{ Round_Cylinder( <0,0,0>,<0,4,0>,1,0.2,0 ) pigment{rgbf<0.7,1,1,0.5>*1.1} finish {phong 1} } sphere {<0,0,0> 0.1 pigment{ rgbf<1,0.6,>*0.8} } sphere {<0,4,0> 0.1 pigment{ rgbf<1,0.6,>*0.8} }

< Round_Cylinder の構文 >

object{ Round_Cylinder ( <A_Point> , <B_Point> , Radius , Edge_Radius , UseMerge ) [ OBJECT_MODIFIERS... ] }
object 物体のキーワード
Round_Cylinder 丸円柱
<A_Point> , <B_Point> A点、B点の x,y,z 座標
Radius 円柱の半径
Edge_Radius 円柱の丸み(トーラスの半径)
UseMerge マージの使用: 無 0 、有 1
OBJECT_MODIFIERS... 物体の変形・テクスチャなどの設定

 


14.9-6 丸コーン[Round_Cone]

丸コーンは 角が丸い円錐・円錐台で、円錐と2つのトーラスから構成されている。

図14.9-6a 丸コーン[Round_Cone]

下図14.9-6b に示すように、丸コーンはA点とB点で指定する位置に生成される。

図14.9-6b 丸コーンの位置座標

//-------------------- Fig.14.9-6a Round_Cone #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} //==================================== Round_Cone #declare T1= texture{pigment{color rgb<0.85,0.65,0.5>*1.2} finish{phong 1} } #declare T2= texture{pigment{MediumGoldenrod*1.2} finish {phong 1} normal{ bumps 0.3 scale 0.01} } texture{Peel scale 0.3 finish{phong 1} rotate x*90} object{ Round_Cone(<0,0,0>,1,<0,0,2.5>,0.6,0.1,0) texture{T1} scale 1 translate<-1.5,-1.5,0> } object{ Round_Cone(<0,0,0>,1,<0,0,2.5>,0.6,0.4,0) texture{T2} scale 1.1 translate<1.3,-2,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 } }
//-------------------- Fig.14.9-6b Round_Cone #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 } background {color rgb<1,1,0.9>*0.9 } //-----------------------------camera - light camera{ location <60,50,10> sky <0, 0, 1> right <-image_width/image_height,0,0> look_at <0, 1, -0.4> angle 5.8 } light_source{ <200,400,300> color rgb 1.5} //==================================== Round_Cone object{ Round_Cone( <0,0,0>,1.5,<0,3,0>,0.6,0.2,0 ) pigment{rgbf<0.7,1,1,0.5>*1.1} finish{phong 1} } sphere {<0,0,0> 0.1 pigment{ rgbf<1,0.6,>*0.8} } sphere {<0,3,0> 0.1 pigment{ rgbf<1,0.6,>*0.8} }

< Round_Cone の構文 >

object{ Round_Cone ( <A_Point> , A_Radius , <B_Point> , B_Radius , Edge_Radius , UseMerge ) [ OBJECT_MODIFIERS... ] }
object 物体のキーワード
Round_Cone 丸コーン
<A_Point> A点の x,y,z 座標
A_Radius A点の半径
<B_Point> B点の x,y,z 座標
B_Radius B点の半径
Edge_Radius コーンの丸み(トーラスの半径)
A点やB点の半径より小さくする。
UseMerge マージの使用: 無 0 、有 1
OBJECT_MODIFIERS... 物体の変形・テクスチャなどの設定

 


14.9-7 丸コーン2[Round_Cone2]

丸コーン2は 角が丸い円錐・円錐台で、円錐と2つの球から構成されている。

図14.9-7a 丸コーン2[Round_Cone2]

下図14.9-7b に示すように、丸コーン2はA点とB点で指定する位置に生成される。

図14.9-7b 丸コーン2の位置座標

//-------------------- Fig.14.9-7a Round_Cone2 #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} //===================================== Round_Cone2 #declare T1=texture{pigment{OrangeRed} finish{phong 1} } #declare T2=texture{pigment{rgb<1,1,0.6>} finish{phong 1} normal{crackle 2 form <0.4,0,0> scale 0.2} } object{ Round_Cone2( <0,0,0>,0.2,<0,0,2>,0.8,0) texture{T1} scale 1 translate<-1.5,-1.5,0> } object{ Round_Cone2( <0,0,0>,1,<0,0,2>,0.6,0 ) texture{T2} scale 1.1 translate<1.2,-1.5,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 } }
//-------------------- Fig.14.9-7b Round_Cone2 #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 } background {color rgb<1,1,0.9>*0.9 } //-----------------------------camera - light camera{ location <60,0,10> sky <0, 0, 1> right <-image_width/image_height,0,0> look_at <-2,0.5,-0.4> angle 5.8 } light_source{ <200,400,300> color rgb 1.5} //====================================== Round_Cone2 object{ Round_Cone2( <0,0,0>,1,<0,2,0>,0.4,0 ) pigment{ rgbf<0.7,1,1,0.5>*1.1} finish{phong 1} } sphere {<0,0,0> 0.1 pigment{ rgbf<1,0.6,>*0.8} } sphere {<0,2,0> 0.1 pigment{ rgbf<1,0.6,>*0.8} }

< Round_Cone2 の構文 >

object{ Round_Cone2 ( <A_Point> , A_Radius , <B_Point> , B_Radius , UseMerge ) [ OBJECT_MODIFIERS... ] }
object 物体のキーワード
Round_Cone2 丸コーン2
<A_Point> A点 x,y,z 座標
A_Radius A点の球半径
<B_Point> B点の x,y,z 座標
B_Radius B点の球半径
UseMerge マージの使用: 無 0 、有 1
OBJECT_MODIFIERS... 物体の変形・テクスチャなどの設定


(End) 14.9 形状1

▷ 次の「14.10 形状2」へ