pyoptools.raytrace.shape.polygon module¶
Module that defines the Triangular class
-
class
pyoptools.raytrace.shape.polygon.
Polygon
(coord=((0, 0), (0, 100), (100, 0)), samples=10, *args, **kwargs)¶ Bases:
pyoptools.raytrace.shape.shape.Shape
class defining a polygonal shape
- Args:
- coords (tuple): Tuple containing the coordinates of the 3 corners
- of a triangle. Each coordinate is a(float, float) tuple.
- samples (int): Number of subdivitions per side used to sample the
- triangle.
Todo
- This class is a copy of the Triangular class. Need to be implemented correctly.
-
coord
¶
-
fhit
(self, double px, double py, double pz) → bool¶ This method returns TRUE if an p=(x,y,z)point is inside the surface aperture if not it must return FALSE. This is implemented for a point, in cython, to make it fast
-
hit
(self, p)¶ Method that returns True if a p=(x,y,z) point is inside the triangle, if not it returns False. taken from http://www.blackpawn.com/texts/pointinpoly/default.html
-
limits
(self)¶ Returns the minimum limits for the aperture
-
pointlist
(self)¶
-
samples
¶