Navigation: Scripting Reference Manual > Script Examples > Example - Basic Raytrace

 

Example - Basic Raytrace

 

Contact Us: fredsupport@photonengr.com

 

These examples cover the FRED Basic Raytrace scripting commands:

"Create" - create sources,

"Delete" - delete rays from existing sources,

"Trace" - controls creation, tracing and drawing of rays.

 

The structures listed below contain the parameters required to define the basic raytrace type:

T_RAY

T_RAYCOHERENT
 

 


 

Create source rays

 

To generate the rays for all defined sources,  issue the command

 

CreateSources

 

To generate rays for a specific source, use

 

CreateSource id

 

where id is the source identifier.


 

"Delete" a source

 

Deleting a source is equally simple. One command removes all rays from the ray buffer:

 

DeleteRays


 

"Trace" a source or sources

 

To create rays, trace and have the rays drawn in the 3D viewer, use

 

CreateTraceDraw

 

or to forgo drawing the rays (which can significantly slow the raytrace process), use

 

CreateTrace

 

To trace rays that already exist and draw them to the 3D viewer, use

 

TraceExistingDraw

 

or to trace only existing rays without drawing, use

 

TraceExisting

 


 

See Also….

Advanced Raytrace

Coatings

Curves

Elements

Entity Info

General Ray Data

Gratings

Importance Sampling

Linear Transforms

Materials

Ray Buffer Handling

Ray Data Get/Set

Ray Path

Raytrace Control

Scatter

Surfaces

 

 

 

 

 

Copyright © Photon Engineering, LLC