Last updated: March 2008. Kajiyama             [ 目次に戻る ]

平行移動・回転移動で立体図形を作る box03.pov box04.pov


サンプル box03.pov

//box03.pov
// POV-Ray 3.6 scene file by Kajiyama

#include "colors.inc"
#include "shapes.inc"

//カメラ設定
camera{
    location < 20,20,-25>
    look_at <3,3,3>
    angle 30
}
//ライト設定
light_source{
    <-15,20,-20> color White*1.6
}

// XYZ座標空間
// チェック柄の床
//object{
//    Plane_XZ
//    pigment{checker color Gray color White*0.9}
//    translate <0,0,0>
//}

// 座標系の表示
// Z軸
cylinder{<0,0,-5>,<0,0,7>,0.05
pigment{color Red}
finish{phong 1 reflection 0.1}
}
cone{<0,0,7>,0.3
<0,0,8.5>,0
pigment{color Red}
}
// Z文字
cylinder{<-0.5,0.5,0>,<0.5,0.5,0>,0.08
pigment{color Red}
finish{phong 1 reflection 0.1}
translate <0,1.1,9>
}
cylinder{<0.5,0.5,0>,<-0.5,-0.5,0>,0.08
pigment{color Red}
finish{phong 1 reflection 0.1}
translate <0,1.1,9>
}
cylinder{ <-0.5,-0.5,0>, <0.5,-0.5,0>,0.08
pigment{color Red}
finish{phong 1 reflection 0.1}
translate <0,1.1,9>
}
// X軸
cylinder{<-5,0,0>,<9,0,0>,0.05
pigment{color Green}
finish{phong 1 reflection 0.1}
}
cone{<9,0,0>,0.3
<10.5,0,0>,0
pigment{color Green}
}
// X文字
cylinder{<-0.5,-0.5,0>,<0.5,0.5,0>,0.08
pigment{color Green}
finish{phong 1 reflection 0.1}
rotate y*90
translate <9,1.1,0>
}
cylinder{ <-0.5,0.5,0>, <0.5,-0.5,0>,0.08
pigment{color Green}
finish{phong 1 reflection 0.1}
rotate y*90
translate <9,1.1,0>
}

// Y軸
cylinder{<0,-5,0>,<0,7,0>,0.05
pigment{color Blue}
finish{phong 1 reflection 0.1}
}
cone{<0,7,0>,0.3
<0,8.5,0>,0
pigment{color Blue}
}
// Y文字
cylinder{<-0.5,0.5,0>,<0,0,0>,0.08
pigment{color Blue}
finish{phong 1 reflection 0.1}
translate <0,9,0>
}
cylinder{<0.5,0.5,0>,<0,0,0>,0.08
finish{phong 1 reflection 0.1}
translate <0,9,0>
}
cylinder{ <0,0,0>, <0,-0.5,0>,0.08
pigment{color Blue}
finish{phong 1 reflection 0.1}
translate <0,9,0>
}

//■■■ボックスの図形操作■■■
box{<0,0,0>,<1,6,1>
pigment{color Red} //オリジナル
}
//平行移動
box{<0,0,0>,<1,6,1>
pigment{color rgb<0.7,0.8,0.7>}
translate <6,0,0> //オリジナルの平行移動
}
box{<0,0,0>,<1,6,1>
pigment{color rgb<0.7,0.8,0.7>}
translate <0,0,6> //オリジナルの平行移動
}
box{<0,0,0>,<1,6,1>
pigment{color rgb<0.7,0.8,0.7>}
translate <6,0,6> //オリジナルの平行移動
}
//回転+平行移動
box{<0,0,0>,<1,6,1>
pigment{color rgb<0.5,0.8,0.4>}
translate <0,0,-1> //オリジナルの平行移動
rotate x*90 //X軸に回転移動
}
box{<0,0,0>,<1,6,1>
pigment{color rgb<0.5,0.8,0.4>}
translate <0,0,-1> //オリジナルの平行移動
rotate x*90 //X軸に回転移動
translate <6,0,0> //平行移動
}
box{<0,0,0>,<1,6,1>
pigment{color rgb<0.5,0.8,0.4>}
translate <0,0,-1> //オリジナルの平行移動
rotate x*90 //X軸に回転移動
translate <6,5,0>
}
box{<0,0,0>,<1,6,1>
pigment{color rgb<0.5,0.8,0.4>}
translate <0,0,-1> //平行移動
rotate x*90 //X軸に回転移動
translate <0,5,0>
}
//回転+平行移動
box{<0,0,0>,<1,6,1>
pigment{color rgb<0.5,0.8,0.8>}
translate <-1,0,0> //オリジナルの平行移動
rotate z*-90 //Z軸に回転移動
}
box{<0,0,0>,<1,6,1>
pigment{color rgb<0.5,0.8,0.8>}
translate <-1,0,0> //オリジナルの平行移動
rotate z*-90 //Z軸に回転移動
translate <0,5,0> //平行移動
}
box{<0,0,0>,<1,6,1>
pigment{color rgb<0.5,0.8,0.8>}
translate <-1,0,0> //オリジナルの平行移動
rotate z*-90 //Z軸に回転移動
translate <0,0,6> //平行移動
}
box{<0,0,0>,<1,6,1>
pigment{color rgb<0.5,0.8,0.8>}
translate <-1,0,0> //オリジナルの平行移動
rotate z*-90 //Z軸に回転移動
translate <0,5,6> //平行移動
}

background{color White}

サンプル box04.pov

//box04.pov
// POV-Ray 3.6 scene file by Kajiyama

#include "colors.inc"
#include "shapes.inc"

//カメラ設定
camera{
    location < 20,20,-25>
    look_at <3,3,3>
    angle 30
}
//ライト設定
light_source{
    <20,30,-10> color White*1.8
}

// XYZ座標空間
// チェック柄の床
object{
    Plane_XZ
    pigment{checker color Gray color White*0.9}
    translate <0,0,0>
}

// 座標系の表示
// Z軸
cylinder{<0,0,-5>,<0,0,7>,0.05
pigment{color Red}
finish{phong 1 reflection 0.1}
}
cone{<0,0,7>,0.3
<0,0,8.5>,0
pigment{color Red}
}
// Z文字
cylinder{<-0.5,0.5,0>,<0.5,0.5,0>,0.08
pigment{color Red}
finish{phong 1 reflection 0.1}
translate <0,1.1,9>
}
cylinder{<0.5,0.5,0>,<-0.5,-0.5,0>,0.08
pigment{color Red}
finish{phong 1 reflection 0.1}
translate <0,1.1,9>
}
cylinder{ <-0.5,-0.5,0>, <0.5,-0.5,0>,0.08
pigment{color Red}
finish{phong 1 reflection 0.1}
translate <0,1.1,9>
}
// X軸
cylinder{<-5,0,0>,<9,0,0>,0.05
pigment{color Green}
finish{phong 1 reflection 0.1}
}
cone{<9,0,0>,0.3
<10.5,0,0>,0
pigment{color Green}
}
// X文字
cylinder{<-0.5,-0.5,0>,<0.5,0.5,0>,0.08
pigment{color Green}
finish{phong 1 reflection 0.1}
rotate y*90
translate <9,1.1,0>
}
cylinder{ <-0.5,0.5,0>, <0.5,-0.5,0>,0.08
pigment{color Green}
finish{phong 1 reflection 0.1}
rotate y*90
translate <9,1.1,0>
}

// Y軸
cylinder{<0,-5,0>,<0,7,0>,0.05
pigment{color Blue}
finish{phong 1 reflection 0.1}
}
cone{<0,7,0>,0.3
<0,8.5,0>,0
pigment{color Blue}
}
// Y文字
cylinder{<-0.5,0.5,0>,<0,0,0>,0.08
pigment{color Blue}
finish{phong 1 reflection 0.1}
translate <0,9,0>
}
cylinder{<0.5,0.5,0>,<0,0,0>,0.08
finish{phong 1 reflection 0.1}
translate <0,9,0>
}
cylinder{ <0,0,0>, <0,-0.5,0>,0.08
pigment{color Blue}
finish{phong 1 reflection 0.1}
translate <0,9,0>
}

//■■■ボックスの図形操作■■■
box{<0,0,0>,<1,7,1>
pigment{color Red} //オリジナル
}

//平行移動
box{<0,0,0>,<1,7,1>
pigment{color rgb<0.7,0.8,0.7>}
translate <3,0,3> //オリジナルの平行移動
}
//回転+平行移動
box{<0,0,0>,<1,7,1>
pigment{color rgb<0.5,0.8,0.4>}
translate <0,0,-1> //オリジナルの平行移動
rotate x*90 //X軸に回転移動
translate <3,3,0> //オリジナルの平行移動
}

//回転+平行移動
box{<0,0,0>,<1,7,1>
pigment{color rgb<0.5,0.8,0.8>}
translate <-1,0,0> //オリジナルの平行移動
rotate z*-90 //Z軸に回転移動
translate <0,3,3> //オリジナルの平行移動
}

background{color White}


[ 目次に戻る ]