Sphere

Sphere


Creates spheres. The sphere is defined by the coordinates of its center and radius. The format is different based on whether color is defined or not. To differentiate the formats, the center data type is specified in the third line. There are two center data types: vertex and color.

vertex
The X, Y and Z coordinates and the radius of the sphere are specified.

Format
# Micro AVS Geom:2.10
sphere
Primitive Name
vertex
n(number of spheres)
X(1) Y(1) X(1) radius(1)
X(2) Y(2) X(2) radius(2)
.
.
.
X(n) Y(n) X(n) radius(n)
color
The X, Y and Z coordinates, the radius and the R, G, B color values of the sphere are specified.

Format
# Micro AVS Geom:2.10
sphere
Primitive Name
color
n(number of spheres)
X(1) Y(1) X(1) radius(1) R(1) G(1) B(1)
X(2) Y(2) X(2) radius(2) R(2) G(2) B(2)
.
.
.
X(n) Y(n) X(n) radius(n) R(n) G(n) B(n)

Example : 3 spheres (sphere.mgf)

# Micro AVS Geom:2.10
sphere
sphere_sample
color
3
0.0 0.0 0.0 0.2 1.0 0.0 0.0
0.5 0.0 0.0 0.3 0.0 1.0 0.0
0.0 0.5 0.0 0.4 0.0 0.0 1.0



UP © 1999-2008 KGT Inc. All rights reserved.