Generates a ray-tracedrendered image from one or more predefined objects.
For example, you could define the variable
k
to contain this default view as follows:
k = DBLARR(3, 4) RENDER(object, Info=k)
If this keyword is omitted, then a single light source is defined; this light source coincides with the automatically generated viewer's eye-point.
Sample A long integer containing the number of randomly distributed rays to fire per pixel to perform anti-aliasing. The default is
Sample=1.
Scale If present, indicates that the resultant image should be scaled prior to conversion to bytes. By default, all generated shaded values are assumed to be in the range {0...1} (see Discussion below).
Shadows If present, indicates that shadow rays should be fired so that all points on all objects are not visible to all light sources. If not present, every point in a scene is visible to each light source.
TIP: For most visualization applications, you will want to omit theShadows keyword, since this causes the ray tracer to run much faster.
View A 3-by-4 double-precision floating-point array used to override the auto-generation of the view to that specified. Uses the same format as is used for the Info keyword.
X An integer defining the width of the byte image to be returned. Defaults to 256.
Y An integer defining the height of the byte image to be returned. Defaults to 256.
Numerous objects can be rendered in the same scene. RENDER automatically generates the viewing information such that all objects are visible and the observer's viewpoint is on the positive Z axis looking towards the origin into the scene with a slight perspective. The Transform or the View keyword can be used to alter the default view. For more information, see Setting Object and View Transformations in Chapter 7 of the PV-WAVE User's Guide.
The Lights keyword can be used to pass in an array of locations and intensities of point light sources. Except for the default light source (when none are specified by keyword), the light sources specified are not transformed. For best results, the sum of the intensities of light sources should equal 1.
By default, shadow rays are turned off and thus all points on all objects are visible to all lights. The firing of shadow rays can be turned on using the Shadows keyword.
TV, RENDER(SPHERE())
For more information, see Ray-tracing in Chapter 7 of the PV-WAVE User's Guide.