hi
i created a application that it create this number :

x1 193 199 155
angle -318 -376 -327

result 9 10 4

y1 290 240 245
angle -318 -376 -327

result 19 30 2

i need to Formula for create it

namely the Formula have 2 param x1 and angle

for example if x1 equal 193 and angle equal -318, my result be 9
or if x1 equal 199 and angle equal -376, my result be 10
and up Like the above example

I am looking for a relationship for its implementation

it's urgent

please help me

thanks