## Modeling 3D objects

In working with 3D objects we often need to have "real 3D objects" so that we can find out the diverse physical and technical features. In processing, we must decompose every 3D object into basic building elements as for instance a cube, triangle, square. Now, we show some of the basic techniques of representation of object modeling.

### Boundary reprezentation

We can model a 3D object using a plane comprising the limit or frontier of this object. We can get this plane in several ways: through rotation, translation, analytically, spline, volume, CSG tree or other.

The most common representation of an object is using the limit points.

Rotation body

If a curve or abscissa rotates around the line called the rotation axis, this rotating curve or abscissa creates a rotation surface. For simplicity, we select the coordinate system so that the given rotation axis is identical to the axis z and the curve is given in the plane xz. Let the parametric expression of the curve be:

x = f(t),    y = g(t).

Every point on the rotation surface is determined through the option t and the parameter of rotation u. Parametric equations of the rotation surface can be easily derived:

x = f(t) . cos(u),

y = f(t) . sin(u),

z = gt),

where the parameter t is from an interval setting of the curve and the parameter u ∈<0, 2π>. If the surface creates an object, then we call it a rotation object.

Example:
The equations for creating a sphere surface are the following:

x = r.cos(t) . cos(u),

y = r.cos(t) . sin(u),

z = r.sin(t),

where t ∈<-π/2, π/2> and u∈ <0, 2π>.

\$\$\$APPLET

Applet: Diverse types of surfaces created by rotation, sphere surface by a rotation surface (surface 1). Keys 1-5 options of axonometry, 6-7 plus, minus v-curve.

### Translation body

A translation body is created by moving a closed curve in the plane, while the vector of movement may not lie in this plane. In this way, it is possible to create general cylinder surfaces.

\$\$\$APPLET

Applet : A translation body

### Analytic and spline surfaces

These surfaces can be used for the construction of bodies.

### Construction geometric geometry (CSG tree)

In CAD applications, it is the most advantageous to describe bodies using simple geometric bodies, so-called construction solid geometry (CSG) forms (e.g., block, sphere, cylinder, cone, toroid) and logical operations (as intersection, addition, and disjunction of sets). The CSG (Constructive Solid Geometry) method is based on the representation of bodies using a tree structure. For each basic body we can determine parameters (e.g., for the block its dimensions, for the sphere its radius, and similar) and to define its position in an area. The resulting object is constructed using CSG forms by operations on sets and dimension transformations.

\$\$\$APPLET

Applet : CSG from two bodies

### Modeling volumes

Volume modeling is widespread mainly in medicine applications where an object is composed from 2D sections into a 3D cube. This is demanding on the size of memory and microprocessor rate because we must process a large amount of input data. The basic element in the 3D area is a voxel, which is created as analogues to the pixel, which is two-dimensional. Voxels are dice or cuboid arranged in a rectangular grid.

### Object coding

In 3D   graphics, most often is used geometric modeling using edges and polygons. Information about an object can be split into three types:

1. Geometric coding of corners (coordinates of points)
2. Coding of linkages between corners and of polygon structures (polygons)
3. Specific information on the given object (color, type of material, similar)

### Simple coding

The simplest way of coding is to set up every edge h:     h= ((x1, y1, z1), (x2, y2, z2)) and every polygon P (polyg髇u) using the coordinates of corners; for instance in this way:     P =  ((x1, y1, z1), (x2, y2, z2),..., (xn, yn, zn))

\$\$\$APPLET

Picture : Example: Coding of a tetrahedron

### Structured coding

Structured coding extends the data structure and description using winged edges (winged edge). . The edge record contains references to all geometric elements: corners, edges and polygons, with which it has common points. For picture (unclear in original) the edges h1, h2, and h3 we can write as winged edges through the following table:

 Edge Corners Incident polygons Adjacent edges h1 1, 2 P1; P2 h3, h2; h4, h5 h2 2, 3 P1; P4 h1, h3; h5, h6 h3 3, 1 P1; P3 h2, h1; h6, h4
Copyright (c) 1999-2019 Juraj 艩tugel. www.netgraphics.sk