超二次曲面 superellipsoid
分かりやすく"なめらかな立方体"と書きましたが、正確には超二次曲面といいます。
superellipsoid { <0.25,0.25> }
0.25と指定してる部分は座標ではありません。ここの値を同じにすると角がなめらかな立方体になります。
0〜1の範囲内だと通常の立方体になり、手前の値を1にすると円柱になります。
値は1に近いほどなめらかになり、1以上の数字になると内側に引っ張られたような形になります。
違う値にすると変わった形になります。以下で例を示します
#include "colors.inc"
#include "shapes.inc"
#include "textures.inc"
camera { location<10,20,-30> look_at<0,0,0> }
light_source { <40,40,-40> color rgb 1 }
plane { y,0 pigment { checker color Black, color Gray10 } scale 10 }
superellipsoid { <0.5,0.5> scale 3 translate<0,3,-10>
material { M_Dark_Green_Glass } }
//中央下
superellipsoid { <0.25,0.25> scale 3 translate<0,6,0>
material { M_Dark_Green_Glass } }
//中央真ん中
superellipsoid { <0.1,0.1> scale 3 translate<0,11,10>
material { M_Dark_Green_Glass } }
//中央上
superellipsoid { <1.0,0.3> scale 3 translate<-10,3,-10>
material { M_Vicks_Bottle_Glass } }
//左下
superellipsoid { <1.5,0.5> scale 3 translate<-10,6,0>
material { M_Vicks_Bottle_Glass } }
//左中
superellipsoid { <1.5,1> scale 3 translate<-10,11,10>
material { M_Vicks_Bottle_Glass } }
//左上
superellipsoid { <0.3,2> scale 3 translate<10,3,-10> pigment { color Cyan } }
//右下
superellipsoid { <0.25,5> scale 3 translate<10,6,0> pigment { color Cyan } }
//右中
superellipsoid { <5,0.25> scale 3 translate<10,11,10> pigment { color Cyan } }
//右上
