Crappy drawing time. Along with a little bit of FB code to show how reflections can be calculated. I think it can be done with trig but I much prefer this way. Maybe someone else who's done it with trig could post something too.

`option explicit`

option byval

'p1 and p2 are 2 points on the line to be reflected off

'vx,vy is the incoming vector to be reflected. The values in vx,vy are modified by this sub to contain the reflected vector.

sub vector_reflect(p1_x as single,p1_y as single,p2_x as single,p2_y as single,byref vx as single,byref vy as single)

'get the normal (line perpendicular to) of the line to be reflected off. Then normalise it.

dim as single nx=p2_y-p1_y,ny=p1_x-p2_x

dim as single d=1.0/sqr(nx*nx+ny*ny)

nx*=d

ny*=d

'the dot product gives the shortest distance from the end of the vector to the collision line (can be on the line beyond p1 or p2)

'multiply by 2.0 and will give the distance to the point on the opposite side of the line in the direction of the normal.

'The vector from that new point to the point of collision is the new reflected vector.

d=(vx*nx+vy*ny)*2.0

vx-=nx*d

vy-=ny*d

End sub

sub main()

screenres 640,480,32,2

screenset 1,0

randomize timer

dim as integer mouse_x,mouse_y

dim as single p1x=100+rnd*440,p1y=100+rnd*280

dim as single p2x=100+rnd*440,p2y=100+rnd*280

dim as single cx=(p1x+p2x)*.5,cy=(p1y+p2y)*.5,vx,vy

do

cls

'draw the wall

color &hffffff

line (p1x,p1y)-(p2x,p2y)

'draw the initial vector

color &hff

getmouse(mouse_x,mouse_y)

line(mouse_x,mouse_y)-(cx,cy)

'calculate and draw the reflected vector

color &hff0000

vx=cx-mouse_x

vy=cy-mouse_y

vector_reflect(p1x,p1y,p2x,p2y,vx,vy)

line(vx+cx,vy+cy)-(cx,cy)

flip

loop until inkey$<>""

end sub

main