aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz Grave <git@yannherklotzgrave.com>2019-03-28 18:09:24 +0000
committerYann Herklotz Grave <git@yannherklotzgrave.com>2019-03-28 18:09:24 +0000
commitfc9dbd4573ee2581c53bad5e7b29f2780e04d85a (patch)
tree9827ef5f55eda6ecfa2bcd592c85b20e8adec0b8
parentd75ae8398e320aeaddba13c3d44d694d075bb84b (diff)
downloadmirror-ball-fc9dbd4573ee2581c53bad5e7b29f2780e04d85a.tar.gz
mirror-ball-fc9dbd4573ee2581c53bad5e7b29f2780e04d85a.zip
Add normals and reflect
-rw-r--r--README.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/README.md b/README.md
index 7d61e12..1f2ff17 100644
--- a/README.md
+++ b/README.md
@@ -10,6 +10,17 @@ mapping the spherical coordinates to a rectangle.
![latlong map](/data/urbanEM_latlong.png)
+The first step is to calculate the normals at every pixel using the position and
+size of the sphere. These can be visualised by setting the RGB to the XYZ of the
+normal at the pixel.
+
+![normal map](/data/normal.png)
+
+The reflection vector can then be calculated and visualised in the same way, by
+using the following formula: `r = 2 (n . v) n - v`.
+
+![reflection map](/data/reflect.png)
+
## Building and run
To compile and run, one has to first download