10DESCRIBING MOTION IN THREE DIMENSIONS

Image

In Chapter 4, we reviewed one-dimensional kinematics, describing quantities like velocity and acceleration with real numbers. In this chapter, we’ll look at three-dimensional kinematics, describing velocity and acceleration as vectors. Haskell does not have a built-in type for vectors, but it does have powerful facilities for making your own types, which we’ll use to create a Vec type for vectors. Before deciding how to implement the Vec type, we’ll take a careful look at the meaning and use of vectors in physics so we can produce an implementation that aligns well with how we think and write about vectors. ...

Get Learn Physics with Functional Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.