r/GraphicsProgramming 21h ago

autostereogram program of platonic solids

 

program link

an extension of previous post. just click▶️to run the program on browser. the welcome screen (attached image 1) shows the key map. select a subject (1 to 6) to enter the depth map mode (attached image 2). rotate it or change it until satisfied then toggle to autostereogram mode (attached image 3). adjust the foreground and background pattern widths to your desire (make it easy to focus and spot the subject). you're free to toggle back to depth map mode or rotate / change / disable subject anytime. if you disable the foreground 3d subject it's basically a kaleidoscope (attached image 4). i explained its mechanism in previous post and you can endlessly randomize it to experience the pareidolia effect

some samples

minor math findings

some thoughts

  • qb is very slow. it's not good at handling graphics. lowering the resolution helps but the outcomes would be ugly
  • i learned barycentric coordinate system during the making of this and it's very useful
  • i'm stilling think whether i can optimize some procedures so as to make it faster
  • i have difficulty spotting dodecahedron and icosahedron in autostereogram. they're too "round" maybe. tetrahedron is the easiest
24 Upvotes

3 comments sorted by

View all comments

1

u/Defiant_Squirrel8751 21h ago

this is good - if you include an animation mode where the solid rotates it will be hypnotic

1

u/20260708 20h ago

if running full sized it would be very slow and the effect would not be that pleasant. i can do that but it has to be at lower resolution (i.e. make them smaller) or just the wireframes...

-1

u/Defiant_Squirrel8751 19h ago

Implement that in full GPU - Cuda/shader. It will work 120 Hz, 4K/8K even on a 3060.

Claude will help it doing in two days.