Skip to content

Source objects

Olli Tapaninen edited this page Dec 10, 2015 · 1 revision

Source objects

Here is a list of types of ray sources supported by the raytracer. Sources require following parameters:

  • type: Type string. See below.
  • name: Unique name
  • rays: Number of rays to emit
  • wavelengths: Array of wavelengths in [nm].
  • intensities: Array of intensities for the corresponding wavelength [W/nm].
  • location: Array(3) Location of the source object. (Volume sources do not require this)
  • insideOf: ID of the object the source is inside of.

List of types of sources:

  • SurfaceNormal
  • IsotropicPoint
  • LambertianPoint
  • DirectionalPoint
  • IsotropicVolume
  • IsotropicConicalPointSource

Detailed desciptions

SurfaceNormal

Emits rays directly at surface normal direction from the source. Rays are directed outwards of the object.

Required:

  • attachedTo: Number 0-> indicating the surface the source is attached to.

IsotropicConicalPointSource

Emits rays from a point isotropically inside a conical sector. The opening angle can be defined.

Required:

  • direction: array(3) Indicates the direction the cone opens.
  • coneHalfAngle: Number(degrees) Opening angle of the cone.

Example Source

{
            "insideOf": "Air",
            "rays": 100000,
            "wavelengths": [
                450
            ],
            "intensities": [
                1 
            ],
            "direction": [
                0,
                0,
                -1
            ],
            "name": "Source1",
            "location": [
                0,
                0,
                0.05
            ],
            "type": "IsotropicConicalPointSource",
            "coneHalfAngle": 40
        }

Clone this wiki locally