In [ ]:
    
from pyoptools.all import *
    
In [ ]:
    
S0=Spherical(shape=Circular(radius=50),curvature=1./200.)
S1=Spherical(shape=Circular(radius=50),curvature=1./200.)
S2=Cylinder(radius=50,length=10)
    
In [ ]:
    
L1=Component(surflist=[(S0,(0,0,-5),(0,0,0)),
                       (S1,(0,0,5),(0,0,0)),
                       (S2,(0,0,6.5),(0,0,0))
                       ],material=schott["BK7"])
plot3D(L1,size=(120,120),scale=3,rot=[(pi/3,0,0)])
    
In [ ]:
    
width=50
height=50
reflectivity=0.5
        
a_face= Plane(shape=Rectangular(size=(width,height)))
b_face= Plane(shape=Rectangular(size=(width,height)))
h=sqrt(2.)*width
h_face= Plane (shape=Rectangular(size=(h,height)),reflectivity=reflectivity)
        
w2=width/2.
e1=Plane (shape=Triangular(((-w2,w2),(-w2,-w2),(w2,-w2))))
e2=Plane (shape=Triangular(((-w2,w2),(-w2,-w2),(w2,-w2))))
    
In [ ]:
    
P=Component(surflist=[(a_face,(0,0,-width/2),(0,0,0)),
                      (b_face,(width/2,0,0),(0,pi/2,0)),
                      (h_face,(0,0,0),(0,-pi/4,0)),
                      (e1,(0,height/2,0),(pi/2,-pi/2,0)),
                      (e2,(0,height/2,0),(pi/2,-pi/2,0))
                      ],material=schott["BK7"])
plot3D(P,size=(120,120),scale=3,rot=[(pi/6,pi/8,0)])
    
In [ ]:
    
def prisma(reflectivity=0):
    width=50
    height=50
    a_face= Plane(shape=Rectangular(size=(width,height)))
    b_face= Plane(shape=Rectangular(size=(width,height)))
    h=sqrt(2.)*width
    h_face= Plane (shape=Rectangular(size=(h,height)),reflectivity=reflectivity)
        
    w2=width/2.
    e1=Plane (shape=Triangular(((-w2,w2),(-w2,-w2),(w2,-w2))))
    e2=Plane (shape=Triangular(((-w2,w2),(-w2,-w2),(w2,-w2))))
    P=Component(surflist=[(a_face,(0,0,-width/2),(0,0,0)),
                      (b_face,(width/2,0,0),(0,pi/2,0)),
                      (h_face,(0,0,0),(0,-pi/4,0)),
                      (e1,(0,height/2,0),(pi/2,-pi/2,0)),
                      (e2,(0,height/2,0),(pi/2,-pi/2,0))
                      ],material=schott["BK7"])
    return P
P1=prisma()
P2=prisma(reflectivity=.5)
cube=System(complist=[(P1,(0,0,0),(0,0,0)),(P2,(0,0,0),(0,pi,0))],n=1.)
plot3D(cube,size=(120,120),scale=3,rot=[(pi/6,pi/8,0)])
    
In [ ]: