Return to index

NAME

sph - create a sphere

SYNOPSIS

sph vc rad

DESCRIPTION

Create a sphere made of the current material with its center at the named vertex vc and a radius of rad. If the vertex is undefined an error will result.

The surface normal is usually directed outward, but will be directed inward if the given radius is negative. (This typically matters only for one-sided materials.) A zero radius is illegal.

EXAMPLE

# Create a thick glass sphere with a hollow inside
m glass =
	sides 1
	ir 1.52 0
	c
	rs .06 0
	ts .88 0
v cent =
	p 0 0 1.1
# The outer shell
sph cent .1
# The inner bubble
sph cent -.08

SEE ALSO

cone, cyl, f, m, prism, ring, torus, v