I am looking for some help on what would be the best approach to create a path from one point in a grid to the other side.
Imagine a grid of 5 x 5, where at (0,1) there is a light source pointing into the grid. In the centre of grid there are angled mirrors, angled at 45 degrees. After randomly placing the mirrors, the light source will turn on and the beam of light grows, deflects off the mirrors and reaches a point somewhere else in the grid perimeter.
e.g. start: (col 0, row 1) Light, (col 3, row 1) mirror, (col 3 row 3) mirror, (col 4, row 3) end point.
In Objective C, what would be the best way to create this beam?
The deflection mirrors will have 4 reflection possibilities, UP or DOWN, LEFT or RIGHT depending on type of mirror and beam direction.