chapter eight

8 Non-linear transformations and surfaces

 

This chapter covers

  • Polynomial transformations in multi-dimensional space
  • Understanding how a multi-dimensional transformation is essentially the same as a surface
  • Using spatial interpolation to build a deformation field

Prior to this chapter, we barely spoke about 3D space. That’s because the math behind linear equations and projective transformations doesn’t change much when you go from 2D to 3D. And since things are usually easier to understand in 2D, there was no good reason for adding a new dimension. Until now. Because this chapter is about building and manipulating 3D objects.

But to get there, we will once again start from a 2D transformation. Although, this time it will be non-linear. In chapter 4, we used a linear transformation to make a scanning app. Adding non-linearity enhances the app by allowing bent book pages to appear as if they were flat.

Then we will reuse the math behind non-linear transformations to build 3D surfaces. In chapter 5, we have already learned about parametric curves, now we’ll see how parametric surfaces are made.

And at the end, we will define a 3D deformation field to help us model not one but a family of 3D surfaces.

8.1 Polynomial transformations in multi-dimensional space

8.1.1 The straightforward approach to polynomial transformations

8.1.2 The fast and simple approach to polynomial transformations

8.1.3 Practical example: adding the “unbending” feature to the scanning app

8.1.4 Summary

8.2 3D surfaces modeling

8.2.1 A surface is just a 3D transformation of a plane

8.2.2 Practical example: planting polynomial-revoluting mushrooms

8.2.3 Summary

8.3 Using non-polynomial spatial interpolation for building surfaces, transformations, and deformation fields

8.3.1 Inverse distance interpolation

8.3.2 Inverse distance interpolation in space

8.3.3 Practical example: using localized inverse distance method to make a bitmap continuous and smooth

8.3.4 Practical example: building a deformation field with multi-variable interpolation to generate better mushrooms

8.3.5 Summary

8.4 Summary

8.5 Exercises

8.6 Solutions for exercises