rays¶
This module defines a class for representing rays in GIANT, a function to generate them from a camera model, and the numpy structured data type used to store the results of a ray trace.
Description¶
In GIANT, A Rays
is used in ray tracing to intersect with a surface. It is defined fully by a start, a
direction, and an inverse direction (1/direction). Rays are defined to be efficient in GIANT, making use of numpy
broadcasting so that you can efficiently have a single start for many directions or many starts for a single direction,
and also support translation and rotation like other ray tracer objects.
Use¶
Rays are used frequently in GIANT. They’re pretty simple to create (simply provide the start and direction as numpy
arrays) and can be directly created for pixels from a camera in the camera frame using compute_rays()
. Once
they’re created they can be used for tracing shapes
, KDTree
, Scene
, and
SceneObject
and for generating illumination inputs. In addition, you can ignore certain facets (for surfaces)
or entire solids when tracing rays, using the ignore
attribute of the Rays
class. The format that
the ids for the ignore attribute take are somewhat complicated, so be sure to read the documentation carefully if you
are planning to use this feature.
Classes
A class to store/manipulate rays. |
Functions
Compute rays passing through the given row, col pairs for the given camera in the camera frame. |
Constants
The numpy datatype returned when rays are traced with a |