\
|
1
z
y
x
Still using homogenous
coordinates
Need 4 coords
) 1 , , , ( z y x
3D Transformations
Since we now have an additional coordinate
to cope with, our transformation matrices
must also expand to cope.
each transformation matrix with require an
extra row and an extra column to become
4x4 matrices.
Scaling
x
y
z
|
|
|
|
|
.
|
\
|
|
|
|
|
|
.
|
\
|
=
|
|
|
|
|
.
|
\
|
'
'
'
1
.
1 0 0 0
0 0 0
0 0 0
0 0 0
1
z
y
x
S
S
S
z
y
x
z
y
x
Translation
x
y
z
|
|
|
|
|
.
|
\
|
|
|
|
|
|
.
|
\
|
=
|
|
|
|
|
.
|
\
|
'
'
'
1
.
1 0 0 0
1 0 0
0 1 0
0 0 1
1
z
y
x
T
T
T
z
y
x
z
y
x
Rotation (about axes)
In 2 dimensions, rotation were defined to take place about
some stationary point - the centre of rotation.
In 3d, all rotation take place about one of the axes.
x
y
z
x
y
z
x
y
z
u +ve
u
+ve
u +ve
Rotation (about axes)
x
y
z
u
=-90
-90 about x axis
Rotation
x-axis
y-axis
z-axis
|
|
|
|
|
.
|
\
|
|
|
|
|
|
.
|
\
|
=
|
|
|
|
|
.
|
\
|
'
'
'
1
.
1 0 0 0
0 cos sin 0
0 sin cos 0
0 0 0 1
1
z
y
x
z
y
x
u u
u u
|
|
|
|
|
.
|
\
|
|
|
|
|
|
.
|
\
|
=
|
|
|
|
|
.
|
\
|
'
'
'
1
.
1 0 0 0
0 cos 0 sin
0 0 1 0
0 sin 0 cos
1
z
y
x
z
y
x
u u
u u
|
|
|
|
|
.
|
\
|
|
|
|
|
|
.
|
\
|
=
|
|
|
|
|
.
|
\
|
'
'
'
1
.
1 0 0 0
0 1 0 0
0 0 cos sin
0 0 sin cos
1
z
y
x
z
y
x
u u
u u
Local Rotation
translate the object to
be rotated to the
origin, perform the
rotation and translate
it back to where it
started from
x
y
z
u =-90
Proyeksi
Representasi object 3D di atas layar 2D
Asal muasalnya dan seringnya digunakan
oleh juru gambar dan arsitek dalam
menggambar desain
Several different projections exist
Bergantung dari arah penglihatan
pengamat
Terms and definitions
C
x
y
z
A
B
A
B
screen
z extent
x extent
y extent
view volume
centre of projection
(also called plane)
Macam Proyeksi
so?
We need to calculate the screen coordinates
(x
s
y
s
) of each projected point from the 3d
coordinates
(theyre not the same!)
Usually!
Fortunately we can consider this calculation
as a transformation.
Can use matrices to represent the various
ways of doing it.
Parallel Projection
|
|
|
|
|
.
|
\
|
|
|
|
|
|
.
|
\
|
=
|
|
|
|
|
.
|
\
|
1
.
1 0 0 0
0 0 0 0
0 0 1 0
0 0 0 1
1
0 z
y
x
y
x
s
s
Perspective Projection
|
|
|
|
|
.
|
\
|
|
|
|
|
|
.
|
\
|
=
|
|
|
|
|
.
|
\
|
+
1
.
1 / 1 0 0
0 0 0 0
0 0 1 0
0 0 0 1
1
0
z
y
x
d
d
z
y
x
s
s
Perspective Projection
p (x,y,z)
z
x
screen
p
s
(x
s
,y
s
)
C
d
By similar triangles:
d
x
d z
x
s
=
+
d
z
x
x
s
+
=
1
d
z
y
y
s
+
=
1
Perspective Projection
|
|
|
|
|
|
|
|
|
.
|
\
|
+
+
=
1
0
1
1
.
d
z
y
d
z
x
want
So.
Divide by
d
z
+ 1
Perspective Projection
|
|
|
|
|
.
|
\
|
|
|
|
|
|
.
|
\
|
=
|
|
|
|
|
.
|
\
|
+
1
.
1 / 1 0 0
0 0 0 0
0 0 1 0
0 0 0 1
1
0
z
y
x
d
d
z
y
x
s
s
Oblique Parallel Projections
A parallel projection is one where all the lines that are
parallel in 3d space remain parallel when projected.
An oblique parallel projection is one where the object in
question is viewed from the side - unlike the (plain)
parallel projection.
The z axis is drawn at some angle (o) to the x axis
A number of standard oblique parallel
projections are used in engineering drawing:
cavalier
cabinet
orthogonal
Cavalier Projection
The length of a line on
the screen is equal to its
length in the model.
This causes a distortion
by over emphasising the
z-axis
o
Cabinet Projection
The foreshortening of the z
axis is increased to provide a
more realistic view.
Orthogonal Projection
The orthogonal projection is
just the simple parallel
projection
Oblique Parallel Projections
x
y
o
(x
s
,y
s
)
(0,0,1)
P
Consider the point P:
P can be represented in 3D
space - (0,0,1)
P can be represented in 2D
(screen coords) - (x
s
,y
s
)
P can be represented in 2D
via polar coordinates - (o,)
Oblique Parallel Projections
At (0,0,1)
x
s
= cos o
y
s
= sin o
Generally
multiply by z and allow for (non-zero) x and y
x
s
= x + z..cos o
y
s
= y + z..sin o
Oblique Parallel Projection
x
y
o z
(0,0,1)
|
Cavalier cabinet
and orthogonal
projections can all
be specified in
terms of (o,|)
-or (o,) since
tan | = 1/
Oblique Parallel Projection
o = 0 360 Orthogonal projection | = 90 =0
o = 0 360 Cabinet projection | = 63.4 =0.5
o = 0 - 360 Cavalier projection | = 45 =1
Oblique Parallel Projection
as a matrix
|
|
|
|
|
.
|
\
|
|
|
|
|
|
.
|
\
|
=
|
|
|
|
|
.
|
\
|
1
.
1 0 0 0
0 0 0 0
0 sin 1 0
0 cos 0 1
1
0 z
y
x
y
x
s
s
o
o
Isometric Projection
|
|
|
|
|
.
|
\
|
1 0 0 0
0 60 cos 0 60 sin
0 0 1 0
0 60 cos 0 60 sin
All 3 axes are equally foreshortened allowing
measurements along the axes to made with the same scale.