I wanted a system to be able to work with regular coordinates, since like usual raylib renders taking the top left as (0,0). for that reason I’ve made a grid struct which I can use as regular coordinates, and simply use the stored values to convert back when I’m wanting to render anything.
I’ve also added a box for where the terminal will be. All tools should be accessible via commands, and this will be the panel with which anything in the simulation can be configured.
I spent a while going through some of the basics I’ll need to implement what will follow, and I’ll include an overview below for my own edification and also in case I ever return to look over it.
Firstly, some basic linear algebra to confirm that pythag holds up only in a perfectly euclidean space, and if any non-orthogonal base units are introduced, we get the wrong answers. The real way to calculate distances without fail is by taking the square root of the dot product of a vector with itself, which I’ve proved below since I hadn’t encountered it before. This forms the basis of the justification behind the metric tensor, which defines the curvature of spacetime by simply presenting a formula with which we can calculate the distances between points (in space and time). Currently just focusing on the Minkowski Metric, the values in the lead diagonal which correspond to the spatial dimensions are simply all set to one, which makes sense since it describes the curvature without any gravity, that is, no curvature at all.
What follows is a recap of the lorentz factor, which I’ve found is easier to understand if the photon clock thought experiment is used to derive time dilation. However, it isn’t exactly mathematically rigorous to go backwards to the original transformations, but oh well, it does the job for what I need. The inverse transformations in particular is the first step towards the spacetime interval.