Beam direction algorithm

Suppose we are given with a system of mirrors. We also have a beam emitter and a beam receiver. Then we must find the direction in which the emitter should emit so that the beam reaches the receiver along the shortest path. How can this be effectively implemented?

the emitter and the receive in the system of mirrors

An image is just a sketch, for example.

+4
source share
1 answer

A simplified algorithm for a rectangular grid will work by calculating the virtual position of the receiver in the next grid - just as if you were playing a pool and wanted to make a stunning shot at the bank.

     +---------+----------+---------+----------+
     | O                  |                    |
     |===>                |                <===|
     |     Real           |    Virtual copy    |
     |                    |                    |
     A---------+----------+---------+----------a

O A, "a". () , . - / a (n), .

+4

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


All Articles