Skip to content

Book 1 Antialiasing random number generation error? #983

Answered by ghadeeras
stevenhuyn asked this question in Q&A
Discussion options

You must be logged in to vote

I do NOT think the aim is to sample surrounding pixels. I think the sampling should uniformly cover the area of one pixel, which can be thought of as a 1x1 square.

So, it depends where you assume the center of the pixel is. In that section of the book, it appears the the integer coordinates (x, y) are assumed to point to the lower left corner of the (x, y) pixel, with the x axis pointing to the right, and the y axis pointing up. So, the center of the pixel would be (x + 0.5, y + 0.5). The pixel area extends from its lower left corner (x, y) to its upper right corner (x + 1, y + 1).

If you choose the center of the (x, y) pixel to be (x, y), then I think you should use a range of [-0.5, +0.5).

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@stevenhuyn
Comment options

@stevenhuyn
Comment options

Answer selected by stevenhuyn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants