You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pause a bit here and consider that if you use the (α,β) coordinates to determine if a point lies inside a quadrilateral (parallelogram), it's not too hard to imagine using these same 2D coordinates to determine if the intersection point lies inside any other 2D (planar) primitive!
We'll leave these additional 2D shape possibilities as an exercise to the reader, depending on your desire to explore. Consider triangles, disks, and rings (all of these are surprisingly easy). You could even create cut-out stencils based on the pixels of a texture map, or a Mandelbrot shape!
We should flesh this out just a tiny bit more. Perhaps move this text after the next listing, and mention that one would only need to write a different is_interior(double a, double b, hit_record& rec) function that returns whether a given input coordinate (a,b) is inside the primitive. We might also supply the text describing how we'd do this for disks to get folks thinking.
The text was updated successfully, but these errors were encountered:
This does two things:
- Moves the planar coordinates derivation into its own skippable
section.
- Moves the alternate 2D primitives discussion to its own section at the
end of the quad chapter, and points to the `alternate-2D-primitves`
tag for triangles, ellipses, and annuli.
Resolves#1204Resolves#1205
This does two things:
- Moves the planar coordinates derivation into its own skippable
section.
- Moves the alternate 2D primitives discussion to its own section at the
end of the quad chapter, and points to the `alternate-2D-primitves`
tag for triangles, ellipses, and annuli.
Resolves#1204Resolves#1205
The current text reads like so:
We should flesh this out just a tiny bit more. Perhaps move this text after the next listing, and mention that one would only need to write a different
is_interior(double a, double b, hit_record& rec)
function that returns whether a given input coordinate (a,b) is inside the primitive. We might also supply the text describing how we'd do this for disks to get folks thinking.The text was updated successfully, but these errors were encountered: