<< obj読み込み 戻る placecam.c >>

NVIDIA Gelato 平面状で反射する直線

POV−Rayと数学の関連を紹介しているサイトを参考にしました。
「数学のいずみ」http://izumi-math.jp/sanae/Pov_Ray/Pov_Ray.htm
くりかえし処理whileを使ってTranslateを変更していきました。
連続した球体が生成されます。
勉強になります。ありがとうございます。
sphere_hansya.jpg

#sphere_hansya.pyg
Output ("sphere_hansya.tif", "tiff", "rgb", "camera", "float gain", 1, "float gamma",
1, "string filter", "gaussian", "float[2] filterwidth", (2, 2))
Attribute ("float shadingquality",1.2)
Attribute ("string projection", "perspective")
Attribute ("float fov", 30)
Attribute ("int[2] resolution", (640, 480))
#placecam 0 10 -60 0 0 0
Rotate (-9.46, 1.00, 0.00, 0.00)
Translate (0.00, -10.00, 60.00)

Attribute ("string geometryset", "+shadows")
Attribute ("string geometryset", "+reflection")

World ()
Light ( "light0", "ambientlight", "float intensity", 0.3 )
Light ("light1", "pointlight", "float intensity", 400, "point from", (0, 20, -10),"string shadowname", "shadows")
Light ("light2", "pointlight", "float intensity", 400, "point from", (5, 0, -10),"string shadowname", "shadows")

PushTransform ()
Attribute ("color C", (0.2, 0.4, 0.75))
Sphere (100, -100, 100, 360)
PopTransform ()

MyCounter = -5
while (MyCounter <= 5):
PushTransform ()
Attribute ("color C", (1, 1, 1))
Shader ( "surface", "metal","string envname","reflection" )
Translate ( 2*MyCounter+1, abs(3*MyCounter+2),4*MyCounter+3)
Sphere (0.8, -0.8, 0.8, 360)
PopTransform ()
MyCounter = MyCounter + 0.5


Attribute ("color C", (1, 1, 1))
Rotate (90.00, 1.00, 0.00, 0.00)
Scale (10,10,10)
ShaderGroupBegin ()
Attribute ("color C", (1, 1, 0))
Shader ("surface", "checker", "checklayer","float stilesize",0.1,"float ttilesize",0.1,"color color2", ( 0, 0, 1 ))
Shader ("surface", "plastic", "plasticlayer")
ConnectShaders ("checklayer", "Cout", "plasticlayer", "C")
ConnectShaders ("checklayer", "fout", "plasticlayer", "Ks")
ShaderGroupEnd ()
Input("PlaneGeom.rib")
Render()
  • -
  • -

<< obj読み込み 戻る placecam.c >>