We - people - are surrounded by a certain reality. Since times immemorial some people have been noticing that there are some patterns to this reality, that it seems to follow some rules. Some of them got interested enough by this that they wanted to know more. They wanted to understand what the surrounding world actually is and how it works.

And here is where the problems start. The only tool the ancient people had that could help them tackle the problem of uncovering the rules of the world, was their intuition. And that intuition, which is a pretty good evolutionary adaptation to the environment our ancestors lived in, tends to fail spectacularly when applied to problems that weren't a part of that environment. The riddle you can try to solve here serves as a good illustration - I recommend having a go before reading the rest of the article, because it will become much less interesting afterwards.

Noticing that intuition can be deceiving and finding an effective way of counteracting this deception took the humanity a very long time. The result is the scientific method.

The formal definition can be found on Wikipedia, but to put it shortly - it is a set of methods of studying the world that aims to obtain results that are as objective as possible. There are two main approaches to studying the world and we will start with describing these approaches.

Let us start with a bit about the experiments, as they are more intuitive.

Simply put, the experimental study of reality consists of gathering data by checking the reality's "answers" to some conditions "posed" to it. The conditions might be "posed" by an observer (eg. in a laboratory), or they can exist naturally (like in astronomical observations, where we don't control the celestial objects at all). We study what happens under what conditions and document it thoroughly, and we get to know some part of the reality this way.

A simple example: our study of reality could consist of checking what happens when we throw some objects in the air. We threw a ball - it fell. We threw a rock - it fell. We threw a fork - it fell. Now we have some data about the reality.

But the experiments themselves are not everything. Studying the reality only by experimenting resembles learning a subject at school by memorizing the textbook - we can answer some questions afterwards, but can we really say that we understand the subject? In order to bring our understanding of reality to the next level, we construct theories.

Theories are systems enabling predicting the reality's behavior under some circumstances. They are tools that give answers to questions like "if the conditions are so and so, what will happen?". Theories give structure to experimental data and enable drawing conclusions beyond just that which has been directly studied experimentally.

In our example, a simple theory could be "objects thrown in the air fall back down". The experimental data has shown that when we threw a ball, a rock or a fork, they fell, which made us attempt to formulate such a theory. If somebody asks us afterwards "and what happens if I throw a pen?", we can answer: "according to our theory, it will fall". We haven't studied this case experimentally yet, but we can reason about it based on our theory.

This begs the question: how do we know that our conclusion from the theory will be correct? That if we perform an experiment we haven't tried before, the result will be what the theory predicts? The answer is: we can't possibly know that! And this is the crux of many misunderstandings.

Can we test our theory in any way? Can we make sure that objects thrown in the air, in fact, always fall? Can we ever be sure that this is how reality works?

Unfortunately, we cannot. No matter how many different objects we throw and observe falling, another one can always do something else. Of course, the more objects we try to throw, the more certain we will get that the theory is correct, as long as the results agree with it. However, our certainty can never reach 100%.

No scientific theory can be completely *verified*. Every scientific theory can be *falsified*, though. What is more - falsifiability is often considered a criterion a theory must satisfy to even be considered scientific.

In our example it is enough that a single object thrown in the air doesn't fall, and we will know that our theory can't be a correct description of reality. It is falsifiable, then. Can we falsify it in practice?

Well, it would be enough that someone would hand us a balloon filled with helium to throw, or that we would try to perform our experiments with throwing objects in a falling elevator, for example. In both cases the objects won't fall, falsifying our simple theory.

Does it mean, then, that our theory is useless and should be scrapped? No! It is still correct *in some domain*. We just need to specify the conditions for its applicability, eg. "objects heavier than air thrown by an observer standing on the ground fall" (of course, in order to come up with a reasonable set of conditions, not having any prior knowledge, we would have to perform tens, hunders, thousands of experiments first). This way we can obtain a theory fitting all experimental results known to us.

Is it already the final theory? And what have I said earlier about complete verification? Someone could still hand us a balloon filled with helium in a vacuum chamber - and suddenly it will turn out that this theory has holes, too. We could again identify the conditions that made it incorrect and amend it further, though.

In our example, we formulated our theory after performing a few experiments. We gathered some data about reality, noticed a pattern, proposed a general rule. Are theories always created this way?

Not necessarily. If someone, for example, started with an idea, that material objects tend to find themselves on the ground, they could create the same theory. Someone else could simply dream the idea for this theory. In both cases the final result is the same sentence we phrased after our initial observations: objects thrown in the air fall". Are these two theories somehow worse because of where they come from? No! The only thing that decides the value of a theory is how well it predicts the experimental results, not how it came to be. If we have a system that can predict the numbers in a lottery, we will be just as rich if we derived it from the Bible, as if we derived it from detailed observations of previous lottery drawings.

Building theories on ideas or thought experiments instead of on experimental results is actually a common approach in physics. Of course, such theories have to be confronted with experimental results all the same - as I mentioned before, it's how well the predictions match the experiments that decides the value of a theory, and this can only be checked by actually performing experiments. Nevertheless, theories that are based on a single specific idea, or a few of them, and predicting results well at the same time, are considered particularly aesthetic (Einstein's theory of relativity is a great example here). Most theoretical physicists dream of finding a single idea that would allow them to derive a theory correctly predicting every possible experimental result.

It is worth making a note at this point about how far we can go in drawing conclusions about reality from a theory.

Imagine that someone postulated an idea that is saying something about reality itself, eg. "the Universe started with the Big Bang". Having such an idea, we can try figuring out various consequences it would have for the actual shape of reality, eg. that space should be constantly expanding, or that there should exist a microwave background radiation, etc. In actual science, both ideas and their consequences are usually expressed in mathematical language, for the sake of maximal precision.

Some of the consequences derived this way will be propositions that can be directly, experimentally tested. It will be possible to check if reality really looks the way it should if the given idea was correct. Let us assume, then, that the tests were performed and all of them showed that reality looks exactly the way it should if the idea was correct. In our example: we can detect that other galaxies are redshifted, and that there exists a cosmic microwave background - and both effects were actually detected. This means that we are observing a reality that we would expect if there actually was a Big Bang in the beginning.

Does this mean, that the reality *actually is* the way the idea tells us? If all experimental results match the idea of an initial Big Bang, then there *really was* a Big Bang?

Strictly speaking - no. Drawing conclusions this way is a logical fallacy called affirming the consequent. Correctness of the idea implies such a reality as we are observing - this doesn't mean, though, that such observations imply the correctness of the idea. I'm writing "strictly speaking", though. In practice, so many experiments are being (and have been) performed, that if a theory derived from an idea matches all of them, it is really hard to imagine another theory, matching the experiments equally well, that would contain the negation of the idea. In our Big Bang example, almost all - if not all - the effects implied by the Big Bang have been detected, so it is really hard to imagine an equally good theory that would not assume the Big Bang, or would even assume a lack of it. *A priori*, it is possible on a purely logical level - at least until we have an actual proof that the negation of the idea in consideration (the lack of a Big Bang) unequivocally contradicts reality. Nevertheless, even lacking such a proof, an idea can often be considered well-founded - with a caveat that we will cease to consider that if a counterexample is found. So, for the moment we deem the Big Bang as having actually happened, but we are open to the idea that another explanation might arise that would not require a Big Bang.

Neither experiments, nor theories give us any direct information about the objective reality. Obtaining such information is probably impossible, anyway - since every observer has no choice but to study it through their own subjective perception. For this reason, the scientific method focuses on *intersubjective verifiability* instead - that is, such a presentation of theories and experimental results which allows independent observers to check them and come to the same conclusions, each in their own subjective perspective.

The issue of intersubjective verifiability is simpler for theories. What is needed is an expression of the theory that allows other to independently derive the same predictions from it. This is usually achieved by using rigorous, precise language in formulating theories - often mathematics. If people other than the author can understand which reasonings are correct within the theory, and which are not, the goal has been achieved.

There is a slightly bigger problem with this in the case of experiments. Precise language is also required - it is necessary for other people to be able to recreate both our experimental setup, and the conditions in which we were performing the experiment. But there is still one element missing, and it is specifying what results can be considered the same, and what results can't.

Imagine, for example, that we are trying to measure the Earth's gravitational acceleration with a pendulum - it's a pretty simple experiment, it boils down to measuring the length of the pendulum and its period of oscillations, and using a simple formula. Imagine that we performed the experiment and got a result of 9.8 m/s², and our friend performed it, too, but they got 9.83 m/s². So what now? Does it mean that only one of us got the correct result? Or maybe neither of us? Have we forgotten to take some factor into account...?

The answer is: it depends. It depends on how accurately we measured the length of the pendulum and its period of oscillations. No measurement is perfectly accurate - the instruments have their limitations, and every measurement is distorted by random factors that are impossible to take into account. All of this means that every experimental result has a corresponding *uncertainty*. The analysis of uncertainties is an important part of the job of every experimental scientist.

When we account for the accuracy of the instruments and other factors, it might turn out that our result with its uncertainty is 9.8 ± 0.1 m/s², and our friend's - 9.83 ± 0.15 m/s². This would mean that not only are our results not contradictory, they are even very much in agreement!

The uncertainties also play a very important role in comparing the experimental results with theoretical predictions. If a theory predicts an acceleration of 9.81 m/s², and we got 9.8 m/s², that doesn't mean that the theory has been falsified yet! If that was 9.800 ± 0.001 m/s², and the theory predicts 9.8132 ± 0.0003 m/s² (yes, the predictions can have uncertainties, too - they are often based on experimental results that have uncertainties themselves), then the theory would be in trouble. But if it is 9.8 ± 0.1 m/s², as in our example, then it is a result matching the theory.

An important part of the scientific method is counteracting the influence of various psychological effects on theoretical predictions and experimental results.

Let us say that we made the measurements of the gravitational acceleration with a pendulum and we got 9.7 ± 0.1 m/s². Then we calculate it from theory and we find that it should be 9.81 m/s². But, we note that we might have measured the length wrong, and by the way, we probably turned the timer on a bit late, and if we just modify some numbers within the error boundaries, we will get 9.75 ± 0.11 m/s². Then we proudly announce that the theory matches our experiment.

All is well until someone else comes, makes the same measurement, gets a non-matching result, and it makes them find the existence of a factor that we missed and nobody else has heard of before. And thus we missed a chance for a huge discovery.

Or another example: consider a simple theory that says "a green color of an object causes it to fall when it is thrown". We set out to test it. We take a few green objects, throw them, they fall. We are proud of our confirmation of the theory. Someone else comes, throws a red object, it falls. Throws a blue one, it falls. Something doesn't really add up here.

These are just two examples of mind traps that one might fall into. A scientist has to be aware of them and actively counteract the possibility of falling victim to them.

The first described effect is usually counteracted by making predictions in advance. Correctness of a theory is studied by first calculating its predictions, and only then performing the experiment. Then one can honestly check if the predictions match or not - and if not, look for the source of the error.

The second effect is called confirmation bias. People have the tendency to look for confirmations of their suppositions. But, if we are looking for a rule that would be as general as possible, we also have to make sure that the predictions are *not* a match under conditions when they shouldn't, and this part is often overlooked. This is actually the trap that many people fall into when faced with the riddle from the beginning of the article (if you haven't tried it yet - well, know you know what to look out for) and this is why it is important to try to *falsify* a theory when testing it, and not to try to confirm it.

There are many various effects of this kind, so it is impossible to describe all of them here. I won't even try, then - I'll just say that it is a good idea to research this topic before announcing a revolution in science.

I wrote a lot about what science is and how it works. There is also a phenomenon that tries to pass as science, but is not science - it's pseudoscience. What are the characteristics of pseudoscience? How can you tell it from science? This is a topic for a whole book, I'll just describe a few signs here that should raise red flags when you encounter them.

Pseudoscientists love anecdotal evidence - ie. stories that confirm their claims, but are either hard to verify, or their authenticity is of little importance to the subject at hand. An example of typical anecdotal evidence is "my aunt was taking homeopathic medicine and was cured", or "here on website X a random man described how he performed an experiment and got a result contradicting a well-established theory". In both cases we know nothing about reproducibility of the result - it could be caused by an unknown factor, a random fluctuation, or it could be a straight up lie. In case of medicine, its effectiveness is tested using statistical methods in controlled trials (because even effective medicine doesn't provide a 100% certainty of success in therapy). In the second example, a few independent confirmations would be needed to acknowledge the result - especially if it contradicts the rest of scientific knowledge.

A typical move of pseudoscientists is to focus on results that seem to confirm their results, and completely ignoring those that contradict them, no matter how many there are. If somebody ignores results of repeated studies that are inconvenient to them - it's a solid indicator against their often declared scientific approach.

Pseudoscientists like to propose theories that sound reasonable and explain the observations at the first glance - but if you look deeper, they would explain *any* observation. Or, in other words - there is no observation imaginable that would prove their theory wrong. No matter what is observed, the theory explains it. "A negative result? I'm right. A positive result? I'm also right."

It is easy to identify such a theory by the impossibility of deriving any predictions from it. Since any result would agree with it, there is no telling which of the agreeing results will happen in reality.

This one is particularly amusing, because it is a classical projections of one's own shortcomings on the opposite side.

A typical accusation of being unscientific is based on the fact that a theory is not the only one possible explaining an observation. It stems from a mistaken belief, or purposefully wrong allegation, that scientific evidence cannot admit more than one interpretation. This is obviously absurd. A theory isn't scientific because it is the only one that can explain every single observation, and an obsevation isn't scientific because it only has a single theoretical interpretation. A theory must be falsifiable and match all known experiments (where applicable); an experiment must be reproducible and have rigorously analysed uncertainties. That's it for the scientific requirements.

As a closing remark, I wanted to touch upon another topic that often likes to appear in the context of evolution, and that is often explained completely wrong.

In discussions about evolution, its opponents often like to raise the "argument": "evolution is just a theory". A common answer is to state that this mixes the colloquial meaning of the word "theory" with its scientific meaning; that the colloquial "theory" is closer to scientific "hypothesis", and that scientific "theory" is a hypothesis confirmed with observations. The first part is admittedly correct, but the second part is totally wrong.

I wrote what a theory is at the beginning - it is a system allowing to make predictions about reality. There is nothing in the meaning of the word even remotely resembling being confirmed! A theory is a theory regardless of whether it matches experiments (it is "correct"), or whether it does not (it is "wrong").

It is true that the colloquial usage of the word "theory" is as a synonym for a "hypothesis", a "supposition", and that arguing by "it's just a theory" is a simple equivocation. It's not true, though, that a theory is somehow a next stage in the development of a hypothesis, which is reached when the hypothesis is confirmed. Being a hypothesis and being a theory are two independent things. Presenting a new theory is usually at the same time a hypothesis that it is correct, that it accurately describes reality - but this is where relationships between the two end.

It is also worth reiterating that a theory can never be confirmed. It can only be not falsified. If a theory can't be falsified, even though there were attempts - it is considered a good theory.

Well, this came out longer than I expected. I hope that I managed to explain the essence and the sense of science at least a bit, and show what the scientific method is about. The awareness of these issues is particularly important now, when everybody can go and publish whatever in the internet, and pretend to be a scientist even if they know nothing about the topic. This text is supposed to be a kind of a vaccine against such people - it should provide the Reader with knowledge allowing them to recognize if someone is really presenting something scientific, or if they are only pretending. If this is achieved - awesome. If not - well, I just hope that there was something valuable in it regardless :)

Let me just recap quickly on what the discussion concerned. It is that one of the flat-Earthers insists that some landscapes look the way they should on a flat Earth, and not how they should on a spherical Earth. He supports his claims by showing some photos he took and calculating some proportions of distances between characteristic points or sizes of some visible objects. It's actually a very reasonable approach - provided that one does everything earnestly, ie. calculates what proportions one should get on a flat Earth, and what they should be on spherical Earth. As it turns out - which is what the previous entry was about - that a fully correct analysis must even take atmospheric refraction into account, and it is negligible for most purposes.

The refraction calculator I created on this occasion had one major drawback - it allowed only for tracing a single light ray at a time. Because of this, for every photo you had to choose some specific points and calculate e.g. ratios of some angles. This actually still enables getting some interesting results, but isn't very attractive visually - it's just comparing numbers. So I came up with an idea of using computers to improve the situation a bit: what if I could create software that would simulate multiple rays at once, instead of just one, check where they hit the Earth's surface and generate a whole panorama based on that...?

I had one piece of the puzzle ready: path calculations for a single light ray both on a spherical and a flat Earth. The code calculating the paths was admittedly a part of the refraction calculator, but it was possible to extract it into a separate library with relative ease. I still needed something that could load terrain data from somewhere (the program needs to know somehow when a ray hits land or water) and I had to write the image generator itself.

Writing this eventually took a dozen or so hours, but, as is usually the case with me, I finished the work over two months after starting it.

The terrain data is being loaded from the DTED (Digital Terrain Elevation Data) files provided to the program. Such files can be downloaded for free from the Internet, for example from the USGS website: https://earthexplorer.usgs.gov. Every file on the website covers an area corresponding to 1 degree in latitude and longitude. In my case it caused a small technical issue.

The problem is that my generator is supposed to be able to simulate a flat Earth, and the data is indexed with latitude and longitude - values strictly related to a spherical shape. The Earth is, in fact, spherical, so there is no working around that. I had to find some kind of a mapping of spherical coordinates on a flat surface. I eventually settled on treating every data fragment of 1 degree x 1 degree as a rectangle with sides of approx. 111 km (the distance between parallels separated by 1 degree of latitude) by 111 x cos(latitude) km (the distance between meridians separated by 1 degree of longitude at a given latitude). This, of course, distorts some directions and distances, but I had no better idea. If any flat-Earther is reading this and has a better one - I'm open to suggestions.

Anyway, the program works. It's not blazingly fast, it takes about 10 minutes on my 8-core computer to generate a 960x600 image, but it manages. The code is available on GitHub: https://github.com/fizyk20/atm-raytracer

Let us now take a look at a few example results.

The views being simulated are the same ones I was analysing in the previous entry using the refraction calculator: Schneeberg seen from Praded and the mountains in New Zealand.

Let us start with the mountains, as they are less spectacular, but still interesting.

A reminder of what the view looked like:

Here is the simulation on a spherical Earth:

And here is the simulation on a flat Earth:

I already marked some features of the second simulation that disagree with the actual photo.

The arrow on the right points to a peak that is invisible in the photo - because it is hidden behind something in a nearer plane - exactly like in the spherical simulation.

The rectangle, on the other hand, marks a mountain range in the front that behaves incorrectly. If you take a close look at the photo and the spherical simulation, you can see that the range gets lower and lower until almost the very water boundary. On the flat simulation, though, because there is no hiding behind the horizon, an analogous phenomenon doesn't happen and the range should be visible much higher.

A strong argument for the spherical Earth. Ironically, the picture comes from a video titled "1000% Flat Earth Proof" ;)

So now let us take a look at Schneeberg as seen from Praded:

Let us see what a simulation on a spherical Earth will show:

It looks very similar. You can see the same ridges that are present in the photo and the very peak of Schneeberg, also just like in the photo.

So what would the view look like on a flat Earth...?

Well... there is a difference. What is more, this view is zoomed out relative to the spherical Earth simulation (the horizontal field of view is 5 degrees, for the spherical one it was 2 degrees) - otherwise the mountains didn't even fit in the picture! For a better comparison, the reddish ridge in the middle is the same one that Schneeberg is peeking over in the spherical Earth simulation...

What is happening here? Again, the main reason for such a view is the lack of hiding behind the horizon. On a spherical Earth, the distance of 277 km lowers the mountains enough for their peaks to be below eye level for an observer on Praded. There is no such effect on a flat Earth, so peaks taller than Praded (and Schneeberg is 500 m taller) have to be above eye level.

By the way, this simulation is a nice illustration of the numbers obtained in the previous entry. The calculations showed that the visible part of Schneeberg should be about 0,075 degrees in size on a spherical Earth, and over 0,9 degrees on a flat Earth. This huge discrepancy is clearly visible in the simulations.

What is the verdict, then? As you can see, when you have something to compare the landscapes to, it is clear that the flat Earth claim is undefendable. Of course this doesn't bother eager flat-Earthers - but this was not about that. The main goal was to have fun writing the simulator, and being able to get interesting results out of it... that's just added value ;)

I created a few more comparisons of simulations and real views in the form of video clips. They are shown below.

Schneeberg:

New Zealand:

I also created simulations of one more panorama - a photographer managed to catch a view of the Tatry mountains from a village called Szkodna in Podkarpacie, Poland. Here are the results of comparing the simulations to reality:

I think that the video clips above speak for themselves.

As the Special Theory of Relativity seems to contradict the common sense, it remains a somewhat magical topic for the regular people. The consequences of this theory seem to be so far removed from everyday life, that it's quite hard to admit them as the correct description of the surrounding reality.

Most people have their first contact with SR at school and its introduction there looks somewhat like this: near the end of the 19th century people discovered the electromagnetic waves. The equations describing these waves imply a specific speed of their propagation, denoted and equal to about 300 000 km/s. It was quite interesting, since nothing seemed to imply any frame of reference for this speed. Since all known waves required a medium to propagate, it was assumed that the electromagnetic waves are no different and travel in something called the aether, and that the speed arising from the equations is relative to the aether.

Once people decided that aether should exist, the logical next step was to try and detect it. One of the ideas was to measure the speed of the Earth relative to the aether. Some attempts were made, but the results were unexpected - it seemed that the Earth is not moving in the aether. It was strange, especially considering that the Earth changes its velocity in its motion around the Sun, so even if it did stand still in the aether at one point, it shouldn't at another one - but the measured speed was always 0. People then tried to modify the concept of the aether to explain the results and started performing more sensistive experiments. One of these was the famous Michelson-Morley experiment, which, just like the earlier attempts, failed to detect the motion of the Earth, too.

The scientists were rather confused with these results. It seemed that the speed of light was constant regardless of the motion of the observer, which was quite extraordinary. To better illustrate what is so strange about this situation, let us imagine that we are in a car standing at an intersection, and that there is another car in front of us. Once the traffic light turns green, the car in front of us starts moving and accelerates to 15 m/s, so its distance from us starts to grow by 15 meters every second. We start moving shortly afterwards. Once we are moving at 5 m/s, we expect the car ahead to be leaving us behind by 10 m every second, but once we check that, we are surprised to discover that the distance is still growing by 15 m/s. We accelerate to 10 m/s - and the distance is still growing by 15 m/s. We accelerate more and more, but we can't seem to start catching up to the car in front, even though our friend, a policeman, was standing with a radar near the road and told us that the speed of that car was always just 15 m/s. Light seemed to behave just like such a weird car.

The 20th century came and various people were proposing different explanations - among them were Lorentz, Poincare, and eventually Einstein. In 1905, Einstein presented a theory known today as Special Relativity, which was based on 3 assumptions:

- The space(time) is homogeneous and isotropic, ie. there are no special points or directions in the Universe.
- There are no special inertial frames of reference, the laws of physics are the same in all of them - this is the so called Galilean relativity principle.
- The speed of light is the same in all frames of reference - this was a conclusion from the Michelson-Morley experiment.

Thus the aether became unnecessary - from that moment on, was just a universal speed, independent of who is measuring it. Coincidentally, this also has some unusual consequences, such as time passing slower for moving observers, or contraction of moving objects.

There is still a loophole, though. One could argue - and some people do - that the third assumption is not adequately proven. The Michelson-Morley experiment could have been not sensitive enough, or it could give a null result under some specific circumstances, even though the speed of light is not really constant. Thus, SR can be (and, according to some, just is) wrong.

This is all true, but not many people are aware that this third assumption isn't actually needed to obtain SR. I'm going to show here how this is possible.

I'll just note here that the derivation below is heavily inspired by a lecture by prof. Andrzej Szymacha, which I actually attended during my first year of studies. He showed us a reasoning that is almost identical to what I'm going to present, but a bit more complex in my opinion, so I decided to make small modifications.

Let us outline the situation, then. Imagine that we have two observers, who we will denote and . Both of them assign their own coordinates to the events in spacetime - they are for , and for . Both of them find themselves at a point with spatial coordinates equal to 0 in their respective coordinate systems, that is, we have for , and for . We also assume that both observers met in a single point at time and that is moving at a speed of in direction in 's frame of reference, so in 's frame the coordinates of satisfy .

Since we are only really interested in two directions - one temporal and one spatial - we will forget about , , , . They play no role in the conclusions, and it will simplify the reasoning a lot.

Another huge simplification will be to assume that the axes and point in the opposite directions. This way the situations of and are perfectly symmetrical - both moves away from in the positive direction, and moves away from in the positive direction. This perfect symmetry lets us immediately conclude that 's speed has to be in 's frame of reference, as everything looks exactly the same regardless of which observer is marked as , and which one is .

Let us move on to some more mathematical issues. For starters, let us note that the homogeneity and isotropy of spacetime mean that the transformation between the frames of reference must be linear, ie. and can depend on at most the first powers of and . Why? If there were higher exponents in the equations, they would change their form in translations, that is, if we changed the choice of the point denotes as . We couldn't declare all points as equally good then, at least one would stand out - and we are assuming that it isn't so.

Linear transformations are pleasant in the way they can be written with matrices. We will then represent our transformation from to this way:

For the people not familiar with matrices - the notation above means exactly the same as this one:

Let us consider what we can deduce about the coefficients A, B, C, D.

First, since we know that the situation is symmetrical, we can immediately write:

The transformation from to has to be exactly the same as the one from to , because, as we mentioned, switching the observators' places changes nothing in the situation. Hence, we can write:

This simplifies to:

In order for everything to fit, the following must hold:

The equations 2 and 3 immediately lead to the conclusion that . The first and the fourth one are equivalent, then.

Denoting the transformation matrix as , we get:

What's next? Let us remember that we mentioned that is the same as . Since we can read from the matrix, we get:

Dividing by t, we will get . We can substitute this into and extract :

The transformation then takes the form:

This is a lot already, but we still don't know what is. In order to find out, we have to introduce some more complications.

First of all, let us give up on symmetry. The transformation in SR is usually written under the assumption that the axes and face the same direction. To achieve this, it is enough to flip the sign of . How do we do that?

Since we assumed , after flipping the sign we will get . So, in order to get the transformation with axes facing the same direction, it is enough to flip the signs of the bottom coefficients in the matrix. We will denote this "flipped" matrix as :

Let us also note that if we change the sign of the velocity (ie. it will be instead of ), we will get . If we now also flip the sign of , we are back in the same situation in 's frame (opposite speed and opposite axis, so the observer is moving away in the positive direction again). can't change, then. This means:

From this we can conclude that .

The second part of the whole ordeal is introducing a third observer. We will call him and we will say that he moves at a speed of relative to , ie. we have for . What is his speed relative to ? Let us denote it by , which will mean . In order to transition from to , we need to make a transformation by :

From this we get:

We substitute from the first equation to the second and we get:

Still with me? So now the other way round: moves at relative to , and at relative to , so we transform by from to :

So:

This gives:

Phew. We calculated in two ways. However, it is still the same , so both results must be the same. The denominators must be the same, then:

After subtracting 1 and dividing by we get:

So now we are reaching the climax. The left-hand side only depends on , and the right-hand side only on , which are two independent parameters. If we set a specific , the left-hand side will be determined, but is still subject to change. Despite that, the right-hand side cannot change, because it must still be equal to the other one. This means that both sides must be constant, equal to a number we will call :

Solving this for leads to the result:

We can thus write the final transformation:

All is great, but what exactly is ...?

Let us first consider the consequences of various possible values of .

This case is the simplest one. When , the transformation boils down to:

This is nothing else than the Galileo's transformation! So if the constant turns out to be zero, it will mean that people have known the correct transformation since the 17th century.

This is also an interesting case. When the value of is negative, we can assume that it's . The transformation looks like this, then:

Let us introduce new variables: and . We get then:

Let us define an angle such that . This reduces the transformation to:

But! We know from trigonometry that:

So, we get:

This is just a rotation matrix for the angle ! So, in the case of a negative , time is just another spatial direction, and changing the velocity by is a rotation by the angle of .

As it turns out, is actually positive in reality (I will tell you in a moment how we know). We can then denote , where is some constant in units of velocity. This constant has a special property. In order to see what it is, let us revisit the transformations of velocities.

We already transformed velocities when deriving the matrix coefficients. Let us do it again, then - assume that an object moves at a speed relative to (so it satisfies ) and see how it moves relative to :

Let us write again:

We get:

Dividing side by side, we get:

Let us see what happens when :

So, if an object moves at a speed relative to , it is also moving at relative to , regardless of what the relative speed of and is. is then a kind of a **universal speed**, independent of the frame of reference.

In the positive case we can also do a trick like what we did in the negative case, and introduce a value called "rapidity" such that: . Introducing, analogously, , we get:

It is a matrix of a transformation analogous to a rotation, but in a so-called Minkowski spacetime. I won't go into details here, but this idea turns out to be very useful in SR.

Now we know what different values of mean, but we still don't know what is its value in reality. We do have a nice description of the phenomena that should be happening for various values of , though, so we can try to measure it. Specifically, we know how to add velocities:

One of the first measurements of was done in 1851 by a French physicist Armand Fizeau, but he didn't know back then that such a constant can exist, nor that it can be deduced from his measurements ;) What he did was measure the speed of light in the air, in water and in flowing water.

The speed of light in water is , where is the refractive index of water. He expected to get a value of in water flowing with speed , according to Galileo's transformation, but he actually got . Let us see what we can deduce about from this.

If we assume that is small, we can approximate the formula for adding velocities:

where "..." stands for higher powers of , so numbers that are even smaller.

When , we get:

Since was a lot larger than in Fizeau's setup, this approximately equals:

For this to agree with Fizeau's results, it must be that . What is not very surprising, the assumption that the speed of light is universal gives exactly .

We got the Special Theory of Relativity without assuming that the speed of light is constant. To be precise, we got a result that there is a universal speed, which is approximately equal to the speed of light - but all experiments performed so far agree with the theory in which it is exactly the speed of light.

We have shown, then, that we can obtain SR not even assuming that the speed of light is the universal speed. Nevertheless, the experiments indicate that there indeed is a universal speed in nature and that it is the speed of light with very high accuracy (the original Fizeau experiment might not have been this precise, but 150 years have passed since then and we have much more precise results now). So even if it did turn out that the speed of light can depend on the frame of reference - which isn't entirely out of the question - it means nothing for phenomena that are such a pain to SR's opponents like time dilation and Lorentz contraction, or the existence of a universal speed. These phenomena arise from something much more general than just a constant speed of light, and in order to significantly change their interpretation, a discovery much larger than just variability of the speed of light would be needed.

It might be good to remember about this the next time you encounter someone who would try hard to convince you that SR is a scientific conspiracy ;)

]]>- What are events and spacetime?
- What are world lines?
- Simple spacetime diagrams
- How does the inseparability of space and time influence their perception by observers?

Most of the illustrations in the last article used rotations, but it turned out eventually that rotations aren't the correct transformations that would let us look at the spacetime from the point of view of different observers. Now we will take a look at transformations that actually describe reality - the Lorentz transformations.

Rotations are probably quite familiar to everyone. You can just grab an object and move it around, you can spin something on a stick, the wheels of a bike or merry-go-rounds are rotating. Everyone learns to recognize things regardless of how rotated they are since early childhood. We understand rotations intuitively and we know what to expect of them.

Nevertheless, in order to understand the similarities and differences between rotations and Lorentz transformations in more depth, we have to take a look at rotations on a slightly more abstract, mathematical level.

Actually, what are transformations, whether in space or in space-time? Well, simply put, a transformation is something that can take a point, let's call it A, and it will give us another point, let's call it A'. If we are on a plane, we can describe a given point for example with a pair of coordinates (x,y) - a transformation will change it into some (x', y'). In space-time we would usually describe a point with a set of four coordinates: (t, x, y, z), and this will become (t', x', y', z') after a transformation.

We can use formulas to describe a rotation on a plane by an angle the following way:

Two things are really important here:

- If and , then and - or, in other words, the rotation doesn't affect the origin. If we give the point (0,0) to a rotation to be transformed, it will give us back the same, unchanged (0,0).
- The distance of a point from the origin is the same before and after the rotation: (I recommend calculating this yourself from the equations above as an excercise - you just need to remember the Pythagorean trigonometric identity: ).

The Pythagorean theorem tells us that the distance of a point (x,y) from the origin (0,0) is . The value in the square root doesn't change under a rotation, so the point after the transformation will be at the same distance from (0,0). - To expand on the previous point somewhat - if we have two points A and B, whose coordinates differ by and , and we transform them into A' and B', whose coordinates will differ by and , then still .

The second bullet point above also means that rotations transform circles centered at (0,0) into themselves - however you rotate a circle, it looks the same. A circle is a set of points at a given distance from the center - so if we have a point on a circle, at a given distance from the center, it will be at the same distance from the center after the rotation, so also on the same circle. You can actually see that in the animation above.

Why am I writing about all this? It should become clear in a moment - when we start talking about Lorentz transformations.

The Lorentz transformations aren't as intuitive to people as rotations. In a sense, we also deal with them since childhood (they are the transformations describing the relationships between moving observers, after all), but it's definitely much less visible.

Full Lorentz tranformations work in a 4-dimensional space-time, but just like in the previous article, we will limit ourselves to two dimensions for simplicity - the dimensions being time and one spatial dimension. Such a 2-dimensional space-time is very similar to a plane, and you can also describe the points in it with two coordinates - but we will be using (t,x) instead of (x,y).

Just like with rotations, we can write formulas that describe Lorentz transformations. In the context of the theory of relativity they are usually written like below:

These equations contain the relative velocity of the observers, the speed of light and a lot of physics in general. For now, we will look at these transformations in a bit more abstract way, and we will write them this way:

We will not talk about what exactly is for now (it has something to do with the velocity of the observer), right now we will focus on the similarities with rotations.

And there are a lot of similarities, indeed! Like in rotations, sines and cosines appear - except hyperbolic, not "regular" (you can read more about hyperbolic functions here). Also like with rotations, the point (0,0) is transformed into (0,0) - the transformation doesn't touch it. And again like in rotation, there is a value associated with every point that the transformation doesn't change.

Let us remind ourselves: rotations didn't change the distance of points from the origin, nor, what follows, the square of the distance, equal to . According to the hint for the calculations, it is related to the Pythagorean trigonometric identity, which is the fact that for any angle , the equality holds.

Well, there is actually a hyperbolic identity as well: for any , the equality holds. And also because of that identity, the Lorentz transformations don't change the value (or, if we want to measure time and distance in different units: - the equations written above simply assume ). This value is called **the space-time interval**.

Just like in rotations, not only the interval between a point and the origin is conserved, but also between any two points: .

As it turns out, the space-time interval has many properties not unlike those of distance. The main difference is that the square of the distance between two different points is always positive - the interval, on the other hand, can be either positive, negative or even zero. Since it is conserved, any points separated by a positive interval will also be separated with a positive interval after the transformation - and the same holds for negative and zero intervals. What does it mean?

In order to solve this riddle, let us consider the meaning of a zero interval. Assume that we have two points, A: and B: , which have a zero interval between them:

Transforming this equation, we can get:

Let us remember that points in space-time are events. The event A happened in the place and time , and event B happened in place and time . is thus the distance between events A and B, and is the time that passed since A until B, or the other way round. Dividing the distance by the time we get the speed we would need to move at in order to cover this distance in this time - so in order to get from A to B, you have to move at - the speed of light.

And now the most important thing - the Lorentz transformations don't change the interval! This means that if we look from the point of view of a different observer - which corresponds to transforming A and B into A' and B' with a Lorentz transformation - the interval between A' and B' will also be zero! This means that if something moves at the speed of light in one frame of reference, it will be moving at the speed of light in all frames of reference. This is the famous invariance of the speed of light.

Let us take another look at the animated picture above. You can see two dark-yellow-brownish, oblique lines. These are the lines that correspond to moving at the speed of light. You can see that they are staying in place regardless of how the picture is transformed.

A similar thing applies to the cyan hyperbolas. Just as rotations don't affect circles, because they are the sets of points at a constant distance from the origin, the Lorentz transformations don't affect hyperbolas - the sets of points at a constant *interval* from the origin.

I'll refrain from going into the details of the analysis, but just like the lines correspond to a zero interval from the origin, the top and bottom hyperbolas correspond to positive intervals, and the left and right hyperbolas - to negative intervals. All in all, we can look at our space-time as divided into four quadrants with the light lines - all points in the upper and lower quadrant are separated by a positive interval from the origin, and all points in the left and right quadrants - by a negative interval.

Since the Lorentz transformations don't change the interval, no point from either quadrant can ever be transformed into a point in another one! This limitation becomes slightly weaker, though, if we add some spatial dimensions. Adding a second spatial dimension, which we can imagine as rotating the picture around the time axis (the vertical one), will change the light lines into a **light cone** and will divide the space-time into three regions instead of four quadrants.

These three regions are: the upper part of the cone - the future; the lower part of the cone - the past; and everything to the sides - so-called "elsewhere" - these are the events that can't be reached from the origin by moving at subluminal speeds.

One could ask - why the futue is not just the upper half of the diagram, and the past - the lower half? After all, the points in the upper half all have time coordinates greater than zero, and the lower half - below zero... It's a very good question.

Let us take another look at the animation, and specifically at what happens to the points in the left and right quadrants. The animation shows the points being transformed one way and the other way, in alternating cycles. As the transformation distorts the picture, pretty much every point in the left and right quadrants sometimes gets to the upper half, and sometimes to the lower. This means that a point with a negative time coordinate can get transformed into a point with a positive one, and vice versa - so it can get "moved" from the future into the past, or the other way round! It cannot be said then, that any of these points is in the future or in the past - it depends on the observer! This only applies to the points from "elsewhere", though - the points from the upper quadrant (the upper part of the cone) are in the future of all observers, and the points in the lower quadrant (lower part of the cone) - in the past of all observers (careful, though: of all observers *that are at (0,0)* - the observers in other points have their own cones, slightly shifted relative to this one).

I've said a lot about the Lorentz transformations so far, but nothing about how we know that they in fact govern our reality. Well - as you can expect, we have reasons to think that. It's not as if someone just came up with the idea and everyone just took it at their word. The problem is, it is pretty complicated to show where the transformations come from.

To be more precise - it's quite easy to derive Lorentz transformations once you assume that the speed of light is independent from the observer. This is how it was done in high school when I was a student (although I have no idea if it is still done this way, nor if it's even still a part of the school curriculum...). There are some further complications if we don't want to just believe that (even though the fact that the speed of light is constant is rather well documented) - some more effort is required then, but it is still possible; you can read more about it here.

That's all for this part. I'm still not sure what the next one will be about. The long-term plan was to move slowly towards explaining black holes and effects related to them, so the next post will probably be about curvature. Another possibility is a slightly deeper dive into Special Relativity - like analysing the twin paradox, for example. If you have some other topic you would like to see covered - leave a comment, and I'll be sure to consider it.

Any comments about the clarity of the text will also be appreciated! I'll gladly get to know what is not clear and improve it - I'd like the articles to be as easy to understand as possible.

Till the next time!

]]>It all began with two flat-earthers appearing on a certain forum. The exchange started with standard arguments like timezones, seasons, eclipses, the rotation of the sky... what have you. As usual in such cases, those arguments were met with silence or really far-fetched alternative explanations. I'll omit the details, interested people can find standard flat-earth arguments on the web.

Well, you can't sway a person that is completely confident in their beliefs with arguments, so the discussion has become somewhat futile. Both sides stuck to their positions and mulling over the same issues time and time again has started. That is, until one of the flat-earthers started presenting photos which, according to them, proved that the Earth "can't be a ball with a 6371-6378 km radius", with descriptions that can be expressed shortly as "explain THAT!". Alright.

The most interesting part was when they touched upon the issue of this observation of the Schneeberg mountain from the Praděd peak:

What is the problem? Well, let's look at some of the facts:

- Praděd has an elevation of 1491 m ASL, but it is reasonable to assume that the observation has been made from a viewing platform that is found at the peak, which has an elevation of 1565 m ASL.
- The Schneeberg mountain is as tall as 2070 m ASL.
- The distance from Praděd to Schneeberg is 277 km.
- There is a hill between Praděd and Schneeberg, approx. 73 km from the former, that has an elevation of 680 m ASL. (in the picture, it is the hill that has two wind turbines on top of it; the turbines are the two poles with red lights to the left of Schneeberg, in reality they are a little distance to the east of a Czech town of Protivanov).

And everything would be perfectly clear if it wasn't for the fourth fact. To show why, let us calculate how tall would Schneeberg have to be, so that the hill near Protivanov couldn't obscure it.

We will use the polar coordinates, assuming the Earth's radius of .

We have:

The equation of a line in polar coordinates is:

Substituting the coordinates of the first two points, we get and , then we calculate ... And what do we get?

As it turns out, a line starting at Praděd and tangent to the hill near Protivanov arrives at Schneeberg at the elevation of... about 2600 m ASL!

The hill near Protivanov should be obscuring Schneeberg. Schneeberg makes nothing of it and keeps being visible in the picture.

What is happening here?

Our flat-earther obviously concluded that this proves the flatness of the Earth. Objects wouldn't hide under the horizon on a flat Earth, so it would be no problem for Schneeberg to stick out from behind the hill near Protivanov.

Of course, there is another explanation, too, and it is the atmospheric refraction.

To give you some introduction - refraction is a topic that needs to be treated very carefully in the presence of flat-earthers. To them, it is a keyword that explains everything: timezones, seasons, the horizon... generally everything that is a good argument for the Earth's roundness. Something looks differently than it should on a flat Earth? Refraction! Of course it's no explanation at all - but if we don't accept refraction-based arguments from the other side, we need to be thorough when we need to use it ourselves. We wouldn't want to bring ourselves to their level, would we? ;)

So, in order not to leave any hole in the explanation, I set off to prepare a thorough, quantitative analysis.

Before I present the approach I took, let me explain one more thing - flat-earthers have the tendency to question everything they can't check themselves. So, even though atmospheric refraction is well-explored and measured, I decided to start from some more basic principles. It is hard to question the laws of optics, being confronted with them every day, and it is hard to deny that the air gets less dense with altitude. Thus, I assumed a simplified model:

- The air density decreases exponentially with altitude.
- The deviation of the air's refractive index from 1 is proportional to its density.
- And, of course - the Earth is a ball with a radius of 6378 km.

The first point basically means assuming this equation: .

The coefficient can be derived from the equation by tying the density of air to its pressure with the ideal gas equation. This leads to being equal to , where - the molar mass of the air, - the Earth's gravitational acceleration, - universal gas constant, - the temperature of the air. The constants can be found on Wikipedia, and we assume the temperature to be 273 K, which gives us .

Again on Wikipedia we can find the refractive index of the air at the pressure of 1 atmosphere and the temperature of 273 K, equal to 1.000293.

So, the assumption no. 2 is basically this: .

We now have a model of the atmosphere, but what's left is to see how the light propagates in such an atmosphere. We will use Fermat's principle for that.

The Fermat's principle states that the light takes the route between points A and B that minimises the optical length of the path (the integral of the refractive index). In other words, it can be expressed as follows:

This can be written in polar coordinates as:

If we assume that the path of our light ray can be expressed with a function (it is true as long as we don't consider vertical rays), this can be expressed with an integral over :

in this equation.

Problems of this kind can be solved with the Euler-Lagrange equation. If we assume , the Euler-Lagrange equation will look like the following:

Omitting the intermediate steps (those who know calculus can perform those steps themselves; those who don't wouldn't get much out of it, anyway ;)), the final result is this:

where .

We can do a quick sanity check now by checking the result for a constant . In such a case, and we get - an equation that is satisfied by a straight line . This is correct, at least.

This equation doesn't look like it could be easily transformed further, to put it lightly. But we are lucky in that we have the 21st century now, and we have computers, so why don't we do some numerical analysis? I decided to create a small application that calculates paths of the light rays based on this equation (links to the source code and the compiled binaries are at the end of this post).

The first test: we do the calculation for a ray that starts tangentially to the surface. Angles of deflection of such rays are important to astronomers and well-measured, the deflection in typical conditions is 34 arc-minutes. I tell the program to calculate the path up to the altitude of 200 km (high enough that the atmosphere shouldn't deflect it further) and get the result... 35 arc-minutes. Excellent for such a crude approximation!

Excited by this test, I decided to input the data from the Schneeberg case. The ray starts at 1565 m ASL, and we get the starting angle from the condition that it has to hit 680 m ASL at the distance of 73 km. What will be the altitude at 277 km? The result:

`$ atm-refraction --start-h 1565 --tgt-h 680 --tgt-dist 73 --output-dist 277 -v`

Ray parameters chosen:

Starting altitude: 1565 m ASL

Hits 680 m ASL at a distance of 73 km

```
```

`Altitude at distance 277 km: 1688.2650324094586`

*The ray will be at a bit less than 1700 m ASL at Schneeberg's distance!* This is almost 400 m below the peak, completely sufficient for the mountain to be visible! Success :D

We could stop at that, but our flat-earther decided to give me another challenge. "This video proves conclusively that the Earth is flat!", they wrote, supplying the following link: https://www.youtube.com/watch?v=oNdRhW1yQZ4.

For those that don't want to watch the video: the author shows the view of New Zealand's southern island from a bay near Wellington. Some peaks are visible. The author finds them on a map, gets distances and elevations, then compares the view with predictions from a flat-Earth and round-Earth models. He gets agreement with the flat model, and disagreement with the round one. But is that so...?

The peaks are color-coded, and their data is shown on the following frame from the video:

The video itself shows a concerning thing: the purple peak is marked as reaching 2362 m ASL, but later in the film the author shows a table with data, in which 2410 m is entered. Why? No idea.

Anyway, I decided to input this data into my program and get the viewing angles of the various peaks. Assuming the horizon is at 0 (which the author didn't do, by the way), we get the following results:

The purple, yellow, red and green peaks fit surprisingly well! We have some trouble with the cyan (which got merged with yellow) and the blue peaks. Encouraged by the good fit for the other peaks, I started suspecting that the author misidentified the cyan and blue peaks. I resolved to try and find them myself.

Unfortunately, finding them on the map of New Zealand is a Sisyphean task. There are a lot of small and large peaks in the area. I decided to get some help from a panorama generator at http://www.udeuschle.selfhost.pro/panoramas/makepanoramas_en.htm. This generator lets you select the place and direction of viewing, and then draws the simulated view.

It was pretty easy to find the cyan and blue peaks on the generated panorama:

As you can see, their distances and elevations differ slightly from the ones given by the video's author. Let us try those values in the simulator, now...

Fits perfectly :)

What is the conclusion of this story? Well, I have drawn two main ones:

1. Don't assume that an effect is negligible, unless you've checked it (by a calculation or an experiment).

2. The landscapes would look differently if there was no atmospheric refraction.

And, of course, nothing compares to the satisfaction from proving someone wrong with calculations :D

Finally, the promised links to the program:

The code: https://gitea.ebvalaim.pl/ebvalaim/atm-refraction

(`atm-refraction --help`

prints the options list)

Download “atm-refraction - Linux” atm-refraction-0.2.2-linux.zip – Downloaded 75 times – 1 MB

Download “atm-refraction - Windows” atm-refraction-0.2.2-win.zip – Downloaded 72 times – 1 MB

I came up with an idea of yet another test that could be conducted with the photo of Schneeberg.

It bases on the fact that the wind turbines from the photo (reminder: they are the two poles to the left of Schneeberg) can be found on Google Maps. They are exactly here:

Google Maps tells us that the distance between them is about 450 m. From the distance of 73 km, this gives an angle of about 0.3 - 0.35 degrees (0.35 would be for a line perpendicular to the line of sight, but it is slightly oblique in reality). Based on that, we can estimate the angular size of Schneeberg in the picture to be about 0.05 - 0.1 degrees.

The latest version of the refraction simulator has two interesting features: one, it can print the initial angle between the simulated ray and horizontal plane, and two, it can simulate a flat Earth. The light rays start at the observer, so this gives us an ability to calculate the viewing angle of Schneeberg and the hill near Protivanov both on a round and a flat Earth, and both with refraction and without. The results are presented below:

a) Round Earth, with refraction

`Hill:`

$ ./atm-refraction --start-h 1565 --tgt-h 680 --tgt-dist 73 --output-ang

-0.9565201819329879

Schneeberg:

$ ./atm-refraction --start-h 1565 --tgt-h 2070 --tgt-dist 277 --output-ang

-0.8812788180363719

```
```

`Difference: 0.075 degrees`

b) Round Earth, no refraction

`Hill:`

$ ./atm-refraction --start-h 1565 --tgt-h 680 --tgt-dist 73 --output-ang --straight

-1.0223415221033665

Schneeberg:

$ ./atm-refraction --start-h 1565 --tgt-h 2070 --tgt-dist 277 --output-ang --straight

-1.1397834768466832

```
```

`Difference: -0.117 degrees (invisible)`

c) Flat Earth, no refraction

`Hill:`

$ ./atm-refraction --start-h 1565 --tgt-h 680 --tgt-dist 73 --output-ang --straight --flat

-0.6945791903312372

Schneeberg:

$ ./atm-refraction --start-h 1565 --tgt-h 2070 --tgt-dist 277 --output-ang --straight --flat

0.10445608879994964

```
```

`Difference: 0.799 degrees`

d) Flat Earth, with refraction

`Hill:`

$ ./atm-refraction --start-h 1565 --tgt-h 680 --tgt-dist 73 --output-ang --flat

-0.6293267999337602

Schneeberg:

$ ./atm-refraction --start-h 1565 --tgt-h 2070 --tgt-dist 277 --output-ang --flat

0.3332380994146694

```
```

`Difference: 0.963 degrees`

As you can see, the predicted angular sizes of the visible part of Schneeberg vary wildly between models. One of the models fits perfectly, though... the round one, with refraction.

Even such a simple observation turns out to be a pretty solid proof for the roundness of the Earth!

]]>I've been employed at MaidSafe for over a year and a half now. It's a small, Scottish company working on creating a fully distributed Internet. Sounds a bit weird - the Internet is already distributed, isn't it? Well, it isn't completely - every website in the Internet exists on some servers belonging to some single company. All data in the Internet is controlled by the owners of the servers that host it, and not necessarily the actual owners of the data itself. This leads to situations in which our data is sometimes used in ways we don't like (GDPR, which came into force recently, is supposed to improve the state of affairs, but I wouldn't expect too much...).

MaidSafe aims to change all of this. It counters the centralised servers with the SAFE Network - a distributed network, in which everyone controls their data. When we upload a file to this network, we aren't putting it on a specific server. Instead, the file is sliced into multiple pieces, encrypted and distributed in multiple copies among the computers of the network's users. Every user shares a part of their hard drive, but only controls their own data - the rest is unreadable to them thanks to encryption. What's more, in order to prevent spam and incentivise the users to share their space, SAFE Network is going to have its own native cryptocurrency - Safecoin - but it won't be blockchain-based, unlike the other cryptocurrencies.

But enough advertising, let's get to the point.

The architecture of a distributed network gives rise to multiple challenges, not present in the traditional Internet. For example, let's assume that I have a file in the network, which is stored on some computers, and I want to modify it somehow. After I do that, I'm trying to read the file back from the network. How can I be sure that I'm seeing what I saved? There is no central authority - some computers storing my file might not have seen the update yet. Some might have disappeared from the network, there roles being taken over by other computers that weren't even the destination of the message carrying the update. Some computers might have been malicious and sending incorrect data on purpose - after all, the nodes of the network are regular users' computers, and we all know how popular trolling is. So, if the computers - the nodes of the network - are sending contradictory data, how do we know which version is the correct one?

The above is the so called distributed consensus problem, but not only that - the potential presence of malicious actors extends it to what is known as the "Byzantine generals problem" (being so named from the original formulation, in which the generals had to independently decide whether to attack a city). This problem is being widely analysed since the 80s, and there are multiple solutions for it - but it's still not the end! In our case, we want to be sure that the decision will be correct even if the messages being passed between computers are arbitrarily delayed. This introduces something called "asynchrony" - a lack of assumptions regarding timing. The problem defined this way is called ABFT - Asynchronous Byzantine Fault Tolerance.

There are solutions to ABFT as well - but they are either too slow, or too complex, or patented, or they have some other issues. This made us at MaidSafe decide to try and come up with our own algorithm, basing it on existing knowledge. PARSEC - a Protocol for Asynchronous, Reliable, Secure and Efficient Consensus - is the result of this effort.

PARSEC - contrary to its name - isn't fully asynchronous. In its current form, it contains some assumptions about delays in message delivery, which make it somewhat less sophisticated theoretically, but perhaps more practical. We are still looking for a way of getting full asynchrony, though.

I won't be getting into the technical details. For those interested, they are described here and here. In short, we combined the idea of a graph of "gossip" among the nodes with Asynchronous Binary Consensus (which is a type of consensus about a single value which can be either 0 or 1) using something called a "concrete coin" (roughly speaking, it is about computers being able to "toss a coin" independently and get 0 or 1 randomly, but so that they all get the same value with a large probability).

The whole field is very interesting and there is much left to be discovered there. For those interested in studying the issue a bit deeper - I encourage you to read the documents linked above, an article on Medium and to take a look at the SAFE Network community forums. I'll gladly answer any questions myself as well, so feel free to ask in the comments! :)

]]>A more detailed description of those GIFs will be a part of the new post in the category Physics for everyone :)

I published the code I used to generate them on GitHub: https://github.com/fizyk20/spacetime-graph/tree/blog-post

]]>The notion of space-time is briefly mentioned at school, but usually the profound consequences of combining space and time into a single entity aren't explained too much. To understand this, one must first go a bit deeper into the details of this idea.

Let's start with the basics. Imagine that you want to meet a friend. What do you need to decide? The answer is rather simple:

- where you want to meet
- when you want to meet

The "where" part is usually a few words - this or that restaurant, a movie theater, someone's house, whatever. If, for some reason, you wanted to meet somewhere in the middle of the Himalayas, it will probably be simpler to say two numbers: the latitude and longitude. What, though, if the meeting isn't going to be on the surface of the Earth, but in an underground bunker, or the opposite - on some floating platform? You need a third number, like the altitude above the sea level. Those three numbers - the coordinates - will do the trick: you can meet anywhere on Earth, under or above its surface.

Such a set of coordinates actually lets you denote an arbitrary point in the whole Universe (some of them would just be very high above the Earth's surface), but it's a rather incovenient system, because the Earth constantly moves. Nevertheless, whatever system we come up with, three numbers will always be enough to uniquely identify a point - which stems from the fact that we live in a 3-dimensional space.

To summarise: "where" requires 3 numbers. How about "when"?

We have the calendar and clocks for that, but the description of a moment in time can be reduced into just one number - programmers frequently use one of the ways called a "Unix timestamp". The astronomers have their own system and they use the Julian day (sometimes modified). Anyway, what's important is that time can be described by just one number - we only have one temporal dimension.

These four numbers - three describing a place and one describing the time - are the so called **space-time coordinates**. A point described by a given set of coordinates, like 52°N, 21°E, 75 m asl, 2000-01-01 12:00 (there are more than four numbers here - but as mentioned before, they can be reduced to four, but it would be less readable) is an **event**. The space-time itself is then nothing else than the set of all events - in this sense the events are points in space-time. Because we need four numbers to denote a point, this means that *the space-time is 4-dimensional*.

Okay, we discovered that any event can be described by just four numbers, which leads to a 4-dimensional space-time, but what is so revolutionary about this? Coordinate systems were invented a few hundred years ago, time and space are also known for a long time, and yet nobody before Einstein was particularly interested in the notion of space-time. It's frankly no wonder - if we put space and time together into a single thing, it doesn't mean that we suddenly stop having space and time... right...?

Spoiler: wrong. Such a unification of space and time has profound consequences, as we will soon see. But let's not rush.

First, a technical note. Since I'll want to illustrate the text with some drawings, and drawing in 4 dimensions is hard (if you don't agree, please contact me, I'll gladly learn ;) ), we will assume for simplicity that space is just one-dimensional - that it is a line. It won't make a difference for the important things, but it will let us clearly represent everything on a flat screen.

That being said - let us take a look at some John Smith's day.

Let's imagine that the hero of our story, John Smith, arranged to meet a friend somewhere he will take 2.5 hours to reach. John left his house at 8 in the morning and got to the meeting at 10:30. He spent an hour and a half with his friend, and then he went travelling home. He got hungry, though, so he stopped for lunch. Eating took him half an hour, after which he went back on the road and reached his house at 3pm.

In the picture to the right we have a diagram showing how John was moving with respect to the Earth. In the beginning, between 7 and 8 in the morning, he was home. Since he wasn't moving then, this part of John's line is vertical - every point on it has the same spatial coordinate, only the time coordinate is changing.

At 8 in the morning John got in his car, or any other means of transportation, and hit the road. As time went by, John kept finding himself in different places (different x coordinates), which causes the line showing this part of the day to be oblique. What's more, the angle of this obliquity (to the vertical direction) corresponds to John's velocity - more oblique line would imply that John covers more distance in the same time, hence he is travelling faster. Here our hero moves with a constant velocity right until the moment of the meeting.

During the meeting John is again at rest, which again results in a vertical line until 12:00, when he starts going back. Then his line becomes oblique again, but to the other side, since he is now moving in the opposite direction. The lunch stop is one more vertical line (no movement again), then one more oblique one for the rest of the travel, until finally John gets home, sits in his chair and his line becomes vertical again.

Such a line, representing what happens to an object as time flows, is called a **world line** of the object. *A world line* is generally some curve in the space-time, and every point on it is an *event*, which the object "experienced".

We now know what a world line is and what a space-time diagram looks like, so let's move on. Let's now focus on the part of the day during which John travelled from his house to the meeting (picture to the left).

As we've already said, this part of John's world line is oblique, which means that John was moving. It is also straight, which means that John's velocity wasn't changing - he wasn't accelerating (the slope angle is constant, and as we already mentioned, it corresponds to the velocity). If John was accelerating, the line would be curved a bit upwards (the angle would grow with time), and if he was decelerating, it would be curved the other way - down (shrinking angle).

We have said that John was moving, but there is no objective movement! I used a shortcut here - he was moving *with respect to the Earth*. With respect to himself, for example, he obviously wasn't - so what would this part of the diagram look like from his point of view?

And now the importance of the idea of space-time shows. In John's frame of reference his line must be vertical, but the space-time is still the same. So, in order to see from his point of view, we will *rotate* our diagram - so that John's line becomes vertical. The result is visible to the right.

The full consequences of this step aren't yet visible, but there are already some strange effects. Since we assume that the *relativity principle* holds, and it says that all frames of reference are equal, we have to draw the time axis vertically on John's diagram, too. The Earth's time axis shouldn't be anywhere else than where it was, though, so it has to be *oblique*. Earth's time (t) and John's time (t') are non-parallel!

Let's stress this again: by combining time and space into space-time and drawing a simple picture, we immediately concluded that **time is relative and depends on the observer**. Immediately! There are no big steps here, you just make a drawing and rotate it! This is the power of the idea of space-time.

For now we just drew the coordinate axes on John's diagram, let's now add ticks to them (well, to the time axis, at least). How dense should the ticks be? Simple - just as dense as on the Earth's time axis, because why should it be different? It makes no difference to a clock if it moves or not - it should just count seconds / minutes / hours along its time axis just the same. You can see ticks drawn this way in the picture to the right.

John left his home at 8:00 and there is no reason for his clock to show different time then. We start at 8:00, then, and we count... But what is happening? At 10:30 John still hasn't reached his destination. Since his world line goes through space-time at an angle, it is a bit *longer* than the 8:00-10:30 interval on the Earth's time axis. This causes John's clock to show a time **later than 10:30** when he gets to the meeting. Weird! (The readers who know something about relativity probably notice that something is off here - we will come back to this.)

Another conclusion can be drawn - *different observers can see different time between the same events*. We just discovered time dilation!

But this is **still not everything**. Let's take a look at the distance between John's house and the place of the meeting on the next diagram.

Let's see. The place of the meeting doesn't move with regards to the Earth - so its world line has to be parallel to the Earth's time axis (t). It also has to pass through the appropriate point on the space axis. This is the dotted line on the diagram.

However, John's space isn't actually parallel to Earth's space, just like his time. This causes John's space axis to intersect the meeting place's world line a bit lower. What's more, as a result the interval between John's house and the meeting place on John's space axis is **longer** than the analogous interval on the Earth's space axis. **John thinks he is further from the meeting's place when he moves faster!**

There's even more! At 8:00, when John leaves his house, it is **before 8:00** at the place of the meeting, according to him! It will be 8:00 there only at the event on the Earth's x axis (it's the place of Earth's 8:00 in the picture), but it will be already later for John! This means that we also discovered **the relativity of simultaneity!**

We got practically all major consequences of the theory of relativity from a simple diagram. Unfortunately, I had to cheat in a few places and it is now time to set the record straight.

I already cheated in the third diagram, when we switched our point of view to that of John. I said then that it's enough to rotate the picture and everything will be OK. It would be awesome if that was true, but unfortunately, the reality is more complicated than that. Transformations between frames of reference aren't actually rotations, but rather so called *Lorentz transformations*.

A more appropriate picture is to the right.

The Lorentz transformation is actually very similar to a rotation. Just as rotations move the points along circles, the Lorentz transformations move them along hyperbolas. The space axis gets turned in the opposite direction than the time axis, which results in an unchanging line appearing between them - it corresponds to movement with the speed of light. You can read some more about similarities between hyperbolas and circles here.

What is more important for us here is that some parts of Lorentz transformations work the opposite way to rotations. In the rotate picture it took more than 2.5 hours for John to get to his destination and he had a longer distance to cover. In reality, *less* time would pass for him (time flows *slower* for moving observers) and he will have *less* distance to cover (hence: Lorentz *contraction*).

Of course, in real life the differences are unnoticeable. This is because if I wanted to be precise in the diagrams, every second on the time axis would have to correspond to about 300 000 km on the space axis - or 1 light-second. If that was the case, John in these diagrams would have traveled light-*hours*, which is billions of kilometers, in just a few hours - unachievable for a typical person ;) So in fact, world lines for all people are indistinguishable from vertical - but this is not the case for e.g. GPS satellites, which have to take relativistic effects into account.

Regardless of those issues, I think that a look at a sheet-of-paper-space-time, in which rotation is the appropriate transformation, is really helpful in becoming familiar with the ideas of relativity, which are counter-intuitive for many people. Seeing that treating space-time as a whole leads to all sorts of relativistic effects was an enlightening moment for me personally, and I hope that I managed to convey at least a part of this enlightenment here ;)

As a final note - dear readers, don't hesitate to post questions, either here on this blog in the comments, or on the websites where I'll be linking this article. I'll be trying to answer as well as I can. I consider relativity a fascinating topic and I really like to share this fascination :)

This is just a first article in the series - I currently don't know what I'll be describing in the next ones, but we will make small steps towards a description of black holes and fun facts related to them. Stay tuned! :)

]]>

(You will get these results if you have the calculator set to radians - if you use degrees, then the cosine results will be different; it has no influence on the hyperbolic functions and we'll see later why that is.)

Right, these 11 thousand for cosh(10) look very similar to the trigonometric functions. This "h" apparently changes quite a bit, but what exactly...?

If you encountered complex numbers during your later education, you could stumble upon such definitions:

Some similarity is visible here, but... Why such a form? What does this have to do with hyperbolas? If you don't know it yet, you will know after reading this article.

If trigonometric functions are something about triangles to you, you first have to change your understanding of them completely. They have much more to do with circles than with triangles (even though the very name "trigonometric" suggests triangles - it's a very unfortunate historic issue).

But first things first. The picture on the right shows how you usually learn the trigonometric functions at school. There is a triangle and an angle inside it, and the values of the sine and cosine are the ratios of respective sides.

OK, this makes sense. But... what about angles above 90°? Or below 0°? What exactly is sin(100°)? What is cos(-20°)? These functions are defined for these arguments, but how to show it on a triangle? You just can't.

These problems are solved by defining the sine and cosine on a circle (the picture to the left). We take a circle with radius 1 and the center at (0,0). We draw a radius at the angle to the x axis, with the angle growing conterclockwise. The coordinates of the point on the circle that we hit are and . There is no problem with large angles (we can go around the origin of the coordinate system as much as we want), nor with negative angles (we just count them clockwise).

We can also look at this from another perspective - when we change from 0 to 360° (we can do so even from -∞ to +∞) and start marking the points with coordinates , we will get a circle. To be more precise, we say that is a parameter, and is a parametrization of a circle.

Since we are starting to go deeper into the mathematical language, it's worth mentioning that mathematicians don't really like to measure angles in degrees. The preferred unit is the radian - the angle in radians is just the ratio of the length of the angle's arc to the circle's radius. The full angle is radians, 180° is radians, 90° is ... Actually, mathematicians (and physicists) don't even treat angles as values with a unit, but as "naked" (dimensionless) numbers: they don't say "the angle is x radians", but just "the angle is x", full stop. It makes sense, because a ratio of lengths of two lines (in this case the arc and the radius) is just a number and doesn't require a unit.

So now a problem to solve: what is the area of the circular sector that has the angle (the picture to the right)?

Let's calculate: the full circle has an area of . The angle is a part of the whole circle: a ratio equal to (reminder, the full angle is ). This means that the sector's area is . When the radius is 1, as it is here, the area will be just .

So if we imagine that we start at and draw a circle until we are at , the area that we will swipe will be .

Okay, but what does it have to do with the hyperbolic functions?

Well, just as cosine and sine parametrize a circle, the hyperbolic cosine and sine parametrize a hyperbola. Taking different values of a parameter, let's call it , and marking points we will get a hyperbola passing through the point .

But there is more - if we start from and move along the hyperbola, swiping the area between it and the origin of the coordinate system, when we reach , the area will be... . This is why I wanted to point out the area issue in the circle - if you look from this perspective, the analogy between the trigonometric and the hyperbolic functions is complete.

It is at last apparent that the names of the hyperbolic functions aren't similar to the trigonometric ones by accident. But do they have any practical use?

As it turns out, yes they do. Hyperbolic functions are incredibly useful in relativistic physics - the transformations between two moving frames of reference are strikingly similar to rotations, but expressed with the hyperbolic functions instead of trigonometric. And in other fields: a rope hanging from two points assumes the shape of the graph of the cosh(x) function under gravity - this is called the catenary.

That's it. I hope I showed something interesting here, no matter if you already knew something about the hyperbolic functions or not. I personally think that such analogies between apparently very different mathematical objects are fascinating, and mathematics is full of them - which is one of great reasons to explore it :)

]]>It began with a simple hack, working around a limitation of the language - and apparently this limitation bothered many people, because a few sent me pull requests (also a first for me), and a large number downloads the library. I actually have no idea what else to write, I'm just happy that people are finding it useful ;)

]]>