Surfaces in pyOpTools

The basic object to create optical components in pyOpTools are the surfaces. They are used to define the border that separates 2 materials (for example air-glass) in an optical component.

Bellow are some of the Surface Objects supported by pyOpTools.


In [ ]:
from pyoptools.all import *
from numpy import pi

Plane Surface

The Plane surface is the most simple surface class in the library. It is defined as an ideal infininite $XY$ plane, located at $Z=0$. To define the Plane limits, its constructor receives as an argument a sub-class of Shape. This sub-classes (Circular, Rectangular, Triangular, etc ) define the limits of the Surface (plane in this case).

Some Plane examples

Bellow are some examples of Plane surfaces limited by different shapes.


In [ ]:
P1=Plane(shape=Circular(radius=(25)))
Plot3D(P1,center=(0,0,0),size=(60,60),rot=[(0,0,0)],scale=6)

In [ ]:
P2=Plane(shape=Rectangular(size=(50,50)))
Plot3D(P2,center=(0,0,0),size=(60,60),rot=[(0,0,0)],scale=6)

In [ ]:
P3=Plane(shape=Triangular(coord=((0,25),(25,-25),(-25,-25))))
Plot3D(P3,center=(0,0,0),size=(60,60),scale=6)

Spherical Surface

The Spherical surface is another very usefull Class to define optical components. It is used to define an spherical cap that has its vertex located at the origin ($(0,0,0)$). The normal to the spherical cap at $X=0$ and $Y=0$ is the vector $(0,0,1)$. As it was the case with the Plane surface, it is used with a Shape subclass to define its edges.

Spherical surface limited by a circular shape example


In [ ]:
S=Spherical(curvature=1/200., shape=Circular(radius=145.),reflectivity=0)
Plot3D(S,center=(0,0,0),size=(400,400),scale=1)

Cylindrical Surface

pyOpTools has 2 different types of cylindrical surfaces. The first one is the Cylinder , that as its name sais define a closed cylinder. It is mainly used to define the border of a lens. For example a plano-convex lens can be defined as one circular-limited plane, one circular limited spherical surface, and one cylindrical surface.

bellow is an example of a cylindrical surface. Please note that this surface does not receive a Shape subclass.


In [ ]:
S3=Cylinder(radius=36,length=100,reflectivity=1)
Plot3D(S3,center=(0,0,0),size=(100,100),rot=[(0,pi/32,0)],scale=4)

The second class is the Cylindrical.


In [ ]:
S1=Cylindrical(shape=Rectangular(size=(50,100)),curvature=1/20.)
Plot3D(S1,center=(0,0,0),size=(150,150),rot=[(pi/4,0,0)],scale=2)

In [ ]:
S2=Cylindrical(shape=Circular(radius=(50)),curvature=1/100.)
Plot3D(S2,center=(0,0,0),size=(150,150),rot=[(-pi/4,0,0)],scale=2)

Aspherical Surface


In [ ]:
%%latex
$$Z=\frac{(Ax*x^2+Ay*y^2)}{(1+\sqrt{(1-(1+Kx)*Ax^2*x^2-(1+Ky)*Ay^2*y^2))}}+ poly2d()$$

In [ ]:
sa=Aspherical(shape=Rectangular(size=(5,5)),Ax=.2,Ay=.2,Kx=.1, Ky=.15, poly=poly2d((0,0,0,.5,0,.5)))
Plot3D(sa,center=(0,0,5),size=(10,10),rot=[(-3*pi/10,pi/4,0)],scale=40)

In [ ]:
sa=Aspherical(shape=Circular(radius=2.5),Ax=.2,Ay=.2,Kx=.1, Ky=.15, poly=poly2d((0,0,0,.5,0,.5)))
Plot3D(sa,center=(0,0,5),size=(10,10),rot=[(-3*pi/10,pi/4,0)],scale=40)

In [ ]:


In [ ]: