本文整理汇总了Python中World.camera方法的典型用法代码示例。如果您正苦于以下问题:Python World.camera方法的具体用法?Python World.camera怎么用?Python World.camera使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类World
的用法示例。
在下文中一共展示了World.camera方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: World
# 需要导入模块: import World [as 别名]
# 或者: from World import camera [as 别名]
from World import *
import time
NUMRAYS = 0
world = World()
world.build(128, 128, 1)
#Set up Camera
eye = Point(0, 0, -25)
lookat = Vector(0, 0, 1)
ra = 0
up = Vector(0, 1, 0)
cam = PerspectiveCamera(eye, lookat, ra, up)
world.camera = cam
#Colors
red = Color(1.0, 0, 0)
green = Color(0, 1.0, 0)
blue = Color(0, 0, 1.0)
white = Color(1.0, 1.0, 1.0)
grey = Color(0.5, 0.5, 0.5)
Sred = RegularSurface(red)
Sgrey = RegularSurface(grey)
Sgreen = RegularSurface(green)
Sblue = RegularSurface(blue)
Swhite = RegularSurface(white)
r_sample = Regular(25, 83)
#Materials