eradiate.scenes.biosphere.Canopy#

class eradiate.scenes.biosphere.Canopy(id='canopy', size=None)[source]#

Bases: eradiate.scenes.core.SceneElement, abc.ABC

An abstract base class defining a base type for all canopies.

Parameters
  • id (str, optional, default: "canopy") – User-defined object identifier.

  • size (array-like) – Canopy size as a 3-vector.

    Unit-enabled field (default: ucc[‘length’]).

Fields
  • id (str or None) – User-defined object identifier.

  • size (quantity) – Canopy size as a 3-vector.

abstract kernel_bsdfs(ctx)[source]#

Return BSDF plugin specifications only.

Parameters

ctx (KernelDictContext) – A context data structure containing parameters relevant for kernel dictionary generation.

Returns

dict – A dictionary suitable for merge with a KernelDict containing all the BSDFs attached to the shapes in the canopy.

abstract kernel_dict(ctx)#

Return a dictionary suitable for kernel scene configuration.

Parameters

ctx (KernelDictContext) – A context data structure containing parameters relevant for kernel dictionary generation.

Returns

KernelDict – Kernel dictionary which can be loaded as a Mitsuba object.

abstract kernel_shapes(ctx)[source]#

Return shape plugin specifications only.

Parameters

ctx (KernelDictContext) – A context data structure containing parameters relevant for kernel dictionary generation.

Returns

dict – A dictionary suitable for merge with a KernelDict containing all the shapes in the canopy.