I am new here, and found this as good resource to discuss programming stuff. I have some task to be finished in C or FORTRAN. Briefly, here is the task.
I want to find the all the points lying between two points AB(which are rotating with a constant velocity) on a circle(Please See the Fig.). Until now, i was successful in rotating the two points around a circle but still not able to find a logic to locate only the points which are in between the two points AB.
degree = TIME(2) * velocity ! Get New Angle (Rotating with constant velocity)
RadStrtHtZone = degree * deg2rad ! Convert into DEGREES (POINT A)
RadEndHtZone = (Degree+20)*Deg2Rad ! Convert into DEG. (POINT B) 20° Away from A
NewxS = originx + (cos(StrtPt)*Radius) ! New Position in X-Coordinate of Point A
NewyS = originy + (sin(StrtPt)*Radius) ! New Position in Y-Coordinate of Point A
NewEndxS = originx + (cos(EndPt)*Radius) ! New Position in X-Coord. of Point B
NewEndyS = originy + (sin(EndPt)*Radius) ! New Position in X-Coord. of Point B
I am looking for a LOGIC to find all points lying in between these points. That is, i have a loop on all the points lying on the circle, and i have to choose only the points which lie in between the points A and B.
Any help will be a big step forward for me, and looking forward to hear from you. Thank you in advance....


Sign In
Create Account


Back to top









