Вы находитесь на странице: 1из 9

Introduction to 3D modeling:

Generation of model geometry involves:


construction of model entities concept of interface coordinate systems coordinate formats input devices and techniques display formats

Geometric Element
The term entity may used to refer to any geometric element of a model Examples are:
Lines Arcs Surfaces Solids

User Interface
Includes:
input devices display devices menus, GUI command structures

Modelspace and Display space


Model space: 3D memory space within which model geometry is created and stored. Display space: 2D memory space within which display geometry is stored. (also called screen buffer)

Units
Within the database model values are typically unitless CAD systems usually supply units at output
For example, when printing hardcopy or transferring data between applications

Geometric Elements
The following tables categorize geometric elements according to:
Number of dimensions they occupy Dimensionality of the space within which they exist Degree of their defining equations

dimensionality = 0; do not occupy distance, area or volume Dimensionality of Space 1D Degree of Equations 0 Example Point on line

Points

2D

Point on plane

3D

Point in space

dimensionality = 1; occupy distance, not area or volume Dimensionality of Space 2D 2D 2D 2D 3D 3D 3D 3D Degree of Equations 1 2 3 4 1 2 3 4 Example Line on plane Quadric curve on plane Cubic curve on plane Quartic curve on plane Line in space Quadratic curve in space Cubic curve in space Quartic curve in space

Lines and Curves:

Surfaces:
dimensionality = 2; occupy area but not volume Dimensionality of Space 2D 3D 3D 3D 3D Degree of Equations 1 1 2 3 4 Example Section of plane Plane or polygon in space Quadratic surface in space Bicubic surface in space Biquartic curve in space

dimensionality= 3; occupy volume

Solids

Coordinate system:
Allows for the mapping of positions and orientations in a 3 dimensional model space. Is required to describe the shape of objects and for monitoring changes in those shapes. Is used to ensure relevance between 3D modeling structures and their real world counterparts.

Dimensionality of Space 3D 3D 3D 3D

Degree of Equations 1 2 3 4

Example Polygon Triquadric solid Tricubic solid Triquartic solid

Coordinate formats (3-dimensional):


Cartesian or rectangular Cylindrical polar Spherical

Cartesian coordinate system


Most common format used in CAD systems

spherical and polar systems do not permit vectorization

Consists of a set of three mutually orthogonal axes, intersecting in a common point or origin. Orientation is typically right-handed.

Right-handed Coordinate system


+Z

Direction of positive rotation is given by the right-hand rule


+Z

+Y

+Y

(0,0,0) +X +X

Coordinate systems use:


All modelers include a primary reference coordinate system Common terms used by modelers:
Absolute Coordinate System Global Coordinate System World Coordinate System

Temporary Coordinate Systems


Many also provide for the specification of temporary Local (or User-Defined) Coordinate Systems. Used to simplify input
Data input is specified relative to temporary system Data are transformed to absolute reference internally

Local Coordinate System


+Z +Y +Z

Reference planes:
Many modelers will allow for the specification of new local coordinate systems by specifying a reference (XY) plane May be located with respect to existing model geometry:
aligned with existing vertices, edges, surfaces) or to coordinate location (e.g. Z = Z)

+X +Y

+X

Reference planes
+Z Y Z = Z1

Point Coordinates
ordered set of numbers specifying a location in terms of:
a reference point (typically the system origin) and with respect to reference lines (typically the coordinate axes) e.g. (X, Y, Z)

+Y Z1

+X

Homogeneous Coordinates
Used to simplify the use of linear algebra in applying transformations (see next slide) to objects (points, lines, etc.) Written as (x, y, z, w) Equivalent coordinates in Cartesian system would be (x/w, y/w, z/w) We will use w=1, so a points homogeneous coordinates would be: P = (x, y, z, 1)

Geometric Transformations
Modeling systems operate on model entities (and hence the database) through three transformation operations.
Translation Rotation Scaling (also known as dilation)

Translation
Y

Translation

Rigid body transformation


Every point of entity moved equally a specified distance in a specified linear direction

May be specified in terms of:


Initial and final location of a reference point A delta value with respect to the current coordinate system
x, y x, y

Translation Mathematical
Given point P (x,y,z) Translation of P by distances a,b,c in the x,y,z directions respectively yields: Xfinal = Xinitial + a Yfinal = Yinitial + b Zfinal = Zinitial + c

Translation
In matrix form Xf Yf Zf 1 1 0 0 0 0 1 0 0 0 0 1 0 a b c 1 Xi Yi Zi 1

Rotation
A rigid body rotation in which every point of an entity is revolved an equal amount about a reference Requires a rotation axis and angle
In the case of a 2D rotation, point view of axis is used

Rotation
Y

x, y

Rotation
In matrix form, rotation about X axis (written Rot(x,) Xf Yf Zf 1 1 0 0 0 0 cos -sin 0 0 sin cos 0 0 0 0 1 Xi Yi Zi 1 Rot(y,) Xf Yf Zf 1

Rotation

cos 0 -sin 0

0 sin 0 1 0 0 0 cos 0 0 0 1

Xi Yi Zi 1

Rotation
Rot(z,) Xf Yf Zf 1 cos -sin = sin cos 0 0 0 0 0 0 1 0 0 0 0 1 Xi Yi Zi 1

Rotation
Rotation about an axes other than one of the principle coordinate axes would involve:
Translating the endpoint of the axes to the origin Rotate the axes to coincide with one of the principle axes Perform the desired rotation Reverse the sequence of translations and rotations

Dilation (scaling)
Alters the absolute size of an entity by multiplying its geometric coefficients by a scale factor Scale factor may be applied equally in X, Y and Z directions
Entity shape remains the same
Y

Scaling

Scale factor may be applied differently in X,Y or Z


Entity shape changes
x, y

Requires a base point


X

Dilation
Uniform dilation (equal in X, Y and Z) Xf Yf Zf 1 sx 0 0 0 0 sy 0 0 0 0 sz 0 0 0 0 1 Xi Yi Zi 1

Model display:
The CAD database is a mathematical representation of the object being modeled. To be displayed on the modeling system monitor, (a 2D medium) the database information must undergo transformation.

Model display:
Accomplished by mapping 3D positions to a 2D viewing plane (the screen).
same projection techniques used in engineering graphics

Object in 3D space

Viewing plane is perpendicular to lineof-sight. The X x Y matrix of mapped points is stored in a memory device referred to as the screen buffer.

Viewing plane

Projection Matrix
Projection to XY plane (Pxy) Xf Yf Zf 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 Xi Yi Zi 1

Projection Matrix
Projection onto XZ plane (Pxz) Xf Yf Zf 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 Xi Yi Zi 1

Projection Matrix
Projection to YZ plane (Pyz) Xf Yf Zf 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 Xi Yi Zi 1

Model display:
The system will allow the user to set view orientation with respect to various view plane orientations. This permits display of images such as:
a pictorial image of the model (example: isometric) principle views (example: top, front)

Concept is analogous to that of a set of camera orientations

From the users interface,often accomplished by:


Specification of a predefined LOS
May be with respect to :
Global C.S. orientation Current Local C.S. orientation Present orientations such as isometric

Windows and Viewports :


Many modelers permit the user to view modelspace from multiply lines -of-sight simultaneously. This is accomplished in two ways depending upon the software.
Opening multiple window display Using viewports

Dynamic rotation of LOS vector about the object

Windows Example

Viewports
Viewports are essentially windows arranged in a tiled format
The single display window is divided into number of viewports The user specifies of multiple viewports in factors of 2 (2, 4, 8, etc.)

Different open viewports can have different display configurations.

Viewport Example

Layers
Most systems allow for the creation of model layers Layers are a tool used to organize the displayed entities of a model Entities may be assigned to one (or more) layers. Layers (and the entities assigned them) may have unique display characteristics (visible, invisible, non-selectable, etc.)

Display Control
Blanking:
Blanking an entity shuts off its current display within the file The entity continues to exist as an element of the file

Suppression Example

Suppression:
Solid modelers include a command to turn off the display of specified elements of the solid geometry This is called suppression

Data input
Data may be input to the modeler through the use of :
The keyboard Positioning devices such as :
a mouse a puck (in conjunction with a digitizing pad) a light pen a space ball

Positioning devices
The mouse common device is the mouse
Mouse is 2 dimensional in nature
Cursor position is restricted to a 2D workplane, usually the current XY plane or Restricted to the plane of the screen buffer

To select locations out of current XY, locating tools (with respect to existing geometry), must be used

Data for entities


Creation of entities requires data input
e.g. definition of a line requires endpoint data Point input via a mouse will either
Take the XY location of the current mouse position with respect to the current coordinate system. Z is set to zero. Take coordinate values from an existing model entity, for example the endpoint of and existing line, center of an arc, etc.

Вам также может понравиться