Mathematica 9 is now available

Documentation / DynamicVisualizer / Creating Objects /

3.4 Introducing Models

Look at how Dynamic Visualizer displays objects in a reasonable size.

In[11]:=

You now have a fresh scene containing only the default model and camera.

For the purposes of the following discussion, you use SetOptions to move and rotate the default model and make the yellow bounding box visible.

In[12]:=

Out[12]=

At this point, the default model contains no objects, so it does not have a valid value for the ModelRange option. Similar in many ways to PlotRange, ModelRange applies to all objects within the model and defines the coordinate or spatial extent that the model represents.

In[13]:=

Out[13]=

Settings for the option ModelRange.

Bullet To ensure that all objects continue to fit inside the unit cube of the model, the model range may change automatically when new objects are created within a model.

BulletObjects may later be moved or scaled beyond the model's bounds.

Bullet When creating a scene with more than one object, the objects may appear to rotate peculiarly if the range in each direction is not the same.

Bullet The model range is reset to zero when the last object is removed.

When the first object is created in Dynamic Visualizer, the model range is set to the extremities of the graphics in the x, y, and z directions. For example, you can create a second object—a cuboid with dimensions 1 × 2 × 3.

In[14]:=

Out[14]=

In[15]:=

Out[15]=

In[16]:=

Out[16]=

Now that a second object with different dimensions has been created, the model range has expanded to include both objects.

In[17]:=

Out[17]=

The model range can be set explicitly. Each dimension must have a positive length.

In[18]:=

Out[18]=

Each time the model range changes, each vertex of each object in the model needs to be recomputed. This may lead to rounding errors if an object is rescaled many times. To avoid this problem, set the model range to the maximum range before the model is used.



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.