Add files via upload

This commit is contained in:
TimothyLottes
2016-11-17 00:14:30 -05:00
committed by GitHub
parent 363fd3e12e
commit 31383c9a02
2 changed files with 37 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
<html><head><link rel="stylesheet" href="style.css"></head><body><div class="page">
<h1>20081014 - Octahedron Mapping</h1>
<br>
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.
<br><br>
<pre>
..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)
</pre>
</div></body></html>
+1
View File
@@ -318,6 +318,7 @@ and attempting to restore what I can from prior lost images.
<br>
<a href="20081030.html">20081030 - Parallel Rapid Development Architecture</a><br>
<a href="20081020.html">20081020 - Temporal Binned Ring Buffers</a><br>
<a href="20081014.html">20081014 - Octahedron Mapping</a><br>
<br>
<b>2007</b><br>
<a href="20071026.html">20071026 - Transform Feedback</a><br>