pyoptools.raytrace.shape.polygon module¶
- class pyoptools.raytrace.shape.polygon.Polygon¶
Bases:
Shapeclass 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.
- limits()¶
Returns the minimum limits for the aperture
- pointlist()¶
Generate a list of points that adequately sample the shape.
This method should return a tuple (X, Y) where X contains the X coordinates of the points and Y contains the Y coordinates. The points must be sampled adequately to be used as vertices for generating the triangles required to plot the surface defined by (X, Y, self.topo(X, Y)).
The method must be implemented in each subclass to ensure that the sampling is appropriate for the specific shape.
- Returns:
A tuple (X, Y) where X is a list of X coordinates and Y is a list of Y coordinates, sampled adequately for surface plotting.
- Return type:
tuple of lists
- Raises:
NotImplementedError – If this method is not implemented in a subclass, an error is raised indicating that the method must be overloaded.
- samples¶