the distance between two points via a reflection from a plane

Started by
3 comments, last by daftasbrush 15 years, 10 months ago
hi all i am currently working on a prgram which models reverberation in a room and sets the signal processing on soundcard according to the room model. however the probelm that i have is i need to be able to calculate the time difference between the direct sound and the reflected sound. i know how to calculate this if the source and reciever are fixed as the triginmoetry can be hand written, however i would like to be able to move the source and receiver so i need to be able to calculate the shortest distance between the source and reciever via a reflection of one of the walls hope someone can help stefan
Advertisement
You are trying to compute the distance between A and B when bouncing on a plance P. Transform either A or B to its symmetric point with respect to P (for instance, if P is z=0, convert (x,y,z) to (x,y,-z)). Then compute the distance normally.

Having a coffee break, so opened up ms paint to help solve your problem.

Free Image Hosting at www.ImageShack.us
Click for bigger

I think this what you are trying to do. You need to find the closest points on plane P for A and B (we shall call C & D respectively.) Next create vectors AD & BC and where these two lines cross you find the closest point again to the plane to find the point of reflection(lets call it E.) To find the incident angle you just use simple trigonometry using any combination of the distances of AC/CE/AE, and for reflection use BD/DE/BE.


Edit: added all lables to image.
cheers guys i should be able to do this now
It Seems to me, there's an easier way.

[Edit : Just noticed this is the same as Alvaro's method]

First Reflect either point in the plane... (Let's say A from Moomins Diagram)

There are plenty of ways to do that..
You can build a reflection matrix for the plane... handy if you are planning to do a "load" of points
or from your plane equation (ax + by + cz + d = 0.. or p.n + d = 0)
A' = A - 2*(A.n+d)n
or...

Anyway you then simply calculate the distance from the reflected point to the position of other point.
Lengthof(A'B) ... and that's your answer.

HTH

[Edited by - daftasbrush on June 10, 2008 12:43:19 PM]

This topic is closed to new replies.

Advertisement