Tuples
A tuple is just an ordered list of things, like numbers. That’s pretty abstract, though, so let’s use the concept of position to illustrate it.
Let’s say that you’re walking in a park one day. You go forward four meters, and suddenly the ground falls out from beneath you. Down you go, landing four meters later. There you discover a mysterious tunnel to the left, which you crawl along for three more meters. At that point, you discover a chest full of gold coins, and you celebrate. Yay!
Let’s say your first four meters were in the x direction, the second four (when you fell), in the negative (downward) y direction, and the last three (in ...
Get The Ray Tracer Challenge 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.