Room2D 


a simple rectangular 2D room for calculating 

reflections of sound sources. 


*new(rect); 

returns a new instance of room, dimensions given by rect.


r = Room2D.new

r.room = [0, 0, 8, 5]


refs8(px, py)

returns first 8 reflections of a point source; coords are px, py, 

output format is [ x1, y1, x2, y2, ... x8, y8] for easier use as UGen.



a = Point(2, 3); // point to be mirrored

r.refs8(a.x, a.y).clump(2).printAll;


refs8polar(px, py, lx, ly)

returns first 8 reflections of a point source as polar coordinates in relation to a listener

output format is [phi1, dist1, phi2, dist2....]


r.refs8polar(a.x, a.y, 0, 0).printAll;