This book shows how the web-based PhysGL programming environment (http://physgl.org) can be used to teach and learn elementary mechanics (physics) using simple coding exercises. The book's theme is that the lessons encountered in such a course can be used to generate physics-based animations, providing students with compelling and self-made visuals to aid their learning. Topics presented are parallel to those found in a traditional physics text, making for straightforward integration into a typical lecture-based physics course. Users will appreciate the ease at which compelling OpenGL-based graphics and animations can be produced using PhysGL, as well as its clean, simple language constructs. The author argues that coding should be a standard part of lower-division STEM courses, and provides many anecdotal experiences and observations, that include observed benefits of the coding work.