From 31383c9a02a29f93b31af8b3b42da33e66d1cd56 Mon Sep 17 00:00:00 2001 From: TimothyLottes Date: Thu, 17 Nov 2016 00:14:30 -0500 Subject: [PATCH] Add files via upload --- 20081014.html | 36 ++++++++++++++++++++++++++++++++++++ index.html | 1 + 2 files changed, 37 insertions(+) create mode 100644 20081014.html diff --git a/20081014.html b/20081014.html new file mode 100644 index 0000000..38c6f84 --- /dev/null +++ b/20081014.html @@ -0,0 +1,36 @@ +
+

20081014 - Octahedron Mapping

+
+ +Often when solving a problem it is necessary to map or project a 3D space into a 2D space for efficient computation. Commonly used mappings are cubemaps, sphere maps, and dual paraboloid maps. Each have different trade offs. The octahedron map is another option. Take the 8 sided octahedron and flatten it into a texture, as in the really poor ASCII art below. +

+ +
+..3D...........2D...
+....................
+...+.........+--+--+
+../|\........|E/|\F|
+./A|B\.......|/A|B\|
++--+--+..TO..+--+--+
+.\C|D/.......|\C|D/|
+..\|/........|G\|/H|
+...+.........+--+--+
+
+ABCD -> -z half of octahedron
+EFGH -> +z half of octahedron
+
+For 1/8 the coordinates in the unit sphere where x,y,z all > 0,
+
+s = x / (x+y+z)
+t = y / (x+y+z)
+
+And to reverse,
+
+x = s / (s^2 + t^2 + (1-s-t)^2)^(1/2)
+y = t / (s^2 + t^2 + (1-s-t)^2)^(1/2)
+z = (1-s-t) / (s^2 + t^2 + (1-s-t)^2)^(1/2)
+
+ +
+ + diff --git a/index.html b/index.html index 24b1b7c..68467e1 100644 --- a/index.html +++ b/index.html @@ -318,6 +318,7 @@ and attempting to restore what I can from prior lost images.
20081030 - Parallel Rapid Development Architecture
20081020 - Temporal Binned Ring Buffers
+20081014 - Octahedron Mapping

2007
20071026 - Transform Feedback