It starts with simple trigonometry. You need to calculate the x and y coordinate of the second point. With a start of 0.0 and processing a line that goes right to the right at 0 degrees and goes counterclockwise (against some of you counterclockwise), you do:
double angle = ...
This assumes a radius of 1. Multiply the desired radius each time. Choose a number that will be larger than the screen, for example, 480 for iPhone or 1024 for iPad (assuming you need dots, not pixels).
Then add the starting point to get the ending point.
Assuming you have a CGPoint start , double angle and length, your endpoint is:
double endX = cos(angle) * length + start.x; double endY = sin(angle) * length + start.y; CGPoint end = CGPointMake(endX, endY);
This is normal if the endpoint is off.
source share