User Tutorial 1: Working with Shapes

updated for version mgui-1.0.3-alpha

This tutorial guides you through a number of ways in which you can use modelGUI to interact with 2D and 3D shapes.

# Introduction

In mgui, a shape is an entity that forms the basis of all physical models. A shape is minimally specified by a set of two- or three-dimensional Cartesian coordinates, or vertices, but the relationship and meaning of these vertices depends upon the nature of the shape in question, and can range from a single point to an entire geometrical system. Mgui also provides the capability of associating numeric data to vertices, which allows a great deal of flexibility with respect to the kinds of physical systems it can model. Future implementations will also provide support for dynamic shapes, with an additional temporal dimension that allows its geometry and/or associated data to change over time.

Mgui works in both two and three dimensions, and most of its shape types are representable in both. A 2D shape, for instance, is always associated with a 3D plane, and thus can also be represented in 3D. Likewise, a 3D shape can be cut by, or projected onto, a plane, and thus be represented in 2D. This functionality is built into the mgui framework.

Mgui currently provides support for a variety of shape types:

Shape Geometry Space Description
Polygon Linked list of vertices 2D/3D A polygon represents a finite curve, and can be open (polyline) or closed (polygon).
Mesh Vertices forming triangular faces 3D A mesh is a 2-manifold, or a tesselated surface, and can be open or closed.
Box Vertex and three edge vectors 3D A box is a six-sided polyhedron which can have any orientation, defined by three vectors which are typically (but not necessarily) orthogonal.
Vector Point and vector 2D/3D A vector, as an mgui shape, is defined by a start point and a vector defining its direction and magnitude. Care should be taken not to confuse a "shape vector" with a mathematical vector, which has no start point.
Grid Box and grid dimensions 3D A grid is a box or rectangle which is internally divided into a fixed number of grid points, evenly-spaced in each dimension.
Point Set Set of vertices 2D/3D A set of points.

[TODO: screen shots here]

Shapes are loaded into mgui using shape loaders, which are defined by the init file. All shape loaders for a given session are available in the File Data Panel, which you can access from the Combo Box at the top left of the screen. You can browse the available loaders (shape or otherwise) via the drop down box beside the "File type" combo box.

[TODO: screen shot here]

The process of loading a shape into the workspace is simple. You first select the file type from the combo box, next browse for the file containing the shape data you wish to load, and - if necessary - clicking "Options" to define the target shape or section set, shape name, and other loader-specific options. Finally, click "Read Data".