From 2237932592a792118c077db908bf93232e64ff11 Mon Sep 17 00:00:00 2001 From: Harry Gifford Date: Sun, 9 Jul 2023 22:41:38 -0700 Subject: [PATCH] Add simple self contained example (#8) Source located under [`static/simple.html`](/static/simple.html). You may find this version easier if you just want to see how the transformation works and apply it to your own projects. It is completely self contained and has no external dependencies making it convenient and easy to use. --- README.md | 4 +- static/simple.html | 399 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 402 insertions(+), 1 deletion(-) create mode 100644 static/simple.html diff --git a/README.md b/README.md index 9cfd36c..31fccef 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ [**Live WebGL demo**](https://harrygifford.github.io/special-relativity/) +[**Simple single HTML version**](https://harrygifford.github.io/special-relativity/simple.html). Source located under [`static/simple.html`](/static/simple.html). You may find this version easier if you just want to see how the transformation works and apply it to your own projects. It is completely self contained and has no external dependencies. + This project shows how the geometry of the world looks under special relativistic transformations. You can see a live demo [here](https://harrygifford.github.io/special-relativity/). You can see effects such as Terrell rotation, Doppler shifting and the headlight effect. Note that the @@ -13,7 +15,7 @@ page uses WebGL. If you cannot use WebGL, there is a video Accelerating along a street at at relativistic speeds. You can see the geometric effects of [abberation](https://en.wikipedia.org/wiki/Relativistic_aberration) and [Terrell rotation](https://en.wikipedia.org/wiki/Terrell_rotation). -See [Explanation](/explanation.md) for details on the math. +See [Explanation](/explanation.md) for details on the math as well as for information on how to add this to your own code. ## Usage diff --git a/static/simple.html b/static/simple.html new file mode 100644 index 0000000..c814305 --- /dev/null +++ b/static/simple.html @@ -0,0 +1,399 @@ + + + + + + Simple example showing Terrell rotation + + + + +
+ Below shows a set of cubes moving at 0.95c (95% of the speed of light.) + The top row shows the cubes moving without relativistic corrections. +
+ The bottom row shows the cubes moving with relativistic corrections. +
+ + + + +