Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: Motion 10v2 released; and atan2



John Pryce wrote:
I have a related query here. For any box B that straddles the branch
cut, peeking no matter how slightly into both the y<0 and y>=0
regions for some x<0, we get
    atan2([ylo,yhi],[xlo,xhi]) = [-Pi,Pi].
If what we REALLY want is "an interval extension of the point
function that is the Principal Value atan2 as above" then that is
fine. But for applications to do with "winding" (continuous change of
angle on a path that loops round the origin) one would like an atan2
that is about the incremental, continuous, change in angle across box
B -- and is not always limited to (-Pi,Pi].

Has anyone got a suitable definition? Arnold, it looks the sort of
thing for you. I also believe Bill Walster has published something on
this problem.

John,

I agree with your assessment. I once wrote a branch-and-bound (BNB) algorithm that worked in polar coordinates, and this was an issue. Essentially, the BNB needs to bifurcate along the branch-cut you mention.

Bill wrote a neat little paper about this problem (I attach a copy). I did actually implement his idea and it worked quite well.

In the context of Motion 8, we could alternatively return "isDiscontinuous." For example, this could be indication to the BNB algorithm that a bifurcation was necessary.

Nate

Attachment: Interval Angles.pdf
Description: Adobe PDF document