Dave VanHorn wrote: > This is hard for me. Apparently not for you. I apologize for my > stupidity. I just get rather frustrated when I'm offering what I have every confidence is the simple answer, and appear to be ignored. > I follow, I think, I will try to code this. The concept of octants and normalization to the first octant rather than the use of one all-encompassing function was also described by another poster. That uses simple logic functions instead of maths, and has side-benefits, such as max(mod(X),mod(Y)) being an adequate approximation of the Radius as a quality indicator. > I get confused when another book uses csc (I assume cosecant) in the > same position, same formula. Using the *mathematical* convention that 0¡ is the positive X-axis, Angle=csc(Y/R) =atn(Y/X) Swap X and Y if you regard the positive Y-axis as 0¡. In the first octant (i.e., angle less than 45¡), R is not too different to X, identical for small values. Insofar as it *is* different, I realise that the cosecant function is actually more linear than the arctangent (for this octant - above 45¡ both are hideous). Since however, this requires intermediate determination of the radius and *that* requires quite a lot of calculation including a square root, I am sure it is far easier to use the expression for arctangent requiring only one operation (division) on the X and Y values beforehand. > teachers that should have been security guards at a donut factory..) Hey, fair go, donut factories need good guards too! -- Cheers, Paul B.