CS 455 Lecture 18 – Interpolation
Agenda
- what ?s
- interpolation
- nearest neighbor
- linear
TODO
As a lab exercise:
- Pull from the class code repository.
- Add an
Interpolate
method to yourHeightmap
class. It’s like theoperator()
method, except it takes infloat
indices that lie somewhere within the heightmap grid—not necessarily at locations on the integer lattice. Use bilinear interpolation to find the height as a blend of the four nearest heights at integer locations. - When the user advances or strafes, use the camera’s from’s xz-location to look up the height in the terrain. Call
Camera::SetHeight
to raise the camera accordingly. - Send an email screenshot from a high point on the terrain.
Haiku
on interpolation
Troubled yesterday
Perfect, hope-filled tomorrow
Average today
Troubled yesterday
Perfect, hope-filled tomorrow
Average today