# Projecting a point

Hello,
Something I’ve really wanted to do for a while is be able to project a point in a direction. Basically, you say `projectPoint(x,y,angle, distance)`. I understand that means knowing how to use sin and cosin and know triginometry, so I can’t figure out the formula (because I’m only in middle school). If someone could help me, that would be great.
Thanks!

How do x,y and angle relate?

Are you wanting to start at x,y and go in the direction of the angle? If so then, how far?

Are you looking to draw a dot there or a line?

Sorry. I forgot to add the parameter `distance`. So I was thinking of using triangles. So we know the hypotenuse and all the angles (if we subtract the angle and 90 from 180). I may just be clueless.

I presume that you are in 2D, that you are starting at `(x,y)` and moving in the direction specified by `angle` for a distance of `distance`. If this is correct, the formula is:

``````X = x + distance * math.cos(angle)
Y = y + distance * math.sin(angle)
``````