SPHERE Function
Defines a spherical object that can be used by the RENDER function.
Usage
result = SPHERE( )
Parameters
None.
Returned Value
result—A structure that defines an ellipsoidal object.
Keywords
Color—A 256-element double-precision floating-point vector containing the color (intensity) coefficients of the object. (Default: Color(*)=1.0) For more information, see the PV‑WAVE User’s Guide.
Decal—A 2D array of bytes whose elements correspond to indices into the arrays of material properties. For more information, see the PV‑WAVE User’s Guide.
Kamb—A 256-element double-precision floating-point vector containing the ambient (flat shaded) coefficients. (Default: Kamb(*)=0.0) For more information, see the PV‑WAVE User’s Guide.
Kdiff—A 256-element double-precision floating-point vector containing the diffuse reflectance coefficients. (Default: Kdiff(*)=1.0) For more information, see 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 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 the PV‑WAVE User’s Guide.
Discussion
A SPHERE is used by the RENDER function to render ellipsoid objects, such as for spherical inverse mapping or molecular modeling (atoms). It is centered at the origin, with a radius of 0.5.
You can alter its diameter and orientation with the Transform keyword.
Example
ds = 6
; Create a 6-by-6 checkerboard image.
checks = BYTARR(ds, ds)
checks(*) = 255
FOR x=0L, ds - 1 DO $
FOR y=0L, ds - 1 DO $
IF ((x mod 2) EQ (y mod 2)) THEN $
checks(x, y) = 128
; Set checks to be full and one-half intensity.
two = FLTARR(256)
two(128) = 0.5 & two(255) = 1.0
s = SPHERE(Decal=checks, Color=two)
TV, RENDER(s)
See Also
For more information, see the PV‑WAVE User’s Guide.