eradiate.scenes.illumination.SpotIllumination#
- class eradiate.scenes.illumination.SpotIllumination(id='illumination', origin=NOTHING, target=NOTHING, up=NOTHING, beam_width=<Quantity(10.0, 'degree')>, intensity=1.0, beam_profile=None)[source]#
Bases:
Illumination
Spot illumination scene element [
spot
].Eradiate ships a beam texture that implements a gaussian beam profile with three standard deviations included in the total beam width. This texture is named
gaussian_3sigma.bmp
and can be used by retrieving the path to the file using eradiate.data.data_store.fetch().- Parameters:
id (
str
, optional, default:"illumination"
) – Identifier of the current scene element.origin (array-like, default:
[1
,1
,1] m
) – A 3-vector specifying the position of the spot.Unit-enabled field (default: ucc[‘length’]).
target (array-like, default:
[0
,0
,0] m
) – Point location targeted by the spot.Unit-enabled field (default: ucc[‘length’]).
up (array-like, default:
[0
,0
,1]
) – A 3-vector specifying the up direction of the spot. This vector must be different from the spots’s pointing direction, which is given bytarget - origin
.beam_width (
quantity
orfloat
, default:10°
) – Spot light beam width.Unit-enabled field (default: degree).
intensity (
Spectrum
ordict
orfloat
, default:1.0 ucc[intensity]
) – Emitted power in the plane orthogonal to the illumination direction. Must be an intensity spectrum (in W/sr/nm or compatible unit). Can be initialized with a dictionary processed bySpectrumFactory.convert()
.beam_profile (path-like) – Path to the file describing the beam profile. Must be a valid bitmap image file.
- Fields:
origin (
quantity
) – A 3-vector specifying the position of the spot.target (
quantity
) – Point location targeted by the spot.up (array) – A 3-vector specifying the up direction of the spot.
beam_width (
quantity
) – Spot light beam width.intensity (
Spectrum
) – Emitted power in the plane orthogonal to the illumination direction.beam_profile (
Path
) – Path to the file describing the beam profile.
- classmethod from_size_at_target(target, direction, spot_radius, beam_width, **kwargs)[source]#
Create a
SpotIllumination
which illuminates a region of a specified size around the target point.The illuminated area is a circle defined by the spot radius around the target point in the plane orthogonal to the spot direction. The spot origin is inferred from the spot radius and a beam width value (in angle units): the spot origin will be positioned closer to the target point as the beam width increases and further from the target point as the beam width decreases.
- Parameters:
target (array-like) – Target point for the spot. Unitless values are converted to
ucc['length']
.direction (array-like) – Pointing direction for the spot, towards target.
spot_radius (
float
orquantity
) – Radius of the desired spot at the target position. Unitless values are converted toucc['length']
.beam_width (
float
orquantity
) – Divergence angle of the spot. Unitless values are converted toucc['angle']
.**kwargs – Remaining keyword arguments are forwarded to the
SpotIllumination
constructor.
- Returns:
- traverse(callback)#
Traverse this scene element and collect kernel dictionary template and parameter update map contributions.
- Parameters:
callback (
SceneTraversal
) – Callback data structure storing the collected data.
- update()#
Enforce internal state consistency. This method should be called when fields are modified. It is automatically called as a post-init step.
- property objects#
Map of child objects associated with this scene element.
- Returns:
dict
– A dictionary mapping object names to a corresponding object to be inserted in the Eradiate scene graph.
- property params#
- Returns:
dict[str
,UpdateParameter
] orNone
– A dictionary mapping parameter paths, consisting of dot-separated strings, to a corresponding update protocol.
See also
- property template#
Kernel dictionary template contents associated with this scene element.
- Returns:
dict
– A flat dictionary mapping dot-separated strings describing the path of an item in the nested scene dictionary to values. Values may be objects which can be directly used by themitsuba.load_dict()
function, orInitParameter
instances which must be rendered.
See also