In a previous raytracing project, we had to deal basically with two math operations:
- Drawing circles in the screen
- How to propagate traces throughout the screen
Let’s examine in detail how the circle drawing operation was done. The rays will be covered in a future post
Circles
Consider the following code:
struct Circle {
double x;
double y;
double r;
};
This sctucture covers the most essencial parameters we need to perform math operations with circles.