Skip to Main Content
XNA 3.0 Game Programming Recipes: A Problem-Solution Approach
book

XNA 3.0 Game Programming Recipes: A Problem-Solution Approach

by Riemer Grootjans
May 2009
Intermediate to advanced content levelIntermediate to advanced
671 pages
18h 34m
English
Apress
Content preview from XNA 3.0 Game Programming Recipes: A Problem-Solution Approach
CHAPTER 5 ■ GETTING THE MOST OUT OF VERTICES
507
5-16. Apply Catmull-Rom Interpolation in 3D to
Generate Additional Vertices
The Problem
Givena sequence of points in 3D space, you want to construct a nice, smooth curve that goes
exactly through these points. The black curve in Figure 5-32 shows such a line, while the gray
curve shows what you would get using simple linear interpolation, as described in recipe 5-9.
5
0
1
2
3
4
Figure 5-32. Catmull-Rom spline crossing five points
This can be quite useful in many cases. As an example, you can use it to generate a racing
track, as explained in recipe 5-17. Also, whenever the camera zooms in very closely ...
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

XNA 4.0 Game Development by Example: Beginner's Guide

XNA 4.0 Game Development by Example: Beginner's Guide

Kurt Jaegers
Learning LibGDX Game Development - Second Edition

Learning LibGDX Game Development - Second Edition

Suryakumar Balakrishnan Nair, Andreas Oehlke

Publisher Resources

ISBN: 9781430218555Purchase Link