First you would like to calculate the X and Y coordinates, as if the circle were a unit circle (radius 1). The X coordinate of the given angle is determined by the expression cos(angle) , and the Y coordinate is specified as sin(angle) . Most implementations of sin and cos take their inputs in radians, so conversion is necessary (1 degree = 0.0174532925 radians). Now, since your coordinate system is not really a unit circle, you need to multiply the resulting values by the radius of your circle. In this case, you multiply by 50, as your circle expands 50 units in each direction. Finally, using the coorindate system with a unit circle assumes your circle is centered at the origin (0,0). To account for this, add (or subtract) the center offset from the calculated X and Y coordinates. In your scenario, the offset from (0,0) is 50 in the positive X direction and 50 in the negative Y direction.
For example:
cos(45) = x ~= .707 sin(45) = y ~= .707 .707*50 = 35.35 35.35+50 = 85.35 abs(35.35-50) = 14.65
Thus, the coordinates of the final segment will be (85.35, 14.65).
Note that your chosen language probably has a built-in degree-radian function, I provided a unit conversion for reference.
edit: oops, used degrees first
Ben siver
source share