# the distance between two points via a reflection from a plane

This topic is 3838 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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

##### Share on other sites
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.

##### Share on other sites
Having a coffee break, so opened up ms paint to help solve your problem.

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.

##### Share on other sites
cheers guys i should be able to do this now

##### Share on other sites
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.

HTH

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

1. 1
2. 2
3. 3
Rutin
13
4. 4
5. 5

• 26
• 11
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633697
• Total Posts
3013404
×