<< POV-Rayの回転 戻る これだけで大丈夫?「情報」におけるグラフィック1 >>

NVIDIA Gelatoでレンダリング

次のサイトを参考にして、組んでみました。
横浜国立大学教育人間科学部マルチメディア文化課程の西村研究室参考
http://nishimulabo.edhs.ynu.ac.jp/~povray/beginner/p4-14.html
情報B:POV-Rayが教材になるか?
http://arashi50.cocolog-nifty.com/blog/2008/04/bpovray_8e8d.html

nishimura_pov.jpg

#nishimura_pov.pyg
from math import *

Output ("nishimura_pov.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", 80)
Attribute ("int[2] resolution", (640, 480))
#placecam 0 6 -9 0 0 0
Rotate (-33.69, 1.00, 0.00, 0.00)
Translate (0.00, -6.00, 9.00)

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

World ()
Light ( "light0", "ambientlight", "float intensity", 0.2 )
Light ("light1", "pointlight", "float intensity", 1400, "point from", (-20, 20, -20),"string shadowname", "shadows")

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

PushTransform ()
Attribute ("color C", (1, 1, 1))
Shader ("surface", "metal", "string envname", "reflection",
"float Kd", 0.05, "float roughness", 0.1, "float Kr", 0.75,
"float Ka", 0.5,
# "float samples", 4, "float blur", 0.05,
"float twosided", 1
)
Sphere (2, -2, 2, 360)
PopTransform ()

T = -360
while (T <= 360):
PushTransform ()
Attribute ("color C", (0.001*T, 1-0.001*T, 0.8))
Shader ("surface", "plastic")
Rotate (T,0,1,0)
Translate (3.5,0.01*T,0)
Scale (1,0.5,3.5)
Input ("BoxGeom.rib")
PopTransform ()
T = T + 45


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

<< POV-Rayの回転 戻る これだけで大丈夫?「情報」におけるグラフィック1 >>