Quote: "Im trying to figure out some trigonometric way finding the angle between the center of the ball (ballx,bally) and the center of the brick (bricklocations(brick#,1),bricklocations(brick#,2)). "
Based on your question, this example may give you a visual of what I was trying to say. Use the arrow keys to move the ball around:
set display mode 800,600,32
sync on
sync rate 60
rem make ball
ink rgb(0,255,0),0
for r=0 to 19
circle 20,20,r
circle 20,19,r
next r
get image 1,0,0,40,40
sync
rem get the intial positions
brickx=400
bricky=200
ballx=400
bally=screen height()-41
do
rem clear the screen and draw a box
cls 255
ink rgb(255,0,0),0
box 300,100,500,200
ink rgb(255,255,255),0
rem move the ball with the arrow keys
inc ballx,((rightkey()-leftkey())*2)
inc bally,((downkey()-upkey())*2)
paste image 1,ballx,bally,1
rem draw a line from the ball to the center of the brick
line ballx+20,bally+20,brickx,bricky
rem figure out the angle between the centers
angle#=atanfull((bally+20)-bricky,brickx-(ballx+20))
text ballx+80,bally+10,"Angle between centers :"+str$(angle#)
sync
loop
Enjoy your day.