recently i studied autostereograms and tried to make them on my own out of curiosity. the outcome was not practically useful at all as there're millions of free resources online that could make autostereograms of high quality. it's the journey that mattered. i learned a lot from it and i'd like to share
at first i was overwhelmed by the amount of variables i had to deal with. the eye separation, the view distance, the background distance, the width of the base pattern, the closest point relative to the farthest point, etc. i got lost. after some struggles i realized it's all about ratio / similar triangles
then everything became simple. we don't have to actually set how far the observer was from the screen, etc. as shown in attached image 1, we let the entire thing to be 1 unit wide and 1 unit high and deal everything inside as ratio
as a math guy i particularly love those variables that lie between 0 and 1. we imagine the observer and the background (the plane containing the farthest point) never move. the screen moves. when the screen touches the background p=0. it's the possible minimum of p. when the screen touches the observer p=1. it's the possible maximum of p. the smaller the value of p, the weaker the 3d effect is
we do the same to the closest point. closest point can be interpreted as the highest point of the 3d scene. we imagine the screen and the background never move. the closest point moves. when the closest point touches the background q=0. it's the possible minimum of q. when the closest point touches the screen q=1. it's the possible maximum of q. the smaller the value of q, the weaker the 3d effect is
let's call p the background factor and q the foreground factor and here's my program. you can run it on browsers. click ▶️ to run. click ⏹️ to exit. when running the program
- press [q] to decrease foreground factor
- press [w] to toggle foreground subject (a disc / a sphere)
- press [e] to increase foreground factor
- press [a] to decrease background factor
- press [s] to change background (4 included)
- press [d] to increase background factor
- press [x] to toggle caption (off / on)
all backgrounds are function generated. if you have any interesting ideas of making background just let me know...:)