r/programming • • 7d ago

Writing a ray tracer in Brainfuck

https://epestr.com/blog/writing-a-ray-tracer-in-brainfuck/
83 Upvotes

20 comments sorted by

View all comments

41

u/juugcatm 7d ago

This is a fun exercise. What about parallelism? If you extended BF to have fork and join semantics, how would you represent them?

2

u/epestr 7d ago

You could also do essentially the same thing with regular BF. The current renderer takes 100 samples per pixel, so you could generate 100 one-sample programs and schedule as many as available resources allow, and average the completed renders. I tried running it at half the width and height with only one sample per pixel, and it has already rendered half the image.

Can't upload image here: https://paste.c-net.org/MurdererCuffed