Unit Iv
Unit Iv
3.1 Modeling
1
Models such as climate and weather models, statistical models and ecological
models have a big impact on our society.
While the central processing unit (CPU) provides the ability to quickly make
the calculations specific to the element, the software provides the instructions
necessary for efficient transfer of information between user and the CPU.
There are three types of commands used by the designer in CAD geometric
modelling.
It first allows the user to input the variables needed by the computer to
represent basic geometric elements such as points, lines, arcs, circles, splines,
and ellipses.
The second is used to transform these elements that include scaling, rotation,
and translation.
The third allows the various elements previously created by the first two
commands to be joined into a desired shape.
During the whole geometric modelling process, mathematical operations are
at work that can be easily stored as computerized data and retrieved as
needed for review, analysis, and modification.
There are different ways of displaying the same data on the CRT (cathode ray
tube) screen, depending on the needs or preferences of the designer.
One method is to display the design as a 2-D representation of a flat object
formed by interconnecting lines.
Another method displays the design as a 3-D view of the product.
Four Types are; 1 wireframe modeling, 2 surface, 3 solid modeling, and 4 hybrid
solid modeling.
1. Wireframe Modeling:
The wireframe model is a skeletal description of a 3-D part.
It consists only of points, lines, and curves that describe the geometric
boundaries of the object.
There are no surfaces in a wireframe model.
2. Surface modeling:
one defines not only the edge of the 3-D part, but also
its surface.
One of its major benefits is that it allows mass-related
properties to be computed for the product model
(volume, surface area, moment of inertia, etc.)
2
allows section views to be automatically generated.
The surface modelling is more sophisticated than wireframe modelling.
In surface modelling, there are the two different types of surfaces that
can be generated: faceted surfaces using a polygon mesh and true
curve surfaces.
It can exactly represent a wide range of curves such as arcs and cones.
The greater flexibility for controlling continuity.
It can precisely model nearly all kinds of surfaces more robustly than
the polynomial-based curves that were used in earlier surface models.
3. Solid modeling
that defines the surfaces of a product with the added advantages of
volume and mass.
It takes the surface model one step further in that it assures that the
product being modeled is valid and realizable.
This allows image data to be used in calculating the physical properties
of the final product.
Solid modeling software uses one of two methods: constructive solid
geometry (CSG) or boundary representation (B-rep).
CSG method uses engineering Boolean operations (union, subtraction,
and intersection) on two sets of objects to define composite models.
B-rep is a representation of a solid model that defines a product in terms
of its surface boundaries that are faces, edges, and vertices.
4. Hybrid solid modeling allows the user to represent a product with a mixture
of wireframe, surface modeling, and solid geometry.
Shading removes hidden lines and assigns flat colors to visible surfaces.
Rendering adds and adjusts lights and materials to surfaces to produce
realistic effects. Shading and rendering can greatly enhance the realism of
the 3-D image.
3
Virtual Object Shape describe the shape of an object in a virtual or computer-
generated environment. In various fields like computer graphics, virtual reality, and
computer-aided design, creating and manipulating virtual objects with realistic
shapes is crucial for an immersive and effective user experience.
Ex;
4
Parametric Shapes: Virtual objects can be described using mathematical equations
that define their shapes. Example is given below
These equations may represent simple geometric shapes like spheres, cubes, or more
complex parametric surfaces.
Texture Mapping: Apart from the geometric shape, the surface appearance of
virtual objects is also crucial for realism. Texture mapping involves applying 2D
images (textures) onto the surfaces of 3D objects to simulate details like color,
pattern, and reflectivity.
Animation and Deformation: Virtual objects may not only have a static shape but
can also be animated or bent dynamically. Rigging and skeletal animation are
common techniques used for character animation, while techniques like morphing
and skinning are used for shape deformation.
5
3.4 Object Visual Appearance
The visual appearance of objects is given by the way in which they reflect and
transmit light. The colour of objects is determined by the parts of the spectrum of
(incident white) light that are reflected or transmitted without being absorbed.
6
3.5 Kinematics Modelling
It is a branch of mechanics that deals with only the motion of objects but not
the forces that cause the motion. For example, moving trains, and moving water in
a river.
We can find objects in motion all around us.
Even when the person is resting, the heart pumps blood through the veins.
There is the motion of atoms and molecules in all the objects.
There is motion when the ball is hit by a player with his bat.
The branch of classical mechanics that deals with the study of the motion of
points, objects and a group of objects without considering the causes of motion
are called Kinematics.
Kinematics has its application in astrophysics to study the motion of celestial
objects.
It is also used in robotics and biomechanics to explain the motion of objects
with joint parts, such as engines, human skeletons, robotic arms and much
more.
In kinematics, we study the trajectories of the objects, as well as their
differential properties like velocity and acceleration.
Reference Frames
The position of the object relative to the reference frame has to be described
in order to understand the motion of the object.
Mathematically, the variable ‘x’ is used to represent the position of the object.
The position variable x can be described by making two choices.
We can decide where x = 0 has to be put and which direction has to be taken
as the positive direction. This is known as choosing the frame of reference or
the coordinate system.
Therefore, choosing the coordinate system or the set of axes within which the
position, orientation and other properties of the object are being measured is
called the frame of reference.
Displacement
The change in the position of the object with respect to the frame of reference
is called displacement.
For example, if a person walks from his house to the market, the displacement
is the relative distance of the market from his house (frame of reference).
Motion Graph
There are three types of motion graphs that are studied in kinematics.
1. Displacement-time graph
7
2. Velocity-time graph
3. Acceleration-time graph
Motion Diagram
The pictorial
representation of the
motion of the object is called the motion diagram.
In the same diagram, various positions of the object at equally spaced
intervals are represented in a motion diagram.
From the diagram, we can see if the object has accelerated, retarded or is at
rest.
We can understand that the object is getting accelerated if there is an increase
in the space between the objects as time passes, and the object is getting
retarded if the space between the object decreases with time.
Kinematic Equations
There are four kinematic equations when the initial starting point is taken as
the origin and the acceleration of the object is constant.
1. v = v0 + at
2. d = (½) (v0 + v)t
3. d = v0t + (at2/2)
4. v2 = v02 + 2ad
Each of the above equations has only four of the five variables. If we know the value
of three variables in an equation, the fourth variable can be determined.
1. Translation Matrix
2. Rotation Matrix
3. Scaling Matrix
4. Combined Matrix
5. Reflection Matrix
6. Shear Matrix
7. Affine Transformation Matrix
1 Translation Matrix
A translation matrix simply moves an object along with one or more of the three
axes.
9
A transformation matrix representing only translations has a simple form. If we have
to translate a point P (x, y, z) by T_x on the X axis, T_y on the Y axis and T_z on the
Z axis. We can define the translation matrix by:
2 Rotation Matrix
10
3 Scaling Matrix
4 Combined Matrix
Combined Matrix is used for a combination of any two or all three operations.
Such a transformation matrix is formed by the sequential multiplication of the
individual matrices for each operation. Here the sequence is important and mostly
non-commutative.
5 Reflection Matrix
11
It is also called a flip matrix. Reflection is the mirror image of the original object. In
other words, we can say that it is a rotation operation with 180°. In reflection
transformation, the size of the object does not change. It can be represented in
matrix form as
6 Shear Matrix
Shearing is also termed Skewing. A transformation that slants the shape of an object
is called the shear transformation. There are two shear transformations X-Shear and
Y-Shear. X-Shear shifts X coordinate values and the Y-Shear shifts Y coordinate
values. In both cases, only one coordinate changes its coordinates and the other
preserves its values.
X-Shear: X-Shear shifts X coordinates values and preserve the Y coordinate. It can
be represented in the matrix as follows
Y-Shear: Y-Shear shifts Y coordinates values and preserves the X coordinate. It can
be represented in the matrix as follows
12
To represent affine transformations with matrices, we can use homogeneous
coordinates. This means representing a 2-vector (x, y) as a 3-vector (x, y, 1), and
similarly for higher dimensions. Using this system, translation can be expressed
with matrix multiplication.
Animation: Animating objects often involves changing their positions over time. By
modifying the object's position coordinates, you can create movement effects like
translation (moving from one point to another).
Camera positioning: The position of the virtual camera that renders the scene is
also defined in terms of its (x,y,z) coordinates. Proper positioning of the camera is
essential for achieving desired perspectives and views of the scene.
13
Overall, understanding and effectively managing object positions are essential skills
for 3D modellers and computer graphics practitioners, enabling them to create
realistic and immersive virtual environments.
Object hierarchies are essential for organizing and modelling complex systems,
promoting code reuse, and facilitating abstraction and encapsulation in object-
oriented design.
They help developers create more maintainable, extensible, and scalable software
systems by representing real-world relationships and hierarchies in the codebase.
16
3D Representation: In computer graphics, 3D objects are represented using
mathematical models such as polygons, meshes, or parametric surfaces. These
models define the geometry (shape and structure) of objects in the 3D world.
Augmented Reality (AR): Augmented reality overlays virtual objects onto the real-
world environment, combining computer-generated imagery with the user's view of
the physical world.
A physical model can be smaller, larger, or the same size as the actual object
it represents.
Can take advantage of one-dimensional paths in many systems.
Strings, narrow pipes, and other such paths can often be replaced with delay
lines (waveguides).
Any losses and some non-linearity’s along these paths can be lumped into
calculations at connection points.
Delay models round-trip time around string, filters model effects of instrument
body.
17
Excitation can be as simple as a burst of noise, or more elaborate for more
realistic sound synthesis.
Clarinet Model
Voice Model
18
Delay-Based Effects
Ray Casting:
Concept: Involves casting rays or line segments to check for intersections with
objects.
Pros: Efficient for specific scenarios, like shooting or visibility tests.
Cons: Limited to detecting collisions along the ray path.
Choose bounding volumes that closely fit the object shapes to balance accuracy and
efficiency.
Collision Response:
After detecting a collision, determine how objects should respond (e.g., bounce off
each other, trigger an event).
Update Frequency:
Adjust the frequency of collision checks based on the dynamics of the scene to
optimize performance.
Parallelization:
Utilize parallel processing techniques to enhance the speed of collision detection,
especially for large datasets.
Hierarchical Structures:
Implement hierarchical structures like Octrees or KD-trees for organizing and
optimizing collision checks in complex scenes.
2. Radial Deformation:
Deformation based on radial distance from a central point.
Equation for radial deformation: r′=r+a⋅f(r)
Here, r is the radial distance from the center, a is the deformation factor, and
f(r) is an optional function.
3. Sinusoidal Deformation:
Deformation using sinusoidal functions for periodic patterns.
Equation for sinusoidal deformation along the x-axis: x′=x+a⋅sin(b⋅x)
Here, a is the amplitude, b is the frequency, and sin is the sine function.
20
4. Twisting Deformation:
Creates a twisting effect along the surface.
Equation for twisting deformation around the z-axis: θ′=θ+a⋅f(θ)
Here, θ is the angle around the z-axis, a is the twisting factor, and f(θ) is an
optional function.
6. Bulge Deformation:
Creates a bulging effect in a localized region.
Equation for bulge deformation: d′=d+a⋅e−b⋅r2
Here, d is the original surface height, a is the bulge factor, b controls the
spread, and r is the radial distance from a central point.
These equations are simple representations, and you can customize them based on
the specific characteristics you want in the surface deformation. Experimenting with
different mathematical functions and parameters will help you achieve the desired
visual effect.
21