## POV-Ray: 集合演算

### 立方体と球と setop1.pov

 setop1.pov #include "colors.inc" #include "shapes.inc" #include "stones.inc" #include "komuro.inc" camera { location <5,5,-10> look_at <0,0,0> angle 20 } light_source { <0,10,-10> color White } object { XYZaxis } object { Cube pigment { color Yellow } rotate <0,45,0> } object { Sphere pigment {color Red} translate <0,1,-1> } 

### 和 (union) setop2.pov

 setop2.povへの変更 *** setop1.pov Wed Oct 7 09:21:30 2020 --- setop2.pov Wed Oct 7 09:21:30 2020 *************** *** 13,26 **** object { XYZaxis } ! object { ! Cube ! pigment { color Yellow } ! rotate <0,45,0> ! } ! ! object { ! Sphere ! pigment {color Red} ! translate <0,1,-1> } --- 13,27 ---- object { XYZaxis } ! union { ! object { ! Cube ! pigment { color Yellow } ! rotate <0,45,0> ! } ! object { ! Sphere ! pigment {color Red} ! translate <0,1,-1> ! } } 

### 差(difference) setop3.pov

 setop3.povへの変更 *** setop2.pov Wed Oct 7 09:21:30 2020 --- setop3.pov Wed Oct 7 09:21:30 2020 *************** *** 13,19 **** object { XYZaxis } ! union { object { Cube pigment { color Yellow } --- 13,19 ---- object { XYZaxis } ! difference { object { Cube pigment { color Yellow } 

### 積(intersection) setop4.pov

 setop4.pov *** setop3.pov Wed Oct 7 09:21:30 2020 --- setop4.pov Wed Oct 7 09:21:30 2020 *************** *** 13,19 **** object { XYZaxis } ! difference { object { Cube pigment { color Yellow } --- 13,19 ---- object { XYZaxis } ! intersection { object { Cube pigment { color Yellow } 

### 集合演算の使用例

#### 球を配置する work01.pov

 work01.pov #include "colors.inc" #include "shapes.inc" #include "woods.inc" camera { location <10,5,10> look_at <0,0,0> angle 10 } light_source { <30,20,15> color White*2 } object { Sphere texture { T_Wood7 } } 

#### 変形する work02.pov

 work02.povへの変更 *** work01.pov Wed Oct 7 09:21:30 2020 --- work02.pov Wed Oct 7 09:21:30 2020 *************** *** 13,16 **** --- 13,17 ---- object { Sphere texture { T_Wood7 } + scale <0.025, 0.1, 1> } 

#### いらない部分を切る work03.pov

 work03.povへの変更 *** work02.pov Wed Oct 7 09:21:30 2020 --- work03.pov Wed Oct 7 09:21:30 2020 *************** *** 10,17 **** <30,20,15> color White*2 } ! object { ! Sphere ! texture { T_Wood7 } ! scale <0.025, 0.1, 1> } --- 10,20 ---- <30,20,15> color White*2 } ! difference { ! object { ! Sphere ! texture { T_Wood7 } ! scale <0.025, 0.1, 1> ! } ! object { Plane_XY } } 

#### 回転する work04.pov

 work04.povへの変更 *** work03.pov Wed Oct 7 09:21:30 2020 --- work04.pov Wed Oct 7 09:21:30 2020 *************** *** 17,20 **** --- 17,21 ---- scale <0.025, 0.1, 1> } object { Plane_XY } + rotate <-30,0,0> }