Defines thevolumetric data that can be used by the RENDER function.
Color(*)=1.0
) For more information, see Defining Color and Shading in Chapter 7 of the PV-WAVE User's Guide.
Kamb A 256-element double-precision floating-point vector containing the ambient (flat shaded) coefficients. (Default: Kamb=FINDGEN(256)/255
) For more information, see Ambient Component in Chapter 7 of the PV-WAVE User's Guide.
Kdiff A 256-element double-precision floating-point vector containing the diffuse reflectance coefficients. (Default: Kdiff(*)=0.0
) For more information, see Diffuse Component in Chapter 7 of the PV-WAVE User's Guide.
Ktran A 256-element double-precision floating-point vector containing the specular transmission coefficients. (Default: Ktran(*)=0.0
) For more information, see Transmission Component in Chapter 7 of the PV-WAVE User's Guide.
Transform A 4-by-4 double-precision floating-point array containing the local transformation matrix whose default is the identity matrix. For more information, see Setting Object and View Transformations in Chapter 7 of the PV-WAVE User's Guide.
For example, the material properties used for shading the point
(x,y,z)
in some data are Color(voxels(x,y,z)),
Kamb(voxels(x,y,z)),
etc. The surface normal at (x,y,z)
is calculated using a 3D Sobel gradient operator on the actual voxel values. The default orientation of a volume is an origin-centered unit cube. For more information, see Defining Object Material Properties in Chapter 7 of the PV-WAVE User's Guide.
If the voxels are not cubic, you may adjust the scaling of the dimensions with the Transform keyword by using a matrix generated by the T3D procedure with the Scale keyword.
voxels = BYTARR(16, 16, 16) voxels(*) = 255 diffuse = FLTARR(256) T3D, /Reset, Rotate=[15, 30, 45] cube = VOLUME(voxels, Transform=!P.T, $ Kdiff=diffuse, Kamb=FLTARR(256)) TV, RENDER(cube)
For more information, see Ray-tracing in Chapter 7 of the PV-WAVE User's Guide.