## Environment

In nature, the development of an organism is strongly influenced by its environment. For example, flowers tend to turn towards the light and trees with identical genomes can have different appearances depending on wind conditions. GENR8's growth model features environmental interactions. These will affect the development of the surface.

In GENR8 there are four different environmental elements, attractors, repellors, gravity and boundaries. The user should set up the environment priot to the run.

### Attractors

An attractor can be compared to a magnet as it pulls the surface towards it. All vertices that constitute a surface are affected by an attractor. Since the attraction depends on the distance to the attractor, the effect will not be the same for the entire surface. Attractors and repellors are represented as point charges and have two parameters, a constant and an exponent. The displacement from an attractor is diplacement = c/d^e, where d is the distance to the surface element, c is the constant and e is the exponent. The attractor function has a singularity at d=0 and the behavior is strange (and perhaps undesired) if a surface element is close to the attractor.

There are two ways to place attractors, either by using the special purpose MEL-command attractor or by using the -a flag for the genr8 command. If the first method is used, the attractors (represented as cylinders pointing in the z-direction) can be moved around just like ordinary Maya objects. Furthermore, attractors are created in a separate layer, this makes it easy to toggle their visibility. Please note that the attractors should not be selected before running the genr8 command.

### Repellors

Repellors are similar to attractors. Instead of drawing the surface closer, it is pushed away by the repellor. Repellors are easier to use than attractors since the singularity does not cause as much trouble.

### Gravity

Gravity is a uniform force acting in one of the principal directions. This will cause all parts of the surface to move uniformly in the same direction.

### Boundaries

Boundaries can be used to set additional constraints for the growth of a surface. The surface can be grown inside or outside the walls, but it is not supposed to grow through the walls. Unfortunately, the algorithm fails sometimes and the surfaces grow through the walls of a boundary. In theory, the algorithm should never fail for convex boundaries (for example, a surface growing inside a cube or a sphere). In many cases, the algorithm can handle concave geometries as well (for instance, a surface growing outside a sphere), but theoretically the algorithm is not bound to succeed.

Boundaries can be created by placing ordinary Maya-surfaces (polygons or nurbs) in the scene. There are three different wall-behaviors that can be used as the surface approaches the boundaries. The wall behavior is specified as the run is started. Also, it is important to remember to select the surfaces before you run the command, otherwise GENR8 will ignore the surfaces.

#### Default wall-behavior

The growth is cut off so that the surface does not penetrate the boundary. During testing there have been cases where the boundary does not stop the growth. Most likely, the reason for this is because Maya failed to detect the intersection

#### Cut Off wall-behavior

As the surface element hits the boundary, all movement is stopped. With the default behavior, it slides along the boundary, but now it stops dead instead.

#### Soft Boundaries

This behavior is only useful when evolving surfaces. The surfaces can grow past the boundaries, but their fitness is penalized as they do so.

### User-Defined Seeds

The seed (starting surface) for GENR8 is by default a regular polygon. The user can control the length of the sides and the starting position of this polygon. However, GENR8 can also handle user defined seeds. By drawing a curve and selecting it before starting the run (you do not have to close the curve, GENR8 will do that for you) you may control the starting shape.

Since GENR8 uses Bsplines rather than nurbs, it is recommended that you use the "Curve with EPs" rather than the "Curve with CVs" tool. Otherwise, the output from GENR8 will have a different shape from the input. GENR8 assumes that the normal of your curve/surface has a normal with a non zero component in the z-direction.

Back