Just wondering if there was a good (already implemented / documented) algorithm for doing the following boo! http://img697.imageshack.us/img697/7444/sdfhbsf.jpgFor 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.
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.
, , . A B. A B.
A
B
A A1. A1 B, ? , , A B, . , , . . , , .. .
A1
, , A , B, , B .
, . , , .
, . , , , . , polygonal billiards unfolding illumination, , , , .
polygonal billiards unfolding illumination
. , , , ( ), :
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
, , ( ). , , , .
In response to the brainjam,you still need wedges ....alt text http://img72.imageshack.us/img72/6959/ssdgk.jpgIn this situation, how would you know not to make a second reflection? How do you know which walls make sense?
Source: https://habr.com/ru/post/1741866/More articles:MFC SDI application without a standard “new document” at startup - visual-c ++Creating lines around a guideline using Miterjoin - c #C socket programming: does recv () call change the socket file descriptor? - cREST / JSON: Should I include a new line after a JSON line? - jsonHow to hide an outline on a form - htmlКлассические упражнения для компьютерного зрения/обработки изображений? - image-processingSystem.InvalidOperationException: нельзя присоединить сущность, которая уже существует - c#Moving a transaction with a MySQL connector in VB.net - mysqljQuery event.stopPropagation not working on - jqueryThe general rule is when to use the model (Codeigniter) - phpAll Articles