
Zen Photon Garden - GeorgeHahn
http://zenphoton.com/
======
gberger
Pretty cool!

I like the shareable URLs, but I don't like how it breaks the back button.

Use `location.replace` to avoid this.

------
lifthrasiir
Pretty.

I had obviously expected that, but the large number of reflective surfaces [1]
greatly reduces the performance. The author explained in the blog post [2]
that it is a path tracing (Monte Carlo simulation of multiple random rays
incrementally averaged) and probably it is hard to limit the number of bounces
small while maintaining the image quality. Indeed, the source code [3] says a
hard limit of 1000 bounces, not big but not that small either.

[1] Something like [http://is.gd/cFDlq5](http://is.gd/cFDlq5)

[2] [http://scanlime.org/2013/04/zen-photon-
garden/](http://scanlime.org/2013/04/zen-photon-garden/)

[3]
[https://github.com/scanlime/zenphoton/blob/bea23c1/hqz/src/z...](https://github.com/scanlime/zenphoton/blob/bea23c1/hqz/src/zrender.cpp#L329)

~~~
tbabb
Wow, 1000 bounces is huge. 8 bounces is a reasonable setting for a high-
performance 3D path tracer. I guess it's that much easier in 2D.

~~~
Ono-Sendai
Our default max ray depth for Indigo Renderer is 10000. You just have to be a
bit clever about handling it. (use Russian Roulette)

------
dylanz
I just played with this for too long, and I made some images I'd want to hang
on my wall.

------
smlacy
Every time I see this link, which is about every year or so, I spend an
inordinate amount of time trying to build a "laser". It really feels possible,
using a combination of diffuse/reflective to "corral" all the light into going
mostly in the same direction. Would love to see if anyone has gotten close.

~~~
gjm11
A parabolic reflector -- all (specular) reflective, no "diffuse" or
"transmissive" \-- will get all the light from a point source going in the
same direction. If you really want _all_ the light doing that, you need an
infinitely wide parabolic reflector so you'll get an infinitely wide beam. But
if you're happy for, say, 99% of the light to end up in the beam, you can make
a finite portion of a parabola that does that. Shrink it in towards the source
and (aside from discretization issues) you will get as narrow a beam as you
like with 99% of the light in it.

A real physical light source can never have zero size as the source here
(aside from discretization issues) does. As a result, you can't get an
arbitrarily narrow beam from it. There's a quantity called "etendue" that
measures a sort of combination of spatial and angular spread-out-ness, and no
combination of optical elements can decrease it except by absorbing some of
the light.

------
tobr
I would love to see a version where you could draw Bézier curves!

------
thenomad
Very cool indeed. Surprisingly expressive.

My one issue - the diffuse/reflective/transmissive sliders don't seem to cause
the image to update?

~~~
6581
The sliders are meant to only affect newly placed lines.

------
eru
We had a good discussion going on when this was submitted before.

Zen Photon Garden is always a nice thing to play around with.

I even wrote a patch that made the rays deterministic when you draw extra
walls. It reduced the flickering, but I learned that this was part of the
aesthetics, so it was less fun to play with.

------
personjerry
I thought it was a pretty good quality simulation, because after drawing some
surfaces, dragging the Exposure tab from bottom to top made me flinch at the
seeming "brightness".

------
progrocks9
A stupid question, how this is related to zen?

~~~
justinpombrio
I suspect the author means to liken it to zen sand gardens[1]. Though people
also just like the name zen.

[1]
[https://en.wikipedia.org/wiki/Japanese_rock_garden](https://en.wikipedia.org/wiki/Japanese_rock_garden)

