Minkowski metric & utteranc.es
Yesterday I did a lot of reading and research on different subjects:
I learned a lot about how to handle lights and colors in a Ray tracer. Once your ray hits and object and you determine the color of its material, you cast rays from the surface to each light source.
If nothing gets in the way of the source, you take the Hadamard product of the material’s color and the light’s. If you want soft shadows, you then scale it by the dot product of the ray and the material’s normal, the normalized angle between the vectors.
The ambient light is an overall Hadamard product with each calculated color, but I’m not exactly sure if we calculate this before or after the contributions of the other lights.
I learned that dot products between vectors
secretly have a metric between them,
which is a linear map between a representation and its dual.
In ordinary cartesian space,
which respects the group of Orthogonal transformations O(n),
this metric is the trivially represented by the identity matrix:
But if your space follows a different set of transformations,
like the SO(1,3) space-time of our universe,
the map between different representations isn’t trivial
and the operations between vectors aren’t linear.
In the case of Special Relativity
this results in the Lorentz transformation
that account for the hyperbolic rotations of Minkowski space,
or how time dilates relative to a moving observer.
These are the foundations of Special Relativity: We set the underlying transformations of the space and the rest follows from that. With some added geometric structure we can account for the curving of the space-time by matter and we get General Relativity.
Relating to site maintenance, I replaced disqus with utterance.es a free comment service with no tracking or ads. It uses the github API to save comments, opening an issue on the repo for each post. Disqus is awful and outdated: it’s loaded with tracking, and you need to pay to remove the ads.
I also traced this sweet pic with random spheres and materials:

Today I’m gonna adapt some features from the my weekend tracer
and mess with the minilibx:
I plan to do a random walker and a rainbow parabola.
I’ll also do some Node and ReactJS challenges from my bootcamp.
References:
- https://en.wikipedia.org/wiki/Hadamard_product_(matrices)
- https://en.wikipedia.org/wiki/Orthogonal_group
- https://mathworld.wolfram.com/MinkowskiMetric.html
- https://en.wikipedia.org/wiki/Minkowski_space
- https://en.wikipedia.org/wiki/Lorentz_transformation
- https://www.youtube.com/watch?v=RZGWhcwa6ns