本文整理汇总了Python中Camera.focallength方法的典型用法代码示例。如果您正苦于以下问题:Python Camera.focallength方法的具体用法?Python Camera.focallength怎么用?Python Camera.focallength使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Camera
的用法示例。
在下文中一共展示了Camera.focallength方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: range
# 需要导入模块: import Camera [as 别名]
# 或者: from Camera import focallength [as 别名]
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")
ri.Declare("Light2" ,"string")
ri.Declare("Light3" ,"string")
ri.Declare("Ambient" ,"string")