February 2019
Intermediate to advanced
292 pages
6h 55m
English
In the previous chapter, you wrote a program to compute the trajectory of a projectile, using nothing but points and vectors. You’ve got a new tool, now, though!
For this challenge, you’ll once again compute the trajectory of a projectile, just as before, but this time you’ll plot its course on your brand-new canvas. After each tick, take the coordinates of the projectile and color the corresponding pixel on the canvas. When the loop finishes, save your canvas to disk and view the result. It ought to look something like the figure. The pixel sizes have been exaggerated here, plotted as squares instead of single dots, to make them visible in print.
As you tackle this challenge, note a few things:
Read now
Unlock full access