BOWEN UNIVERSITY, ` IW ´ O, ` O . SUN-STATE DEPARTMENT OF COMPUTER SCIENCE MODULE 3: UNIT 1 Geometric Representation 0.1 Introduction Modelling means forming a mathematical representation of the world, the output of the modelling process might be a representation of anything from an object’s shape, to the trajectory (path) of an object through space (Cartesian space, x and y coordinates). Points are important because they form the basic building blocks for representing models in Computer Graphics. We can connect points with lines, or curves, to form 2D shapes or trajectories. Or we can connect 3D points with lines, curves or even surfaces in 3D. Geometric modelling is a branch of applied mathematics and computational geometry that studies methods and algorithms for the mathematical description of shapes. It is the process of constructing a complete mathematical description to model a physical entity or system. 0.2 Geometric modeling Geometric modelling refers to a set of techniques concerned mainly with developing effi- cient representations of geometric aspects of a design, it is a branch of applied mathemat- ics and computational geometry that studies methods and algorithms for the mathemat- 1
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
BOWEN UNIVERSITY, IWO, O. SUN-STATE
DEPARTMENT OF COMPUTER SCIENCE
MODULE 3: UNIT 1
Geometric Representation
0.1 Introduction
Modelling means forming a mathematical representation of the world, the output of the
modelling process might be a representation of anything from an object’s shape, to the
trajectory (path) of an object through space (Cartesian space, x and y coordinates).
Points are important because they form the basic building blocks for representing models
in Computer Graphics. We can connect points with lines, or curves, to form 2D shapes
or trajectories. Or we can connect 3D points with lines, curves or even surfaces in 3D.
Geometric modelling is a branch of applied mathematics and computational geometry
that studies methods and algorithms for the mathematical description of shapes. It is the
process of constructing a complete mathematical description to model a physical entity
or system.
0.2 Geometric modeling
Geometric modelling refers to a set of techniques concerned mainly with developing effi-
cient representations of geometric aspects of a design, it is a branch of applied mathemat-
ics and computational geometry that studies methods and algorithms for the mathemat-
1
ical description of shapes. Geometric modelling is also a collection of methods used to
define the shape and other geometric characteristics of an object, it is used to construct a
precise mathematical description of the shape of a real object or to simulate some process.
Geometric Modeling is the field that discusses the mathematical methods behind the
modeling of realistic objects for computer graphics and computer aided design. The field
was initially developed in the mid- 1970s and has evolved as the speed and memory of
computer systems has advanced. Geometric modelling approaches are;
i. Two-Dimensional (2D) models
ii. Three-Dimensional (3D) models
The shapes studied in geometric modeling are mostly two or three dimensional, al-
though many of its tools and principles can be applied to sets of any finite dimension.
Today most geometric modeling is done with computers and for computer- based appli-
cations. Two- dimensional models are important in computer typography and technical
drawing. Three-dimensional models are central to computer aided design and manufac-
turing(CAD/CAM), and widely used in many applied technical fields such as civil and
mechanical engineering, architecture, geology and medical image processing.
A 2D geometric model is a geometric model of an object as a two- dimensional figure,
usually on the Cartesian plane. 2D figures usually have length and breadth, and they
are they are located on the x and y axis of the Cartesian plane. It is often necessary for
representing 3D images on a flat surface. It is also adequate for certain flat objects like
paper cut-outs and machine parts made of sheet metal. 2D geometric models are also
convenient for describing certain kinds of artificial images, such as technical diagrams,
logos, etc. A 3D geometric model is the process of developing a mathematical represen-
tation of any three-dimensional surface of an object via specialized software. It can be
displayed as a two-dimensional image through a process called 3D rendering.
Geometric models explicitly represent the shape and structure of an object, and from
these, one can deduce what features will be seen from any particular viewpoint and where
2
they are expected to be and to determine under what circumstances a particular image
relationship is consistent with the model.
0.3 Geometric Modelling Scheme/Techniques
There are three geometric modelling scheme which includes;
a. Wireframe model: In this scheme, the shape of the object is defined by a collection
of points (vertices) and a set of edges(line or curved connects pair of points). The
disadvantage of wire frame model is that it is ambiguous, it is a complex model that
is difficult to interpret but the advantages are that it is easy to construct, It is most
economical in term of time and memory requirement and it is used to model solid
object. A diagram is as shown in Figure 1.
Figure 1: Wireframe model
b. Surface Model: It is an area within which every position is defined by mathematical
method. Surface may be Planar, Cylindrical/conic and Sculptured or free-form in
shape. It is used to overcome ambiguity in wire-frame model. A diagram is as shown
in Figure 2.
c. Solid Model: The solid modelling technique is based upon the ‘half-space’ (by
specifying different boundary surface) concept. It is the most complex of all geo-
metric modelling techniques and it offers unambiguous description. A solid model is
3
Figure 2: Surface Model
appropriate for the world of engineering objects, it offers a complete representation
of an object.
0.4 Lines and Curves
Space curves are nothing more than trajectories through space; e.g. in 2D or 3D. A line
is also a space curve. A line is simply the distance between two points, a line can also
be called a curve in some areas e.g. space curve. In general we can represent a 2D space
curve using y = f(x). An abstract definition of this is f(x) = mx + c. But we cannot
represent all space curves in the form y = f(x). Specifically, we cannot represent curves
that cross a line x = a, where a is a constant more than once.
A curve is similar to a line, but it does not have to be straight. An open curve has
beginning and end points that are different, while a closed curve joins up so there are no
end points. E.g. circle, square. A space curves consists of both lines and curves.
0.5 Explicit, Parametric and Implicit Forms
Geometric modeling is often classified into Implicit, Explicit and Parametric methods.
4
0.5.1 Implicit Forms
This is a continuous mathematical representation of an attribute across a volume. It has
an infinitely fine resolution. The model is a mathematical function in terms of x, y and
z.
The generic function of this is:
x2 + y2 − r2 = 0 (1)
The implicit form is very useful when we need to know if a given point (x, y) is on a
line, or we need to know how far or on which side of a line that point lies. This is useful
in Computer Games application e.g. ‘clipping’ when we need to determine whether a
player is on one side of a wall or another, or if they have walked into a wall (i.e. collision
detection). The other forms cannot be used to determine this easily. It is more complex
than the explicit.
0.5.2 Explicit Forms
The generic format is y = f(x). Here, a variable on the left is expressed in terms as
another variable on the right hand side of the equation. Explicit functions are single
valued. It provides coordinate in one dimension (here, y) in terms of the others (here, x).
It is limited in the variety of curves in can represent. The explicit form is useful when we
need to know one coordinate of a curve in terms of others. This is less commonly useful.
0.5.3 Parametric Forms
:
This is useful when we want to model a line in our Computer Graphics system. The
components of the output are based on some parameter. The Generic format is x = Fx(t),
y = Fy(t). t represents ‘time’.
The parametric form is:
5
p(s) = x0 + sx1 (2)
Here, vector x0 indicates the start point of the line, and x1 a vector in the positive
direction of the line. The dummy s was introduces as a mechanism for iterating along
the line; given an s, we obtain a point p(s) some distance along the line. When s = 0,
we are at the start of the line. Positive values of s moves us forward along the line and
negative values of s move us backward. p(0) is used to denote the start of a space curve,
and p(1) to denote the end of the point of the curve.
In mathematics, parametric equations of a curve express the coordinates of the points
of the curve express the coordinates of the points of the curve as functions of a variable,
called a parameter. E.g. x = cost, y = sint are parametric equations for the unit circle,
where t is the parameter. Together these equations are called parametric equations of
the curve. The notion of parametric equation has been generalized to surfaces, manifolds,
and algebraic varieties of higher dimension, with the number of equations being equal to
the dimension of the manifold or variety, and the number of equations being equal to the
dimensions of the manifold or variety is considered.
The parametric form allows us to easily iterate along the path of a space curve, this
is useful in a very wide range of applications e.g. ray tracing or modeling of object
trajectories. It is difficult to hard to iterate along space curves using the other two forms.
The parameter typically is designated t, because often the parametric equations represent
a physical process in time.
0.6 Parametric Space Curves
Parametric Space Curve is the most common form of curve in Computer Graphics. This
is because:
a. They generalize to any dimension: the x1 can be vectors in 2D, 3D, etc.
b. We usually need to iterate along the shape boundaries or trajectories modeled by such
6
curves. It is also trivial to differentiate curves in this form with respect to s, and so
obtain tangents to the curve or even higher order derivatives.
Therefore we can model complex shape by breaking it up into simpler curves and
fitting each of these in turn. For example, suppose we want to model the outline of a
teapot in 2D, we could attempt to do so using a parametric cubic curve, but the curve
will need to turn several times to produce the complex outline of the teapot, implying a
very high order curve. Such a curve could be of order n = 20 or more, requiring the same
number of xi vectors to control its shape (representing position, velocity, acceleration ,
rate of change of acceleration, rate of change of the rate of change of acceleration and
so on). We can see that such a curve is very difficult to control (or fit) to the required
shape, and in practice, using such curves is manageable; we tend to over-fit the curve. The
result is actually that the curve approximates the correct shape, but undulates (moving
in a wavelike motion or wobbles) along that path. The Cubic curves gives a compromise
between case of control and expressiveness of shape:
p(s) = x0 + sx1 + s2x2 + s3x3 (3)
0.6.1 Basics of Scientific Modelling
a. Modelling as a substitute for direct measurement and experimentation
Models are typical used when it is either impossible or impractical to create experimen-
tal conditions in which scientist can directly measure outcomes. Direct measurement
of outcomes under controlled conditions will always be more liable than modelled
estimates of outcomes.
b. Simulation
A simulation is the implementation of a model. A stead state simulation provides
information about the system at a specific instant in time. A dynamic simulation
provides information over time. It is used for testing, analysis or training in cases
where real world can be represented in models.
7
c. Structure
Structure is a fundamental and sometimes intangible notion covering the recognition,
observation, nature and stability of patterns and relationships of entities i.e. the
concept of structuring is an essential foundation of nearly every mode of inquiry and
discovery in science, philosophy and art.
d. System
A system is a set of interacting or interdependent entities, real or abstract, forming an
integrated whole. In general, a system is a construct or collection of different elements
that together can produce results not attainable by the elements alone.
e. Generating a model
Modelling refers to the process of generating a model as a conceptual representation
of some phenomenon.
f. Evaluating a model
A model is evaluated first and foremost by its consistency to data; any model in-
consistent with reproducible observations must be modified or rejected. Some factors
important in evaluating a model;
i. Ability to explain past observations
ii. Ability to predict future observations
iii. Cost of use, especially in combination with other models
g. Visualization
This is any technique for creating images, diagrams or animations to communicate a
message.
Types of Scientific Models
There are various types of scientific models like;
8
i. Analogical modelling
ii. Assembly modelling
iii. Climate modelling
iv. Micro-scale modelling
Application of Scientific Models
i. Modelling and Simulation
ii. Model Based learning in Education: This involves students creating models for sci-
entific concepts in order to gain insight of the scientific ideas.
Examples of Scientific Models
i. The wave model of light
ii. Atomic modes
iii. Periodic tables
Uses of Scientific Models
i. Used to provide ways of explaining complex data
ii. Used for predicting what might happen
0.7 Solid Modelling
Solid modeling is a consistent set of principles for mathematical and computer modeling of
3 dimensional solids. Solid modeling is based more on physical fidelity. In solid modeling
objects can be viewed from any angle. The use of solid modeling techniques allows for
automation of several difficult engineering calculations that are carried out as a part of the
design process. Solid modeling technique serve as the foundation for rapid prototyping,
9
digital archival and reverse engineering by reconstructing solids from sampled points on
physical objects, mechanical analysis using finite elements, motion planning, kinematics
and dynamic analysis of mechanisms, and so on.
Solid modeling research and development has effectively addressed many of these
issues, and continues to be a central focus of computer aided engineering.
0.8 Simulation
Simulation can be referred as a process of running a model. It is defined as the use of
a computer to represent dynamic responses of a system by the behavior of the system
modelled after it. It uses mathematical description (or model) of a real life system and
then convert it into a computer program. The models contain equations that is identical
to the functional relationships within the real system. The program run is converted from
the resulting mathematical dynamics form to an analog form of the real system; which
the results given takes the form of data.
A simulation can take the form of a computer graphic image that represents dynamic
processes in an animated order. They are used to study the response to conditions
that cannot be easily applied in real life situations. Mathematical equations could be
used to adjust the model using certain variables. Simulations are useful in allowing the
observers measure and predict the functionality of a system may be affected by altering
the individual components within the system. Simulations are done on both business and
geometric models respectively. Geometric model is used for numerous applications that
requires simple mathematical modelling objects e.g. building, the molecular structure of
chemicals etc. A more advanced simulation like the emulation of weather patterns; is
usually performed using a powerful workstation or mainframe computers.
2D graphics models may combine geometric models (also called vector graphics), dig-
ital images (also called raster graphics), text to be typeset (defined by content, font style
and size, color, position, and orientation), mathematical functions and equations, and
more. These components can be modified and manipulated by two-dimensional geomet-
10
ric transformations such as translation, rotation, scaling. In object-oriented graphics,
the image is described indirectly by an object endowed with a self-rendering method a
procedure which assigns colors to the image pixels by an arbitrary algorithm. Complex
models can be built by combining simpler objects, in the paradigms of object-oriented
programming.
0.9 Applications of Geometric modelling
a. Computer Aided Design/ engineering (CAD/CAE)
b. Entertainment: Special effects, Animation, games.
c. Scientific Visualization
d. Education, Information and advertising.
11
MODULE 3: UNIT 2
Surfaces
0.10 Introduction
A surface is the outer or topmost boundary of an object. In mathematics, specifically, in
topology, a surface is a two-dimensional, topological manifold. The most familiar exam-
ples are those that arise as the boundaries of solid objects in ordinary three-dimensional
Euclidean space R3, such as a sphere. On the other hand, there are surfaces, such as
the Klein bottle, that cannot be embedded in three-dimensional Euclidean space without
introducing singularities or self-intersections.
To say that a surface is ‘two-dimensional’ means that, about each point, there is a
coordinate patch on which a two-dimensional coordinate system is defined. For example,
the surface of the Earth is (ideally) a two-dimensional sphere, and latitude and longi-
tude provide two-dimensional coordinates on it (except at the poles and along the 180th
meridian).
The concept of surface finds application in physics, engineering, computer graphics,
and many other disciplines, primarily in representing the surfaces of physical objects. For
example, in analyzing the aerodynamic properties of an airplane, the central consideration
is the flow of air along its surface.
In computer-aided geometric design a control point is a member of a set of points used
to determine the shape of a spline curve or, more generally, a surface or higher-dimensional
object.
0.11 Planar Surface
Planar surface object is a flat object that creates floors or adds a surface below a model
to receive shadows that are being cast from light sources. Planar surface are created in
two ways;
12
a. Pick two points in a drawing
b. Select a closed 2D object such as a circle, closed poly-line or region.
In mathematics, a plane is any flat, two-dimensional surface. A planar surface means
that the surface of a material is straight in two dimensions, an example would be a
perfectly flat smooth piece of glass. If a chip is on the glass surface, or if the glass is
heated and curves, then it is no longer a planar surface. Planar simply means that the
thing has the form of a plane, a two dimensional surface. you could follow it left to right
and back to front but not up and down (well, two of those three depending on which
direction the plane is oriented; there will be one of the three primary directions where
whatever it is does not go because it is a plane).
It is like when you are looking at a rock face and you can see a horizontal bedding
plane (one dimensional), and then imagining that it goes back into the rock face (almost
like carpets stacked one above the other, you cannot see the ones underneath, but you
know they are there). Planar surfaces can be mapped using their surface normals and
per-pendicular distances, along with their convex hulls.
With Planesurf, planar surfaces can be created from multiple closed objects and the
edges of surface or solid objects. During creation, you can specify the tangency and bulge
magnitude. Planar surfaces are created from a set of closed edges. A software used here
in creation of planar surface is Solid Works.
0.12 Bi-cubic Surface Patch
Using bi-cubic Bezier surfaces instead of other surface types makes a lot of sense. They are
a nice balance between simplicity and complexity, providing freedom for the artist with a
minimal amount of complexity for the programmer and renderer. Bezier surfaces are just
about as simple as you can get for curved surfaces. They are defined by a square grid of
control points. The bounding curves of the surface are Bezier curves dictated purely by
the control points at the edge. The surface between the edges is controlled by a simple
13
proportion of nearby control points. The limitations placed on control point position to
ensure continuity between neighboring surfaces is well-known and easy to enforce. Bi-
cubic surface is used to compute a set of curves using control points first. Points on the
curves are then used as control points to compute the final point on the surface. Bi-cubic