From: Hubert Holin (Hubert.Holin_at_[hidden])
Date: 2004-11-29 10:05:32
Somewhere in the E.U., le 29/11/2004
In article <41A9F3EC.6010305_at_[hidden]>,
Roland Schwarz <roland.schwarz_at_[hidden]> wrote:
> Hubert Holin wrote:
> > It is interesting if, for instance, you have to track an object
> >along an orbit for a very long time. Using the canonical ("cartesian")
> >representation usually entails transcendental functions (say sine and
> >cosine), for which it is very hard to guaranty the accuracy (of a given,
> >one-size-fits-all, implementation) for big values of the argument. If
> >you integrate numerically, you all the more want to stay in the polar
> >domain (unless we cross the singularity, but we are not modeling
> >missiles, are we ;-) ? ).
> Excuse me, but this does not convince me.
> First I cannot see easily how complex numbers enter into the picture
> (but this might be due to
> my lack of knowledge in that domain), and then you need to use sine and
> cosine only ever
> if you are using polar _and_ cartesian coordinates at the _same_ time.
> Even if so, you could formulate your algorithm in the cartesian domain
> and need sine and cosine
> only at the last stage to transform the whole trace back to polar
> representation (if ever needed).
> But I admit these arguments are all very vaguely and don't make sense as
> long as not refering
> to a concrete algorithm.
Let's look at the following problem: you have an abject in a plane
(i.e., this is a two-dimensional problem), for which you know the
equation of motion. As we are in a plane, and we have chosen an origin
and axes, we can represent a point either by its coordinate vector or by
a complex number. That's how complex numbers enter the scene.
Say in our frame the equation of motion is (warning: ASCII "art"):
[x]' [ 0 -1] [x]
[y] = [+1 0] [y]
Using complex numbers, in this case the equation is z' = iz.
You can clearly find the analytic solution to this one, but were
you to try and integrate numerically, you would (depending on QOI, of
course, but I have yet to see an I with sufficient Q for this...)
rapidly see that the cartesian version rather rapidly spouts nonsense
(you can even predict how fast using the usual techniques), while the
polar version would be far more accurate.
This example, of course, is but a toy (though one which has
real-world uses, I even published an article about some ;-) ). But is
really is a model for genuine real-world problems.
[Digression: we *really* need a living, standard or semi-standard free
library dealing with optimization, integration, etc., in addition to
(and in some cases to help with) special functions.]
> I am somewhat knowledgeable in the domain of signal processing, and as
> far as I can tell one will
> not really benefit much from a polar representation in this field at all.
> Having said this I do not think it is of no use to think about having
> such a type. I'd rather suggest
> pointing out first some concrete examples or algorithms that really
> benefit from it.
See the OP's other examples.
> BTW.: Wouldn't tracking of an object in an orbit rather require
> rotations (i.e. quaternions) instead of
> complex numbers?
In three dimensions quaternions are useful to represent rotations
(the unit sphere of the quaternions "unwraps" the rotations of R^3 in
roughly the same way the unit circle of the complexes "unwraps" the
rotations of R^2). Quite often an object in orbit in three dimensions
around some other body is (as a first approximation, when perturbations
are not too great) bound to a plane.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk