本文整理汇总了Python中Camera.fov方法的典型用法代码示例。如果您正苦于以下问题:Python Camera.fov方法的具体用法?Python Camera.fov怎么用?Python Camera.fov使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Camera
的用法示例。
在下文中一共展示了Camera.fov方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: range
# 需要导入模块: import Camera [as 别名]
# 或者: from Camera import fov [as 别名]
ri.Sphere(1.0,-1.0,0,360)
ri.TransformEnd()
ri.TransformBegin()
ri.Color([0,0,1])
ri.Translate(-2,0,-1)
ri.Sphere(1.0,-1.0,0,360)
ri.TransformEnd()
ri.AttributeEnd()
ri = prman.Ri() # create an instance of the RenderMan interface
ri.Option("rib", {"string asciistyle": "indented"})
cam=Camera(Vector(0.0,0.0,-6,1),Vector(0,0,0,1),Vector(0,1,0,0))
cam.fov=50
depth =2.5
cam.fstop=8
cam.focallength=1.0
cam.focaldistance=depth
for frame in range(1,30) :
filename = "dof.%03d.rib" %(frame)
# this is the begining of the rib archive generation we can only
# make RI calls after this function else we get a core dump
ri.Begin(filename)
# ArchiveRecord is used to add elements to the rib stream in this case comments
# note the function is overloaded so we can concatinate output
ri.ArchiveRecord(ri.COMMENT, 'File ' +filename)
ri.ArchiveRecord(ri.COMMENT, "Created by " + getpass.getuser())
ri.ArchiveRecord(ri.COMMENT, "Creation Date: " +time.ctime(time.time()))
ri.Declare("Light1" ,"string")
示例2:
# 需要导入模块: import Camera [as 别名]
# 或者: from Camera import fov [as 别名]
ri.AttributeBegin()
ri.Color([1,1,1])
ri.Translate( 0,-1.0,0)
ri.Rotate(-90,1,0,0)
ri.Rotate(36,0,0,1)
ri.Scale(0.4,0.4,0.4)
ri.Surface("plastic")
ri.Geometry("teapot")
ri.AttributeEnd()
ri.TransformEnd()
ri = prman.Ri() # create an instance of the RenderMan interface
cam=Camera(Vector(4,0.2,4,1),Vector(0,0,0,1),Vector(0,1,0,0))
cam.fov=40
filename = "Camera.rib"
ri.Begin(filename)
ri.Declare("Light1" ,"string")
ri.Declare("Light2" ,"string")
ri.Declare("Light3" ,"string")
# now we add the display element using the usual elements
# FILENAME DISPLAY Type Output format
ri.Display("Camera.exr", "framebuffer", "rgba")
cam.Format(ri)
# now we start our world
示例3: range
# 需要导入模块: import Camera [as 别名]
# 或者: from Camera import fov [as 别名]
ri.Rotate( -10 ,0 ,1 ,0)
ri.Rotate( -10 ,0 ,1 ,0)
ri.MotionEnd()
ri.MotionBegin([0,1])
ri.Sphere( 0.15, -0.15, 0.15, 360)
ri.Sphere( 0.15, -0.15, 0.15, 360)
ri.MotionEnd()
ri.TransformEnd()
ri = prman.Ri() # create an instance of the RenderMan interface
cam=Camera(Vector(-18,0.0,-28,1),Vector(0,0,0,1),Vector(0,1,0,0))
cam.fov=22
for frame in range(0,180) :
filename = "MotionBlur.%03d.rib" %(frame)
ri.Begin(filename)
ri.Option("rib", {"string asciistyle": "indented"})
cam.Shutter(ri,0.0,1.0)
# now we add the display element using the usual elements
# FILENAME DISPLAY Type Output format
ri.Display("MotionBlur.%03d.exr"%(frame), "file", "rgba")
cam.Format(ri)
# now we start our world