本文整理匯總了Python中System.propagate方法的典型用法代碼示例。如果您正苦於以下問題:Python System.propagate方法的具體用法?Python System.propagate怎麽用?Python System.propagate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System
的用法示例。
在下文中一共展示了System.propagate方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: sphericalReflector
# 需要導入模塊: import System [as 別名]
# 或者: from System import propagate [as 別名]
def sphericalReflector() :
# source
ppos = [0,0,0]
pdir = [0,0,1]
s0 = Source("light source",Placement(ppos,pdir))
s0.exampleRays(0.04)
# spherical reflector
ppos = [0,0,0.20]
pdir = [0,0,1]
pdim = [0.05,0.05,0.01]
sr = SphericalSurface("spherical", Volume.circ,pdim,Placement(ppos,pdir),Material(Material.mirror,1.0),-0.10)
# plane stop
ppos = [0,0,0.1]
pdir = [0,0,-1]
pdim = [0.05,0.05,0.01]
ss = PlaneSurface("stop",Volume.circ,pdim,Placement(ppos,pdir),Material(Material.refract,1.0))
s = System()
s.append(s0)
s.append(sr)
s.append(ss)
r = s.propagate()
d = Display3D.Display3D(s,r)
d.Draw()