Skip to Main Content
3D Game Engine Design, 2nd Edition
book

3D Game Engine Design, 2nd Edition

by David Eberly
November 2006
Intermediate to advanced content levelIntermediate to advanced
1040 pages
26h 31m
English
CRC Press
Content preview from 3D Game Engine Design, 2nd Edition
534 Chapter 10 Standard Objects
Any point on the triangle may be represented in plane coordinates using Equation
(10.1). More common, though, is to write the points using barycentric coordinates:
X = b
0
P
0
+ b
1
P
1
+ b
2
P
2
where b
i
[0, 1] for all i and b
0
+ b
1
+ b
2
= 1. For any point in the plane of the
triangle, the same representation works but the b
i
may be any real numbers. Given
X, you may solve for the barycentric coordinates:
X P
0
= (b
0
1)P
0
+ b
1
P
1
+ b
2
P
2
= b
1
(P
1
P
0
) + b
2
(P
2
P
0
)
Applying various dot products, you may set up the linear system of equations
(P
1
P
0
)
.
(P
1
P
0
)(P
1
P
0
)
.
(P
2
P
0
)
(P
2
P
0
)
.
(P
1
P
0
)(P
2
P
0
)
.
(P
2
P
0
)

b
1
b
2
=
(P
1
P
0
)
.
(X P
0
)
(
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

3D Game Engine Architecture

3D Game Engine Architecture

David Eberly
Blender 3D By Example - Second Edition

Blender 3D By Example - Second Edition

Oscar Baechler, Xury Greer
Computer Graphics

Computer Graphics

Alexey Boreskov, Evgeniy Shikin

Publisher Resources

ISBN: 9781482267303