- The "Module" feature allows making new tools by combining, specializing, or reparametrizing objects created by existing tools in this simulator.
- Imported modules will appear as tools in the "Other" category. Please select and click the blank space according to the order of the control point sequence (see "Specification").
- Imported modules are embedded in the data of the scene, so will not be automatically updated when the authors of the modules update them.

Fresnel Lens (`FresnelLens`)

Yi-Ting Tu

A Fresnel lens made from a half circle piece of glass. Modularized version of this Gallery example.
Control point sequence

1. The first endpoint of the lens
2. The second endpoint of the lens

Parameters

- `N_slice`: The number of slices
- `refIndex`: The refractive index of the lens

Continuous spectrum light source (`ContSpectrum`)

Yi-Ting Tu

A light source with a uniform continuous spectrum discretized with a given constant step. Only works when "Simulate Colors" is on.
Control point sequence

1. The origin of the rays
2. Determines the direction of the rays

Parameters

- `min`: The minimum wavelength
- `step`: The step of the wavelength
- `max`: The maximum wavelength
- `brightness`: The total brightness

Circular light source (`CircleSource`)

Yi-Ting Tu

A circle with uniform 180-degree point sources places along its circumference.
Control point sequence

1. The center of the circle

Parameters

- `r`: The radius of the circle
- `N`: The number of point sources
- `brightness`: The total brightness

Chaff (`Chaff`)

Stas Fainer, Yi-Ting Tu

A chaff of a rectangular shape consisting of random pieces of mirrors. Modularized version of this Gallery example.
Control point sequence

1. The top-left corner of the chaff
2. The bottom-right corner of the chaff

Parameters

- `N`: The number of mirrors in the chaff
- `L`: The length of the mirrors

Beam Expander (`BeamExpander`)

Yi-Ting Tu

The combination of two ideal lenses with the sum of their focal lengths equals their separation distance. They expand or reduce the diameter of a beam of collimated light. Modularized version of this Gallery example.
Control point sequence

1. The center of the first lens
2. The second point of the second lens
3. Determines the common focal point of the lenses

Ray Relay (`RayRelay`)

Stas Fainer, Yi-Ting Tu

A series of ideal identical lenses with focal length \(f\) and distance \(d\) between the lenses. A non-divergent ray trajectory is guaranteed if and only if \(d\leq 4f\). Modularized version of this Gallery example.
Control point sequence

1. The first endpoint of the first lens
2. The second endpoint of the first lens (should have the same \(x\) as the first point)

Parameters

- `f`: The focal length of the lenses
- `d`: The distance between the lenses
- `N`: The number of lenses

Optical Fiber (`OpticalFiber`)

josephernest, Yi-Ting Tu

Line-shaped optical fiber with given core and cladding thickness and refractive indices.
Control point sequence

1. The first endpoint of the optical fiber
2. The second endpoint of the optical fiber (should have the same \(y\) as the first point)

Parameters

- `X`: The thickness of the core
- `Y`: The thickness of the cladding
- `n_1`: The refractive index of the core
- `n_2`: The refractive index of the cladding

## Customization

Modules can be made or customized directly within the web app using the built-in JSON editor. See the tutorial. Customization of imported modules will only affect the current scene.

## Contribution

Contributing to the list above is welcome. To contribute your module, see Contributing modules.