Changing the Appearance of Agents
<< previous | Chapter 5. Basic Agent Behaviors: Motion, Appearance and Communication | next >>

## Changing the Appearance of Agents

There are a number of ways to customize the appearance of an agent. As mentioned in the previous section, you can manipulate the size and shapes of objects using the class Shape and its subclasses.

To set the color of an agent, use the method set-color in the class Real. The method expects a vector color where the three values represent red, green and blue intensities on a scale from 0.0 to 1.0. For example:

    # set the color to red = 0, green = 1, blue = 0.

    self set-color to (0.0, 1.0, 0.0).

Objects can also be textured, represented as images or even as translucent glowing blobs called "lightmaps". All of these techniques are covered in detail in the chapter on Graphics and Sound (Chapter 6).

<< previous | Up | next >>
Chapter 5. Basic Agent Behaviors: Motion, Appearance and Communication | Table of Contents | Moving Agents Around the 3D World