-
I've just started going through the In a Weekend book and I've been playing around with the code to generate an image as a .ppm file. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It's just a test image, so there's really no true top or bottom. In this example, we're going from no green at the top to full green at the bottom. We set things up this way because as you progress to actual images, there's a definite top to the image. In this case, we're going from a 3D coordinate system where Y points up, to an image coordinate system where 0 denotes the top line and we increase as we go down. So while we don't really need to worry about the inversion at this precise point, we definitely will need to in the future. |
Beta Was this translation helpful? Give feedback.
It's just a test image, so there's really no true top or bottom. In this example, we're going from no green at the top to full green at the bottom. We set things up this way because as you progress to actual images, there's a definite top to the image. In this case, we're going from a 3D coordinate system where Y points up, to an image coordinate system where 0 denotes the top line and we increase as we go down. So while we don't really need to worry about the inversion at this precise point, we definitely will need to in the future.