Projection From 4D To 3D
Projection From 4D To 3D
net/publication/228571083
Projection from 4D to 3D
CITATIONS READS
7 164
2 authors, including:
Daniela Velichova
Slovak University of Technology in Bratislava
38 PUBLICATIONS 27 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
I Workshop on Innovative Teaching Methodologies for Math Courses on Engineering Degrees View project
All content following this page was uploaded by Daniela Velichova on 06 January 2014.
Projection from 4D to 3D
1. Introduction
Geometric objects in the space R4 can be projected first into the space R3 and then into
the plane R2 . We prefer orthographic projections against other parallel projections, as they
are an approximation of the central projection with large distance. The advantage of the
orthographic projection is a rather good realism in visualization of unknown geometric objects.
The basic aspect of a realistic view of smooth surfaces after a projection R3 → R2 is to find
the outline curve; an algorithm is described in [10].
In the projection P : R4 → R3 those 3-dimensional objects are visible, that are in the
case of the central projection close to the centre of projection (we restrict our consideration
on the projection of only one of the open semi-spaces determined by the hyperplane parallel
to the projection plane and incident to the centre of projection). In the case of a parallel
projection visible objects are in larger distance from the 3-dimensional projection plane, if
these distances are oriented opposite to the rays of sight. Visibility defined in this way will
be denoted by W 4 .
The visibility W 4 in the projection P is different from the visibility W 3 in the space R3
that is applied on any projection R3 → R2 . E.g., in the projection of a simplex S 4 ⊂ R4
we suppose that the centre of projection is an exterior point (for parallel projections this
condition is always satisfied). A simplex S 4 with vertices A1 , . . . , A5 is projected onto the
convex hull of the five image points A∗1 , . . . , A∗5 . If one of these points A∗i is an interior point
of the tetrahedron formed by the remaining four image points A∗k , then the four edges passing
through A∗i are non-visible in the visibility W 3 , but these points are visible in the visibility
W 4 . If any point A∗i , i = 1, . . . , 5 is an exterior point of the tetrahedron determined by the
remaining four points, then one and only one edge is non-visible in both visibilities W 4 and
W 3 . If one point A∗i is located on one edge of the tetrahedron of the remaining A∗k , then all
edges are visible in the visibility W 3 .
Generally, there is no chance to define a visibility when any R4 -object is projected into
R2 . The reason is that the ”rays of sight“ are planes, and for any two points in a plane one
cannot define that one point ”hides“ the other. Such a remark can be found also in [6].
Visibility W 4 is suitable for enlightening the space R4 . In the figures included in the
paper the visibility W 3 was applied, as it is easier to realize in the projection plane R2 .
x1 + x2 + . . . + xn + xn+1 = 1,
and we even have to assume that no point of the figure V is located in the hyperplane
x1 + . . . + xn+1 = 0 parallel to R. In this situation we do not speak of the projective space
Pn , but of barycentric coordinates in Rn .
any hyperbola by
Generally, a conic section in Rn+1 can be represented by a linear vector combination of different
basic functions
{1, t, t2 }, {1, sin t, cos t}, {1, exp t, exp(−t)},
and so on. In the space Rn we get the corresponding ”rational” functions.
Quite a wide variety of curves in R3 that are useful for technical applications can be
determined with the basis {1, t, t2 , t3 }. These are curves generated from cubic curves in R4 ,
while the vector coefficients can be four linearly independent vectors in R4 .
Any affine transformation Rn → Rn or parallel projection Rn → Rn−1 transforms the
control polygon (or net) to the control polygon (or net). An affine transformation R n+1 →
Rn+1 or the central projection from the origin O, Rn+1 → Pn (that is the extension of Rn by
the hyperplane xn+1 = 0), transforms the control polygon {Qj | j = 1, . . . , k} ⊂ Rn+1 onto
the polygon {Q∗j | j = 1, . . . , k} ⊂ Pn . If all vertices Q∗j of the polygon are real points of the
projective extension of the space Rn , then the function coefficient at the vertex Q∗j will be of
the form
fj
fj∗ = P ,
fj Qj,n+1
j
Let the control polygon {Q1 , . . . , Qk } be a simplex in Rn+1 , i.e., k = n+1, then the vertex
Q1 can be associated to the (n + 1)-tuple (1, 0, . . . , 0), and vertex Qn+1 to the (n + 1)-tuple
(0, . . . , 0, 1). For k > n + 1 the vertices Qi ∈ Rn+1 , i = 1, . . . , k , can be regarded as the
parallel views of the vertices of any simplex in Rk−1 .
The practical advantage of the determination of barycentric coordinates for the control
polygons is that all barycentric coordinates of any point B are positive numbers, if and only if
the point is located inside the simplex. In connection to the parallel projection of the simplex,
the following statement is valid: If all coefficients determining the point B with respect to
the control polygon are positive and the sum of them equals 1, then B is located inside the
convex hull of the control polygon.
2-surfaces in R4 can sometimes be modelled as the graph of any complex function f (z)
in one complex variable z = x + iy. This gives for f (z) = u(x, y) + iv(x, y)
x1 = Re z, x2 = Im z, x3 = u = Re f (z), x4 = v = Im f (z).
In Fig. 1 central views of graphs of the functions f (z) = 4 + i + z 2 (on the left) and
f (z) = 4 + z 2 (on the right) under the central projection from the origin (0, 0, 0, 0) onto the
hyperplane x4 = 1 are displayed.
2-surfaces in R4 can also be determined by basic functions
When x4 (u, v) is sufficiently far from zero, we receive in R3 a closed torus-like surface. Some
examples are shown in the Figures 2 and 3. The orthographic view of the surface defined by
the parametric equations
by normalizing:
cos t cos u cos v sin t cos u cos v sin u cos v sin v
− sin t cos t 0 0
Q=
− cos t sin u
.
− sin t sin u cos u 0
− cos t cos u sin v − sin t cos u sin v − sin u sin v cos v
T
It is easy to prove, that Q = Q−1 and Q ∈ O+ (4).
At parallel projections from R3 to R2 usually the image of the last coordinate axis is
specified as a vertical line in the projection plane. This can be assured by excluding the row
with the partial derivatives with respect to r in the matrix of the projection. After erasing
the first row in Q the matrix
− sin t cos t 0 0
P= − cos t sin u − sin t sin u cos u 0
− cos t cos u sin v − sin t cos u sin v − sin u sin v cos v
The sum of squared norms of the columns in the matrix Q equals 4. The columns in
the matrix P determine the orthographic views of four unit vectors along the coordinate
axes +x, +y, +z, +w. The sum of squared norms of the columns of P is 3. This is a well-
known property when the unit points of a cartesian frame are mapped under an orthogonal
projection; this result can be found in [8, 5, 7]. Using the matrix Q instead of P, the first
additional coordinate will determine the oriented distance of the projected point in R4 to the
image hyperplane R passing through O.
62 S. Zachariáš, D. Velichová: Projection from 4D to 3D
The views in Fig. 7 from left to right are obtained from Q by cancelling the first, the second,
the third, or finally the last row, respectively.
Any helix in R3 is a non-self-intersecting curve, but its orthographic view to the plane is
a prolonged cycloidal curve which can be self-intersecting. Similarly, a 2-surface in R4 which
is not self-intersecting can have a self-intersecting orthogonal view in R3 .
Let us inscribe into the hypersphere S 3 a regular cross-polytope with vertices (±1, 0, 0, 0),
. . . , (0, 0, 0, ±1), the dual to the hypercube. There are four triples of axes, and any triple
generates a regular octahedron that is inscribed into a sphere Si2 ⊂ S 3 , i = 1, . . . , 4. In this
way we obtain on the hypersphere S 3 four congruent concentric spheres Si2 , i = 1, . . . , 4 , any
two of them intersect orthogonally in a concentric circle with the same radius. The spheres
Si2 intersect the hypersphere S 3 in 16 curve-like tetrahedra, precisely in 16 homeomorphic
images of a tetrahedron that compose the hypersphere S 3 . Four ”principal” spheres Si2 are
projected by the orthographic projection P : R4 → R3 onto four ellipsoids that are inscribed
into the ”outline” (i.e. a sphere S 2 ) in R3 , and then projected by a perspective, as it can be
seen in Fig. 8. Conjugate diameters of these ellipsoids are three lines from four diagonals of
the regular cross-polytope.
The central projection from the origin O onto the hyperplane x1 + x2 + x3 + x4 = 1
results in the determination of well-known barycentric coordinates in R3 . This hyperplane
with the normal vector n = (1, 1, 1, 1) can be regarded as the image plane for an orthogonal
axonometry. The unit normal vector is
r
1 3
n1 = (1/2, 1/2, 1/2, 1/2), while sin v = , cos v = .
2 2
The unit vector of the orthographic view of n1 in the plane (x1 , x2 , x3 ) is
√ √ √ √ √
n11 = (1/ 3, 1/ 3, 1/ 3), and then sin u = 1/ 3, cos u = 2/ 3.
The unit vector of the orthographic view of n11 in the plane (x1 , x2 ) is
√ √ √ √
n111 = (1/ 2, 1/ 2), and then sin t = 1/ 2, cos t = 3/2.
64 S. Zachariáš, D. Velichová: Projection from 4D to 3D
4. Quaternions
The space R4 = C 2 can be regarded as the set H of quaternions. Quaternions were defined
by W. Hamilton in the year 1843. They are a generalization of complex numbers R2 = C,
where the real (scalar) part Re H remains in R and a new imaginary part (vector part, pure
quaternion) Im H in {R3 \ O} with three axes {i, j, k} is introduced, i.e. for a1 , . . . , a4 ∈ R
a := a1 + a2 i + a3 j + a4 k ∈ H, Re a = a1 , Im a = a2 i + a3 j + a4 k.
S. Zachariáš, D. Velichová: Projection from 4D to 3D 65
The sum of two quaternions a + b can be regarded as the standard vector sum. The multi-
plication of quaternions is associative and satisfies the distributive laws and the relations
Hence
ab = (a1 + a2 i + a3 j + a4 k)(b1 + b2 i + b3 j + b4 k) =
(a1 b1 − a2 b2 − a3 b3 − a4 b4 ) + (a2 b1 + a1 b2 − a4 b3 + a3 b4 ) i+
+(a3 b1 + a4 b2 + a1 b3 − a2 b4 ) j + (a4 b1 − a3 b2 + a2 b3 + a1 b4 ) k.
It follows from these properties that the product of two pure quaternions from Im H, i.e.
a1 = b1 = 0, can be expressed in the cartesian coordinates as the difference of the vector
product a × b minus the scalar product a · b:
(a2 i + a3 j + a4 k) (b2 i + b3 j + b4 k) =
= −a2 b2 − a3 b3 − a4 b4 + (a3 b4 − a4 b3 )i − (a2 b4 − a4 b2 )j + (a2 b3 − a3 b2 )k =
= (a × b) − (a · b).
If c ∈ Im H, then c2 < 0.
In the terms of algebra, the quaternions form an associative non-commutative field. With
respect to the Frobenius theorem (1877), quaternions form the unique associative non-
commutative finitely dimensional algebra with a unit element and without zero divisors. It
is interesting to point out that both (scalar and vector) products a · b and a × b were born
historically in the theory of quaternions.
Conjugate quaternions and their norms satisfy the following formulae:
a := a1 − a2 i − a3 j − a4 k = Re a − Im a, a b = b a,
√ a
kak = a a, a−1 = for a 6= 0.
kak2
The product ab of quaternions a, b can be expressed in several matrix forms:
a1 −a2 −a3 −a4 b1
¢ a2 a1 −a4 a3 b2 =
¡
ab = 1 i j k a3 a4 a1 −a2 b3
a4 −a3 a2 a1 b4
b1
b2
= 1 i j k A.
¡ ¢
b3 =
b4
b1 b2 b3 b4 1
¡ ¢ −b2 b 1 −b 4 b 3 i
= a1 a2 a3 a4 −b3 =
b4 b1 −b2 j
−b4 −b3 b2 b1 k
1
¡ ¢/ i
= a1 a2 a3 a4 B j .
k
66 S. Zachariáš, D. Velichová: Projection from 4D to 3D
For quaternions from Im H the matrices A. and / B are antisymmetric. For unit quaternions
the matrices A. and / B are orthogonal and their determinant is equal 1; they are elements of
the group O+ (4).
In analogy to the fact that the complex number b1 + b2 i corresponds homomorphically to
the real matrix µ ¶
b1 b2
,
−b1 b1
Cayley showed 1858 that the quaternion b1 + b2 i + b3 j + b4 k corresponds to the complex
matrix (see [2]) µ ¶
b1 + b 2 i b3 + b 4 i
.
−b3 + b4 i b1 − b2 i
In this sense the imaginary unit i∈ C corresponds to the unit j ∈ H.
µ ¶ µ ¶ µ ¶ µ ¶
1 0 i 0 0 1 0 i
1↔ , i↔ , j↔ , k↔ .
0 1 0 −i −1 0 i 0
O : H → H, q 7→ r q s .
The converse statement is also valid (see [1]) which means, that for any O ∈ O + (4) there
exist two unit quaternions r, s generating this spherical motion. The pairs (r, s) = (1, 1) and
(−1, −1) correspond to the identity IdR4 in O+ (4).
The multiplication in the group O + (4) can be expressed by means of the quaternion
product: Let two elements from O + (4) correspond to two pairs (r, s) and (r0 , s0 ) of unit
quaternions, respectively: The product of these pairs is the pair (r s, r0 s0 ), because the
following holds:
q 7→ rr0 q ss0 = r(r0 q s0 )s.
Comparing quaternion and matrix expression of the elements of O + (4) we have
q1 q1
T q ¢ . q2
2
¡
r(q s) = 1 i j k R. / S
¡ ¢
q3 = 1 i j k M q3 ,
q4 q4
T
M. = R . / S = R . / S =
S. Zachariáš, D. Velichová: Projection from 4D to 3D 67
r1 −r2 −r3 −r4 s1 s2 s3 s4
r2 r1 −r4 r3 −s2
s1 −s4 s3
=
r3
.
r4 r1 −r2 −s3 s4 s1 −s2
r4 −r3 r2 r1 −s4 −s3 s2 s1
For r = s we receive the classical revolution in Im H:
1 0 0 0
2 2
0 1 − 2(r + r ) 2(r r
2 3 − r r
1 4 ) 2(r 1 3 + r 2 r4 )
r
M. = R./ R = 3 4
0 2(r2 r3 + r1 r4 ) 1 − 2(r22 + r42 ) 2(r3 r4 − r1 r2 )
∈ O+ (3).
0 2(r2 r4 − r1 r3 ) 2(r1 r2 + r3 r4 ) 1 − 2(r22 + r32 )
r (λr) r = λr, Re (r q r) = 0, r · q = 0 =⇒ r · (r q r) = 0 .
From this follows that the matrix M. which is the matrix of a revolution (about the plane
determined by the real axis and Im r) acts only on Im H. The matrix (−M. ) operates in Im H
as the symmetry with respect to the plane passing through the origin and perpendicular to
Im r (proof in [1]).
All unit quaternions form a hypersphere S 3 ⊂ R4 , and any point r located on this
hypersphere corresponds to an orthogonal matrix R. with det R. = 1. The quaternion r will
be related to the oriented revolution in Im H about the axis determined by Im r according to
q 7→ r q r . Instead of the unit quaternion r it is possible to choose a non-zero quaternion d.
Any such revolution is regarded as the element of the group O + (3). The angle θ of revolution,
0 ≤ θ ≤ π, can be expressed as (see [1] or [3])
µ ¶ µ ¶
kIm rk kIm dk
θ = 2 arctan = 2 arctan .
|Re r| |Re d|
Re r = r1 = 0 implies θ = π, and we have an axial symmetry in Im H with respect to the line
λr.
To determine the angle θ in the easier way, we can express, while choosing the unit
quaternion as c ∈ Im H, the unit quaternion r of the revolution q 7→ r q r in the form
presented in [3]:
θ θ
r = cos + c sin .
2 2
The group O (3) has three free parameters, the same as its model S 3 ⊂ H.
+
Limits for the angle θ in the interval [0, π] are not essential, because the complementary
interval [π, 2π] can be achieved by a revolution about the axis determined by the vector (−c)
for the angles also in the interval [0, π]. This topological problem in R3 will be not a problem
in the projective space P3 , because this is homeomorphic to O + (3). The converse statement is
also valid (see in [1]), to any revolution from O + (3) there can be related a non-zero quaternion
generating this revolution in Im H.
Modelling a spherical motion in R4 enables us to construct different views of 4-dimensional
objects in such a way, that the object is firstly “revolved” and then projected into the 3-
dimensional space defined by the first three coordinate axes (similarly as in the projection
R3 → R2 ).
For an orthographic view it is sufficient to exclude one coordinate. There exists a de-
composition of the matrix Q ∈ O + (4) (see Section 1), Q. = R. / S , anyhow the construction
68 S. Zachariáš, D. Velichová: Projection from 4D to 3D
of matrices R. , / S is a different problem. On the other hand, with the help of the random
generator of quaternions r, s it is easy to create a random matrix in O + (4) as the product
(R./ S). Excluding one of the rows the random matrix P of a projection from R4 to R3 can be
obtained. This projection includes also the revolution of the orthographic view in R3 , when
the orthographic views of the axis k are not necessarily coincident with the z-axis.
Several examples are illustrated in Fig. 9, where the spherical motion is determined by
the quaternion a0 = r a s, while
and intervals for parameters u, v are given in the figure. The corresponding projection is
applied to the hypersphere S 3 , and its image is then projected by a linear perspective from
R3 to R2 .
The other possible access is to compose revolutions about six pairs of coordinate axes.
Six corresponding angles are in the interval [0, 2π]. The number of free parameters of the pair
(r, s) with |r| = |s| = 1 is six. The product of these two revolutions needs not be a classical
revolution, but it is a spherical motion.
cos α − sin α 0 0 1 0 0 0
sin α cos α 0 0 0 1 0 0
=
0 0 1 0 0 0 cos β − sin β
0 0 0 1 0 0 sin β cos β
S. Zachariáš, D. Velichová: Projection from 4D to 3D 69
cos α − sin α 0 0
sin α cos α 0 0
=
0
.
0 cos β − sin β
0 0 sin β cos β
In general the last matrix has not two real eigenvectors that would determine a plane, about
which the classical revolution could be performed.
References
[1] M. Berger: Géométrie. CEDIC and Fernand Nathan, Paris 1977.
[2] B.A. Dubrovin, S.P. Novikov, A.T. Fomenko: Sovremennaya geometriya, metody
i priloženiya. Nauka, Moskva 1986.
[3] J.C. Hart, G.K. Francis, L.H. Kauffman: Visualizing Quaternion Rotation. ACM
Transactions on Graphics 13 (3), 256–276 (1994).
[4] G.C. Laghi: About the Contour Shape of a Hypercube in Isometric Axonometry. Pro-
ceedings of the 3rd ICECGDG, Vienna 1988, vol. 1, 300–304.
[5] H. Stachel: Mehrdimensionale Axonometrie. Proceedings Congress of Geometry, Thes-
saloniki 1987, 159–168.
[6] H. Stachel: The Right-Angle-Theorem in Four Dimensions. Journal of Theoretical
Graphics and Computing 3, 4–13 (1990).
[7] H. Stachel: Parallel Projections in Multidimensional Space. Proceedings Compugraph-
ics ‘91, Sesimbra (Portugal) 1991, vol. I, 119–128.
[8] W. Wunderlich: Zur normalen Axonometrie des vierdimensionalen Raumes. Monatsh.
Math. 80, 231–240 (1975).
[9] S. Zachariáš: Projection in barycentric coordinates. Proceedings WSCG 96, Plzeň
(CZ), 1996.
[10] S. Zachariáš: Projekce hladkých ploch. Proceedings Seminars on Computational Ge-
ometry SCG’97, Kočovce (SR), 1997, 189–193.