Hemisphere Volume Emitter
This example demonstrates how to create a hemisphere volume emitter. Detailed source models allow for volume emitters in the shape of spheres, cylinders and boxes but no default functionality for hemispheres. The approach for creating a hemisphere volume emitter is a mixture of GUI and scripting using the following steps:
1. Create a spherical volume emitter as a detailed source model using the ray position specification “Random Volume” and shape “Spheroid”. The ray directions specification in this example is “Random directions into a sphere”.
2. Create an embedded script which performs the following tasks:
a) Create the source rays as defined in (1) above
b) Loop over the existing rays in the buffer and convert their global position coordinates into local source coordinates
c) If a ray position is found with Z < 0 in source coordinates, switch the sign of the Z position
After the script has run, all ray positions will be in a hemisphere on the +Z side of the source. To verify this in the example file, run the embedded script and then go to Menu > Analyses > Visualization 3D Spot Diagram to draw the ray positions in the 3D view (the script resets the ray color for those rays which have been moved). Remember, you need to use the “Trace Existing” options after running this script so that you are tracing the rays that already exist in the buffer!
Download the FRED file: hemisphereVolumeEmitter.frd