Skip to content

Commit

Permalink
Built the .tex.md files
Browse files Browse the repository at this point in the history
  • Loading branch information
potmo committed Feb 7, 2022
1 parent 5b11bb5 commit 067d6c4
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,8 @@ Since our idealised mirror reflects all light striking it, without absorbing any

<center><i>Fig X. The same mirror can appear to be multiple colors by rotating the mirror. In the left picture the mirror will appear blue while in the right it will appear red.</i></center>

To calculate what angle the mirror has to have to reflect the light from a point on the wall, <img src="svgs/4f4f4e395762a3af4575de74c019ebb5.svg?invert_in_darkmode" align=middle width=5.936097749999991pt height=20.221802699999984pt/>, to our eye, <img src="svgs/8cd34385ed61aca950a6b06d09fb50ac.svg?invert_in_darkmode" align=middle width=7.654137149999991pt height=14.15524440000002pt/>, is fairly trivial. We know that the face of the mirror needs to point in such a way that the angle of incidence and the angle of reflection should be equal in regards to the mirrors surface normal. The position of the mirror, the angle of incidence and reflection is known so we just have to compute the optimal mirror surface normal. Suppose we have a colour field with the centre <img src="svgs/4f4f4e395762a3af4575de74c019ebb5.svg?invert_in_darkmode" align=middle width=5.936097749999991pt height=20.221802699999984pt/>. We also have the position of the spectators eye <img src="svgs/8cd34385ed61aca950a6b06d09fb50ac.svg?invert_in_darkmode" align=middle width=7.654137149999991pt height=14.15524440000002pt/> and the center of the mirror <img src="svgs/0e51a2dede42189d77627c4d742822c3.svg?invert_in_darkmode" align=middle width=14.433101099999991pt height=14.15524440000002pt/>. This gives us equation 1:
<p align="center"><img src="svgs/9d15a093c86eee4df0d13d4372e086b5.svg?invert_in_darkmode" align=middle width=149.85835425pt height=18.70453365pt/></p>
where <img src="svgs/d9c65cad43a410a68aca0f92b394e6fd.svg?invert_in_darkmode" align=middle width=10.74774195pt height=31.016366700000024pt/>​​​ denotes the vector of incidence and <img src="svgs/b32c2a51de7b6df016e08d3c668bdf29.svg?invert_in_darkmode" align=middle width=10.747741949999993pt height=23.488575000000026pt/>​​​ the vector of reflectance. The mirrors normal <img src="svgs/4245d1bebff5e7b914282120317e3848.svg?invert_in_darkmode" align=middle width=14.433101099999991pt height=22.831056599999986pt/>​​​ (i.e. the vector that the face points in) is bisecting of the normalised[^normal-vector] vectors of incidence and reflectance:
<p align="center"><img src="svgs/7a19c2e733247b4c77e192656bd5fdb7.svg?invert_in_darkmode" align=middle width=90.6855609pt height=37.57598295pt/></p>
To calculate what angle the mirror has to have to reflect the light from a point on the wall, <img src="svgs/4f4f4e395762a3af4575de74c019ebb5.svg?invert_in_darkmode" align=middle width=5.936097749999991pt height=20.221802699999984pt/>, to our eye, <img src="svgs/8cd34385ed61aca950a6b06d09fb50ac.svg?invert_in_darkmode" align=middle width=7.654137149999991pt height=14.15524440000002pt/>, is fairly trivial. We know that the face of the mirror needs to point in such a way that the angle of incidence and the angle of reflection should be equal in regards to the mirrors surface normal. The position of the mirror, the angle of incidence and reflection is known so we just have to compute the optimal mirror surface normal. Suppose we have a colour field with the centre <img src="svgs/4f4f4e395762a3af4575de74c019ebb5.svg?invert_in_darkmode" align=middle width=5.936097749999991pt height=20.221802699999984pt/>. We also have the position of the spectators eye <img src="svgs/8cd34385ed61aca950a6b06d09fb50ac.svg?invert_in_darkmode" align=middle width=7.654137149999991pt height=14.15524440000002pt/> and the center of the mirror <img src="svgs/0e51a2dede42189d77627c4d742822c3.svg?invert_in_darkmode" align=middle width=14.433101099999991pt height=14.15524440000002pt/>. This gives us equation 1: <p align="center"><img src="svgs/9d15a093c86eee4df0d13d4372e086b5.svg?invert_in_darkmode" align=middle width=149.85835425pt height=18.70453365pt/></p>
where <img src="svgs/d9c65cad43a410a68aca0f92b394e6fd.svg?invert_in_darkmode" align=middle width=10.74774195pt height=31.016366700000024pt/> denotes the vector of incidence and <img src="svgs/b32c2a51de7b6df016e08d3c668bdf29.svg?invert_in_darkmode" align=middle width=10.747741949999993pt height=23.488575000000026pt/> the vector of reflectance. The mirrors normal <img src="svgs/4245d1bebff5e7b914282120317e3848.svg?invert_in_darkmode" align=middle width=14.433101099999991pt height=22.831056599999986pt/> (i.e. the vector that the face points in) is bisecting of the normalised[^normal-vector] vectors of incidence and reflectance:<p align="center"><img src="svgs/7a19c2e733247b4c77e192656bd5fdb7.svg?invert_in_darkmode" align=middle width=90.6855609pt height=37.57598295pt/></p>
Bisecting the angle can be done by adding the two vectors and then splitting the sum in half making it a unit vector.

<img src="./readme/images/finding-normal.png" style="zoom:50%;" />
Expand All @@ -213,7 +211,7 @@ We can now create a "color palette" that we then can "sample" colors from by adj

If we want another colour for a mirror we can just realign the mirror to reflect another colour. Since realigning a mirror can be a bit fiddly we instead opt for moving the palette so the mirror reflects another colour field. Moving the spectator, the mirrors or the palette in relation to each other can all create the same result.

[^normal-vector]: A normalised unit vector is denoted with a hat, e.g. <img src="svgs/02fb26e9b7e5fee785e16efad165de5b.svg?invert_in_darkmode" align=middle width=51.690952499999995pt height=29.485239299999986pt/> where the magnitude of a vector is denoted with double bars. The magnitude can be computed, in 3d euclidian space, with *Pythagoras theorem*: <img src="svgs/c012e6293f3d9032e4f79c5efa69ba22.svg?invert_in_darkmode" align=middle width=149.10749204999996pt height=36.931857600000015pt/>
[^normal-vector]: A normalised unit vector is denoted with a hat, e.g. <img src="svgs/02fb26e9b7e5fee785e16efad165de5b.svg?invert_in_darkmode" align=middle width=51.690952499999995pt height=29.485239299999986pt/> where the magnitude of a vector is denoted with double bars. The magnitude can be computed, in 3d euclidian space, with *Pythagoras theorem*: <img src="svgs/c012e6293f3d9032e4f79c5efa69ba22.svg?invert_in_darkmode" align=middle width=149.10749204999996pt height=36.931857600000015pt/>

So far we have thought of the light as a single ray that strikes a point of the palette, a point of the mirror and the a point of the spectators eye but that is a too big of a simplification. If we think of the rays from the eye (so in reverse[^Reverse]) that strike the mirror they will form a cone with the apex in the eye and the base covering the mirrors surface. It is only the rays within that cone that we will be concerned with. This cone is usually called a *frustum*[^Frustum] and represents the region visible in the mirror reflection. When the rays reflect in the mirrors the frustum will continue extending with the same taper until it strikes the colour fields. The surface area that will be covered by the frustum on the colour fields is related to the surface area of the mirrors and the combined distances between the eye, mirror and colour subrfaces.

Expand Down Expand Up @@ -314,15 +312,15 @@ Below is the De Bruijn sequence, also containing all two letter subsequences but

A <u>**A B**</u> A C A **D A** E B B C **B D** B E C C D C E **D D** E E A

In the first example with the naïve implementation we needed to use <img src="svgs/902404e05be26af387d248f5bdf3e8ff.svg?invert_in_darkmode" align=middle width=79.82671289999999pt height=21.839370299999988pt/>​​​​ fields (where <img src="svgs/332cc365a4987aacce0ead01b8bdcc0b.svg?invert_in_darkmode" align=middle width=9.39498779999999pt height=14.15524440000002pt/>​​ denotes the number of colours and <img src="svgs/deceeaf6940a8c7a5a02373728002b0f.svg?invert_in_darkmode" align=middle width=8.649225749999989pt height=14.15524440000002pt/> the length of the subsequence) while we with a De Bruijn sequence we only need <img src="svgs/a72a3261b035aa8e0c4928e0bec920c6.svg?invert_in_darkmode" align=middle width=55.65253979999999pt height=21.839370299999988pt/>​​​​ to fit all possible color sequences in the best case saving 50% space.
In the first example with the naïve implementation we needed to use <img src="svgs/902404e05be26af387d248f5bdf3e8ff.svg?invert_in_darkmode" align=middle width=79.82671289999999pt height=21.839370299999988pt/> fields (where <img src="svgs/332cc365a4987aacce0ead01b8bdcc0b.svg?invert_in_darkmode" align=middle width=9.39498779999999pt height=14.15524440000002pt/> denotes the number of colours and <img src="svgs/deceeaf6940a8c7a5a02373728002b0f.svg?invert_in_darkmode" align=middle width=8.649225749999989pt height=14.15524440000002pt/> the length of the subsequence) while we with a De Bruijn sequence we only need <img src="svgs/a72a3261b035aa8e0c4928e0bec920c6.svg?invert_in_darkmode" align=middle width=55.65253979999999pt height=21.839370299999988pt/> to fit all possible color sequences in the best case saving 50% space.

<center><img src="./readme/images/two-image-debruijn-sequence.png" style="zoom:100%;" /></center>

<center><i>Fig X. The De Bruijn sequence for the example smiley animation above. They eyebrows that used the black-yellow and yellow-black transitions can be found in the middle. Spatially those two sequences takes up only three unit squares while the naïve version uses four, a 25% saving.</i></center>

Now, we might not actually need all the color fields in the De Bruijn sequence. There might not be any need for a transition from A to A (e.g. in the smiley animation there are no transition from red to red) and in that case we can prune away those subsequences and end up with an even shorter sequence.

The only drawback with using a De Bruijn sequence is that it needs to be in one continues line which is not very space efficient. We'd like to have the ratio of the height and the width of the full color palette as close to <img src="svgs/f58ed17486d1735419372f2b7d091779.svg?invert_in_darkmode" align=middle width=21.00464354999999pt height=21.18721440000001pt/>​​ as possible since we get less conic distortions by having the mirrors set at shallow angles.
The only drawback with using a De Bruijn sequence is that it needs to be in one continues line which is not very space efficient. We'd like to have the ratio of the height and the width of the full color palette as close to <img src="svgs/f58ed17486d1735419372f2b7d091779.svg?invert_in_darkmode" align=middle width=21.00464354999999pt height=21.18721440000001pt/> as possible since we get less conic distortions by having the mirrors set at shallow angles.

##### Disc shaped palettes

Expand Down

0 comments on commit 067d6c4

Please sign in to comment.