-
Notifications
You must be signed in to change notification settings - Fork 0
Concepts
Ray (3D vector): A ray in 3D space is defined by two components: an origin and a direction. The origin is the starting point of the ray, often representing the position of the camera or the point where the ray is cast from. The direction is a 3D vector that indicates the path along which the ray travels.
Unlike a line, which extends infinitely in both directions, a ray extends infinitely in only one direction from its origin.
Mathematically, a ray can be expressed as:
where
Sphere - is a set of points in 3D space that are all at the same distance, called the radius (
Mathematically, a point
is inside a sphere if:
and is outside a sphere if:
where
near_plane and far_plane - determine the zone, objects within which would be rendered, objects outside are ignored
OnUpdate(time_t ts) - function that will control movement of the camera independent of frame-rate.
OnResize(int nw, int nh) - function that will control re-rendering of the image on resize event.
- Ray Marching

