# Use 3d Characters In Programming

A 3-D character is modeled in terms of points, edges and surfaces.

Using 3-D characters in programming falls within the field of computer graphics. At the lowest levels, you must employ advanced mathematics to achieve results. Most applications are based on high-level libraries that implement very complex formulas. In some cases, high-level graphics editing and animation tools provide images and frame sequences that are integrated into the nongraphic logic of the computer program.

## Instructions

1. Select a 3-D character model. A 3-D graphic model is a mathematical definition of the character as points, edges and surfaces in 3-D space, which is defined in terms of three coordinates, referred to as X (length), Y (height) and Z (width). The internal model is independent of a visible end product, typically a screen view or printed output.

2. Transform the model to achieve a character behavior such as move, expand, contract and rotate. The process of transformation applies mathematical formulas to the points that define the model. For example, to move a model of a cube one unit to the right, the transformation formula adds one to the X coordinate of each of the corner points that define the cube. When the model is redisplayed, the cube will appear to have moved to a new position to the right of the previous location.

3. Determine whether a specific point is located outside, inside or on the surface of the character model. Use this knowledge to determine when the character has collided with another character or other object in the program, including outer boundaries.

4. Transform the model to the output format. This usually implies a conversion from 3-D space to the 2-D space of a computer screen or sheet of paper. 2-D space is defined by only the X and Y coordinates. The transformation process employs perspective calculations to convert the Z coordinate to an X and Y position that creates the illusion of three dimensions. The model must also be adjusted based on the physical properties of the output format. For example, the model may be expanded or contracted to fill or fit within a given screen or paper size.

READ  Install An Intel Graphic Media Accelerator Driver