Cone

Syntax:

	(Cone
           (material: material)
           (radius: number)
           (height: number)
           (scale: coord)
           (thickness: number)
           (center: coord)
           (bottom: boolean)
           (solid: boolean)
           (name: string)
           (color: number)
           (index-of-refraction: number)
           (reflectivity: number)
           (emissivitiy: number)
           (transparency: number))

Creates a new cone. All arguments are optional and have reasonable defaults. Color, index-of-refraction, reflectivity, emissivitiy, and transparency override the settings in material if specified.

material:

The material of the object. See Primitive Procedures - Material for details.

radius:

A number denoting the radius of the cone. Radii are in meters. The default radius is 1.

height:

A number denoting the height of the cone. Height is in meters. The default height is 1.

scale:

A set of coordinates giving the scale of each dimension (x, y, z) of the cone. The default scale is (1, 1, 1).

thickness:

A number denoting the thickness of the cone in meters. The default thickness is 10% of the radius.

Note: Solid cones do not have a thickness.

center:

A set of coordinates giving the position of the center of the cone in meters. The default center is at the origin, (0, 0, 0).

bottom:

A boolean value indicating whether the cone has a top or not. True, #t, indicates that it has a bottom; false, #f, indicates that it does not have a bottom. The default value is that a bottom is present, or true.

solid:

A boolean value indicating whether the cone is solid or hollow. True, #t, denotes solid; false, #f, denotes hollow. The default value is solid, or true.

name:

A tag which can be added to the object for identification purposes. The default name is "Cone".

color:

A coordinate indicating the (r, g, b) value of the base color of the object. Each element is on the range {0, 1}. The default color is grey, (.5, .5, .5}.

transparency:

A number on the range {0, 1} indicating the percent loss in intensity of light per meter of material traveled through. A value of 1 results in a perfectly transparent surface, a value of 0 results in a perfectly opaque surface. The default transparency is 0, or opaque.

Note: In determining the appearance of the object, transparency is multiplied by the color. For example, an object with color (0, 0, 0) cannot be at all transparent, regardless of the transparency of the material.

emissivity:

A number on the range {0,1} indicating the emissivity of the material. A value of 1 results in a material with maximum glow; a value of 0 results in a material that does not glow. The default emissivity is 0.

index-of-refraction:

A number on the range {1,2} indicating the index of refraction of the material. The index of refraction of air is 1.0; for water it is 1.33. The default index-of-refraction is 1.2.

shininess

A number on the range {0,1} indicating the sharpness of the specular highlight. Shiny materials have a small, sharp highlight; matte materials have a large, dull highlight. A value of 1 indicates the highest shininess; 0 indicates the least shininess.

reflectivity:

A number on the range {0,1} indicating the reflectivity of the material. A value of 1 is a perfectly reflective material, i.e. a perfect mirror; a value of 0 is a completely dull material.


Example:

(cone (radius: 3) (height: 2) )

This code creates a cone of radius 3 and height 2. The cone is solid and has a bottom.


© 1996, Morgan McGuire ([email protected]) and Laura Wollstadt ([email protected]).
All rights reserved.

LBW 12/05/96