Live data from Hacker News

Using beam tracing to calculate reflections in JavaScript

blog.kaistale.com

1–10 of 19 posts

Re: Using beam tracing to calculate reflections in JavaScript

#2
It really never ceases to amaze me the things you can do in JavaSCript. That's the kind of thing that up until a few years ago you'd be hesitant to do in Java. This is really cool stuff! I look forward to when we get full powered PC games done in JS. We're not there yet, I know - but it's little steps like this that'll get us there.

Re: Using beam tracing to calculate reflections in JavaScript

#4

It really never ceases to amaze me the things you can do in JavaSCript. That's the kind of thing that up until a few years ago you'd be hesitant to do in Java. This is really cool stuff! I look forward to when we get full powered PC games done in JS. We're not there yet, I know - but it's little steps like this that'll get us there.

I agree, the speeds you can achieve with JavaScript are astounding. They are far superior to Python, it's a shame JS doesn't have that well of a support for scientific calculations.

Re: Using beam tracing to calculate reflections in JavaScript

#6
post #4

It really never ceases to amaze me the things you can do in JavaSCript. That's the kind of thing that up until a few years ago you'd be hesitant to do in Java. This is really cool stuff! I look forward to when we get full powered PC games done in JS. We're not there yet, I know - but it's little steps like this that'll get us there.

I agree, the speeds you can achieve with JavaScript are astounding. They are far superior to Python, it's a shame JS doesn't have that well of a support for scientific calculations.

If anyone could list what support there is that'd be really interesting.

Re: Using beam tracing to calculate reflections in JavaScript

#7

How do you choose the angles at which you send the beams and the number of beams? It appears to be somewhat random, even though I'm sure it's not.

The algorithm calculates all possible specular reflections up to some order. I really don't think I can explain it any better than this paper: https://mediatech.aalto.fi/~samuli/publications/laine2009aa_...

Re: Using beam tracing to calculate reflections in JavaScript

#10

How do you choose the angles at which you send the beams and the number of beams? It appears to be somewhat random, even though I'm sure it's not.

It doesn't calculate all beams that originate from one point. It calculates only the beams which originate from one of the points and eventually reach the other point. It only looks random because the walls are placed at odd angles.
Post reply on HN