pyoptools.raytrace.surface.cylinder module

Module that defines a class to describe cylindrical surfaces

class pyoptools.raytrace.surface.cylinder.Cylinder

Bases: pyoptools.raytrace.surface.surface.Surface

Class to define cylinder shaped surfaces.

Description:

Cylinder is a class to define a tube or a hollow cylinder surface.

To define the cylinder surface you should pass the radius of the cylinder, and its length

The center of the cylinder is located at the origin of coordinates (0, 0, 0) and its length is parallel to the Z axis.

Example

>>> cs=Cylinder(radius=5.,length=10.)

See Surface documentation for other options

intersection()

Point of intersection between a ray and the cylinder

This method returns the point of intersection between the surface and the ray. This intersection point is calculated in the coordinate system of the surface.

iray – incident ray

iray must be in the coordinate system of the surface

Note: Because of the way the cylinder is defined, it does not use shapes to define its boundary, for that reason, the intersection method and not the _intersection method was overloaded.

length
normal()

Normal vector at the point int_p.

This method returns the normal vector at a specific intersection point, given by int_p.

polylist()

Because this is a closed surface, the method had to be overloaded

radius