Graphics Packages
Task Oriented systems:
GKS - Graphics Kernel System
PHIGS - Programmer's Hierarchical
Interactive Graphics System
PEX 3D - PHIGS+ Extensions to X
OpenGL - The prevalent standard - originated by SGI.
What good are standards when you have so many?
"Industry" Standards
-
OpenGL
(Now a consortium) - 3D & 2D library level
graphics package available on a wide variety of machines.
-
VRML
- Virtual Reality Modeling Language - Higher level language allowing object
and scene specification and navigation
-
Renderman - Pixar's "lower-level" language for writing
shaders
Transformation Hierarchies
-
Used for Hierarchical objects : specify a complex
object out of simpler parts.
-
Now, we want to apply a transformation to a ollection
of the parts
-
For example,
-
Assume that we have a torso, upper arm, lower arm, upper
leg, and lower leg.
-
If we want to swing the leg at the hip, the rotation to
do this has to also apply to the lower leg.
-
If we translate the torso, the rest of the body should
be translated as well.
-
We will use relative transformations and concatenation
of transformations.
-
For each part, we will specify
-
Local transformations: a series of transformations to
scale it and position it at its center for rotation about
the joint
-
Positioning Transformations:A series of transformations
to position it at the appropriate joint on our final object.
-
Example: Specify how to get the lower arm so that
it can be rotated at the elbow.
-
Each joint will have a rotation angle to rotate about
that joint. This rotation will propogate down the hierarchy of parts.
-
Objects will be considered to be a collection of nodes
& links.
-
Nodes: have 2 parts:
-
geometry of the data
-
local transformations to scale, rotate & translate
it to get it ready for operations at the joint
-
Links: have 2 parts:
-
matrix to rotate the node at the joint
-
matrix to translate the rotated node to final position
in the hierarchy.
-
Example: Square man
-
So,
name
data
transformations needed
torso
square, A Tb
upper arm square,
B Tb Cs Rs
forearm
square, B' Tb Cs Rs CeRe
-
Want to concatenate the transformations as needed as you
go down the hierarchy. We will only associate the new transformations at
each link:
name
Assoc Tranf. Concat. Tranform.
torso
Tb
M = Tb
upper arm CsRs
M = M Cs Rs = Tb Cs Rs
forearm
CeRe
M = M CeRe =TbCsRsCeRe
-
Traversing the Hierachies:
Start at Link0, push that transformation matrix on
a stack
At link 1, set M = M*Link1 matrix
Multiply points by M,
Push M on stack.
At link 2, set M = M*Link2 matrix
Multiply points by M,
Push M on stack.
Continue until you reach the end node.
As you go back up the hierarchy, you pop the matrix
stack and traverse any other branches at that level.
-
Example 2:
-
Used in traditional cell animation
-
Draw objects on different cell.
-
Put background on bottom cell
-
Layer the other objects on cells and place in back to
front order.
-
Gives limited depth by using several 2D planes
-
Simple algorithm:
for i= backplane to frontplane
scan convert all objects in plane i
end
-
To increase realism, simulate parallax by moving objects
on backplanes less than foreground planes.
-
Pan slower accross the background planes.
-
Anything in plane i, overwrites the information in the
more distant planes.
-
Use for Animation