Ways of reflection between points in 2D

Just wondering if there was a good (already implemented / documented) algorithm for doing the following boo! http://img697.imageshack.us/img697/7444/sdfhbsf.jpg
For any shape (without intersecting borders) and two points inside this figure, calculate all the paths between the two points so that all reflections are perfect reflections. The path length must be limited to a certain length, otherwise there are endless solutions. I'm not interested in just shooting beams to try to guess how close I can get, I'm interested in algorithms that can do it perfectly. Search based, not guessing / improving.

+3
source share
4 answers

Think not about the rays, but about the fans. A fan would be all the rays coming from one point and hitting the wall. Then you can check if the fan contains a second point, and if so, you can determine which ray hits it. When a fan hits a wall, you can calculate the reflected fan by transferring its origin to the outside of the wall - by doing this, all the fans are basically triangular in shape. There are some complications when the fan partially hits the wall and needs to be broken into pieces to continue. In any case, this tree of reflected fans can be traversed first by width or depth, since you limit the total distance.

, , , , , 3d.

+1

, , . A B. A B.

A A1. A1 B, ? , , A B, . , , . . , , .. .

, , A , B, , B .

, . , , .

, . , , , . , polygonal billiards unfolding illumination, , , , .

+3

. , , , ( ), :

  • A, B, C P1, P2, , ( , ).

  • , , .

, . , .

angle_1 = normal of line A with P1
angle_2 = normal of line B with intersection of line A
angle_3 = normal of line C with ...
angle_n = normal of line N-1 with P2

, , ( ). , , , .

0

In response to the brainjam,
you still need wedges ....
alt text http://img72.imageshack.us/img72/6959/ssdgk.jpg
In this situation, how would you know not to make a second reflection? How do you know which walls make sense?

0
source

Source: https://habr.com/ru/post/1741866/


All Articles