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:
IlluminationSpot illumination scene element [
spot].- 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 (
quantityorfloat, default:10°) – Spot light beam width.Unit-enabled field (default: degree).
intensity (
Spectrumordictorfloat, 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,
optional*) – 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 (
PathorNone) – Path to the file describing the beam profile.
Notes
This illuminant can be applied a beam profile using a texture. Eradiate ships a Gaussian beam profile texture (3σ decay) as part of the
texture/coreresource. Once installed, this file can be accessed through the file resolver astexture/gaussian_3sigma.bmp.- classmethod from_size_at_target(target, direction, spot_radius, beam_width, **kwargs)[source]¶
Create a
SpotIlluminationwhich 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 (
floatorquantity) – Radius of the desired spot at the target position. Unitless values are converted toucc['length'].beam_width (
floatorquantity) – Divergence angle of the spot. Unitless values are converted toucc['angle'].**kwargs – Remaining keyword arguments are forwarded to the
SpotIlluminationconstructor.
- 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,SceneParameter] 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, orDictParameterinstances which must be rendered.
See also