diff --git a/cg_codebase.md b/cg_codebase.md index 7266e23..bb16a5b 100644 --- a/cg_codebase.md +++ b/cg_codebase.md @@ -676,15 +676,19 @@ Here, we are finding using past principles, the intersection of a ray to the poi We have the equations: -$$r(t) = \vec o + t \vec d $$ - -$$and$$ - -$$(\vec x - \vec p) \cdot \vec n = 0$$ +```math +r(t) = \vec o + t \vec d +`````` +```and``` +```math +(\vec x - \vec p) \cdot \vec n = 0 +``` Solving for t, we get: -$$t = - \frac{(\vec o - \vec p) \cdot \vec n}{\vec d \cdot \vec n}$$ +```math +t = - \frac{(\vec o - \vec p) \cdot \vec n}{\vec d \cdot \vec n} +``` Explain this: ```cpp