Live data from Hacker News

Using beam tracing to calculate reflections in JavaScript

blog.kaistale.com

11–19 of 19 posts

Re: Using beam tracing to calculate reflections in JavaScript

#11
post #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_...

Thanks, I'm going to read up on this.

Re: Using beam tracing to calculate reflections in JavaScript

#12

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.

Just a side note: Java used to be slow, but is actually a lot lot faster now. So while javascript is certainly impressively fast, Java is actually even faster still.

Re: Using beam tracing to calculate reflections in JavaScript

#14

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.

There's nothing particularly hard about this, or special about javascript though. This is the kind of stuff you could've implemented back in the day and ran on a Pentium MMX. It's about having an efficient algorithm.

Re: Using beam tracing to calculate reflections in JavaScript

#18

As someone who dabbles heavily in acoustics with javascript, THANK YOU! Let's talk.

Makes the three of us.. Nice work OP! P.S. Also a fan of threedB @robmiller.. :)

It's great to stumble upon like-minded people on HN :-)

Re: Using beam tracing to calculate reflections in JavaScript

#19

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.

Just a side note: Java used to be slow, but is actually a lot lot faster now. So while javascript is certainly impressively fast, Java is actually even faster still.

Although I believe this is true, I've used more fluid interfaces and played/have seen better performing demos/games in Javascript rather than Java.
Post reply on HN