Surface

giant.ray_tracer.shapes.surface:

class giant.ray_tracer.shapes.surface.Surface

This defines the basic interface expected of all surfaces in GIANT.

In GIANT, a surface is considered anything that is represented by tesselation. As such, it has a few distinguishing characteristics. (1) limbs are found iteratively instead of analytically, (2) the limb jacobian is approximated, and (3) we have a reference_ellipsoid which is the best fit ellipsoid to the surface used for approximating that jacobian. This class makes these distinctions explicit.

You cannot directly use this class in GIANT (it doesn’t even have an init method). Instead, you should either use it for instance checks (all surfaces and surface acceleration structures inherit from this class) or you should subclass it in you adding a new surface. When you do subclass you should no longer have to worry about implementing methods find_limbs() or compute_limb_jacobian() as they are already implemented for you. In general you should only directly inherit from this if you are defining a new surface acceleration structure. If you are defining a new surface in general you should instead from Surface32 or Surface64 which subsequently inherit from this class.

bounding_box: AxisAlignedBoundingBox

The AxisAlignedBoundingBox that fully contains this solid.

reference_ellipsoid: Ellipsoid

The Ellipsoid that best represents the surface.

Summary of Methods

compute_intersect

This method computes the intersects between a single ray and the surface describe by this object.

compute_limb_jacobian

This method computes the linear change in the limb location given a change in the relative position between the surface and the observer.

find_limbs

This method determines the limb points for a surface (visible edge of the surface) that would be visible for an observer located at observer_position looking toward scan_center_dir along the directions given by scan_dirs.

rotate

This method rotates the shape in place.

trace

This python method provides an easy interface to trace a number of Rays through the surface.

translate

This method translates the shape in place.