Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Zen Photon Garden (zenphoton.com)
114 points by GeorgeHahn on Feb 4, 2016 | hide | past | favorite | 18 comments


Pretty cool!

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

Use `location.replace` to avoid this.


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

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

[3] https://github.com/scanlime/zenphoton/blob/bea23c1/hqz/src/z...


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.


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


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


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.


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.


As others said you can use a parabolic reflector to direct the light in one direction.

I think this can work:

On one side place a parabolic reflector to direct the light in one direction.

On the other side place a circular reflector to direct the light back to the source. And place a tiny hole in this half circle to let the light out.

Quick drawing: http://zenphoton.com/#AAQAAkACAAEgWwAzALEBEwC0AO4A/wAAtADxAL...


It should be possible, what you want to do is try and draw a parabola with fully reflective surfaces where the focal point is the light source.

https://en.wikipedia.org/wiki/Parabolic_reflector


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


Very cool indeed. Surprisingly expressive.

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


The sliders are meant to only affect newly placed lines.


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.


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".


A stupid question, how this is related to zen?


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


Probably a reference to the older CSS Zen Garden: https://en.wikipedia.org/wiki/CSS_Zen_Garden


it is not.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: