Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #56566 > unrolled thread

Complex literals (was Re: I am never going to complain about Python again)

Started byChris Angelico <rosuav@gmail.com>
First post2013-10-11 00:25 +1100
Last post2013-10-16 13:22 -0400
Articles 20 — 14 participants

Back to article view | Back to comp.lang.python


Contents

  Complex literals (was Re: I am never going to complain about Python again) Chris Angelico <rosuav@gmail.com> - 2013-10-11 00:25 +1100
    Re: Complex literals (was Re: I am never going to complain about Python again) Grant Edwards <invalid@invalid.invalid> - 2013-10-10 14:12 +0000
      Re: Complex literals (was Re: I am never going to complain about Python again) Chris Angelico <rosuav@gmail.com> - 2013-10-11 01:20 +1100
        Re: Complex literals (was Re: I am never going to complain about Python again) Grant Edwards <invalid@invalid.invalid> - 2013-10-10 16:54 +0000
          Re: Complex literals (was Re: I am never going to complain about Python again) Christian Gollwitzer <auriocus@gmx.de> - 2013-10-10 21:08 +0200
      Re: Complex literals (was Re: I am never going to complain about Python again) William Ray Wing <wrw@mac.com> - 2013-10-10 11:36 -0400
      Re: Complex literals (was Re: I am never going to complain about Python again) Ethan Furman <ethan@stoneleaf.us> - 2013-10-10 10:39 -0700
      Re: Complex literals (was Re: I am never going to complain about Python again) Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-10-10 20:13 -0400
      Re: Complex literals (was Re: I am never going to complain about Python again) Chris Angelico <rosuav@gmail.com> - 2013-10-11 17:01 +1100
      Re: Complex literals (was Re: I am never going to complain about Python again) Nobody <nobody@nowhere.com> - 2013-10-11 12:21 +0100
    Re: Complex literals (was Re: I am never going to complain about Python again) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-11 01:27 +0000
      Re: Complex literals (was Re: I am never going to complain about Python again) David <bouncingcats@gmail.com> - 2013-10-11 20:35 +1100
      Re: Complex literals (was Re: I am never going to complain about Python again) Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-10-11 12:30 +0100
        Re: Complex literals (was Re: I am never going to complain about Python again) Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2013-10-11 15:11 +0300
        Re: Complex literals (was Re: I am never going to complain about Python again) Roy Smith <roy@panix.com> - 2013-10-11 10:05 -0400
          Re: Complex literals (was Re: I am never going to complain about Python again) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-11 17:03 +0000
          Re: Complex literals (was Re: I am never going to complain about Python again) Gene Heskett <gheskett@wdtv.com> - 2013-10-11 13:00 -0400
      Re: Complex literals (was Re: I am never going to complain about Python again) John Nagle <nagle@animats.com> - 2013-10-15 22:27 -0700
        Re: Complex literals (was Re: I am never going to complain about Python again) Roy Smith <roy@panix.com> - 2013-10-16 08:21 -0400
        Re: Complex literals (was Re: I am never going to complain about Python again) Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-10-16 13:22 -0400

#56566 — Complex literals (was Re: I am never going to complain about Python again)

FromChris Angelico <rosuav@gmail.com>
Date2013-10-11 00:25 +1100
SubjectComplex literals (was Re: I am never going to complain about Python again)
Message-ID<mailman.937.1381411535.18130.python-list@python.org>
On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith <roy@panix.com> wrote:
> BTW, one of the earliest things that turned me on to Python was when I
> discovered that it uses j as the imaginary unit, not i.  All
> right-thinking people will agree with me on this.

I've never been well-up on complex numbers; can you elaborate on this,
please? All I know is that I was taught that the square root of -1 is
called i, and that hypercomplex numbers include i, j, k, and maybe
even other terms, and I never understood where j comes from. Why is
Python better for using j?

ChrisA

[toc] | [next] | [standalone]


#56575

FromGrant Edwards <invalid@invalid.invalid>
Date2013-10-10 14:12 +0000
Message-ID<l36ckk$f2n$1@reader1.panix.com>
In reply to#56566
On 2013-10-10, Chris Angelico <rosuav@gmail.com> wrote:
> On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith <roy@panix.com> wrote:
>> BTW, one of the earliest things that turned me on to Python was when I
>> discovered that it uses j as the imaginary unit, not i.  All
>> right-thinking people will agree with me on this.
>
> I've never been well-up on complex numbers; can you elaborate on this,
> please? All I know is that I was taught that the square root of -1 is
> called i,

Nope.  "i" is electical current (though it's more customary to use
upper case).  "j" is the square root of -1.

> and that hypercomplex numbers include i, j, k, and maybe even other
> terms, and I never understood where j comes from. Why is Python
> better for using j?

Because that's the way we do it in electrical engineering. 

;)

-- 
Grant Edwards               grant.b.edwards        Yow! Are we THERE yet?
                                  at               My MIND is a SUBMARINE!!
                              gmail.com            

[toc] | [prev] | [next] | [standalone]


#56577

FromChris Angelico <rosuav@gmail.com>
Date2013-10-11 01:20 +1100
Message-ID<mailman.945.1381414810.18130.python-list@python.org>
In reply to#56575
On Fri, Oct 11, 2013 at 1:12 AM, Grant Edwards <invalid@invalid.invalid> wrote:
> Nope.  "i" is electical current (though it's more customary to use
> upper case).  "j" is the square root of -1.
>
>> and that hypercomplex numbers include i, j, k, and maybe even other
>> terms, and I never understood where j comes from. Why is Python
>> better for using j?
>
> Because that's the way we do it in electrical engineering.
>

Okay, so hold on a minute... a hypercomplex number is the sum of a
real number, some electrical current, an imaginary number, and k?

This belongs in the Izzet League, I think.

ChrisA

[toc] | [prev] | [next] | [standalone]


#56592

FromGrant Edwards <invalid@invalid.invalid>
Date2013-10-10 16:54 +0000
Message-ID<l36m44$qe$1@reader1.panix.com>
In reply to#56577
On 2013-10-10, Chris Angelico <rosuav@gmail.com> wrote:
> On Fri, Oct 11, 2013 at 1:12 AM, Grant Edwards <invalid@invalid.invalid> wrote:
>> Nope.  "i" is electical current (though it's more customary to use
>> upper case).  "j" is the square root of -1.
>>
>>> and that hypercomplex numbers include i, j, k, and maybe even other
>>> terms, and I never understood where j comes from. Why is Python
>>> better for using j?
>>
>> Because that's the way we do it in electrical engineering.
>
> Okay, so hold on a minute... a hypercomplex number is the sum of a
> real number, some electrical current, an imaginary number, and k?

I don't know that EE's ever encounter hypercomplex numbers (I
certainly never have), nor does Python support them, so in _practice_
there isn't really a conflict.

-- 
Grant Edwards               grant.b.edwards        Yow! I want EARS!  I want
                                  at               two ROUND BLACK EARS
                              gmail.com            to make me feel warm
                                                   'n secure!!

[toc] | [prev] | [next] | [standalone]


#56602

FromChristian Gollwitzer <auriocus@gmx.de>
Date2013-10-10 21:08 +0200
Message-ID<l36tv8$ngl$2@dont-email.me>
In reply to#56592
Am 10.10.13 18:54, schrieb Grant Edwards:
> On 2013-10-10, Chris Angelico <rosuav@gmail.com> wrote:
>> On Fri, Oct 11, 2013 at 1:12 AM, Grant Edwards <invalid@invalid.invalid> wrote:
>>> Nope.  "i" is electical current (though it's more customary to use
>>> upper case).  "j" is the square root of -1.
>>>
>>>> and that hypercomplex numbers include i, j, k, and maybe even other
>>>> terms, and I never understood where j comes from. Why is Python
>>>> better for using j?
>>>
>>> Because that's the way we do it in electrical engineering.
>>
>> Okay, so hold on a minute... a hypercomplex number is the sum of a
>> real number, some electrical current, an imaginary number, and k?
>
> I don't know that EE's ever encounter hypercomplex numbers (I
> certainly never have)

But they are very useful to represent 3D-rotation around an inclined 
axis (look up quaternion rotation). I don't know whether EEs work in 
aircraft navigation, but I suspect they do ;)

	Christian

[toc] | [prev] | [next] | [standalone]


#56589

FromWilliam Ray Wing <wrw@mac.com>
Date2013-10-10 11:36 -0400
Message-ID<mailman.952.1381423006.18130.python-list@python.org>
In reply to#56575
On Oct 10, 2013, at 10:12 AM, Grant Edwards <invalid@invalid.invalid> wrote:

> On 2013-10-10, Chris Angelico <rosuav@gmail.com> wrote:
>> On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith <roy@panix.com> wrote:
>>> BTW, one of the earliest things that turned me on to Python was when I
>>> discovered that it uses j as the imaginary unit, not i.  All
>>> right-thinking people will agree with me on this.
>> 
>> I've never been well-up on complex numbers; can you elaborate on this,
>> please? All I know is that I was taught that the square root of -1 is
>> called i,
> 
> Nope.  "i" is electical current (though it's more customary to use
> upper case).  "j" is the square root of -1.
> 

It all depends on where (in what field) you learned about complex numbers.  Mathematicians and Physicists use i, engineers use j.

-Bill 

[toc] | [prev] | [next] | [standalone]


#56594

FromEthan Furman <ethan@stoneleaf.us>
Date2013-10-10 10:39 -0700
Message-ID<mailman.953.1381429602.18130.python-list@python.org>
In reply to#56575
On 10/10/2013 07:20 AM, Chris Angelico wrote:
> On Fri, Oct 11, 2013 at 1:12 AM, Grant Edwards wrote:
>>
>> Nope.  "i" is electical current (though it's more customary to use
>> upper case).  "j" is the square root of -1.
>>
>>> and that hypercomplex numbers include i, j, k, and maybe even other
>>> terms, and I never understood where j comes from. Why is Python
>>> better for using j?
>>
>> Because that's the way we do it in electrical engineering.
>
> Okay, so hold on a minute... a hypercomplex number is the sum of a
> real number, some electrical current, an imaginary number, and k?

That would certainly explain why it's hyper.  ;)

--
~Ethan~

[toc] | [prev] | [next] | [standalone]


#56624

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2013-10-10 20:13 -0400
Message-ID<mailman.971.1381450506.18130.python-list@python.org>
In reply to#56575
On Fri, 11 Oct 2013 01:20:01 +1100, Chris Angelico <rosuav@gmail.com>
declaimed the following:

>
>This belongs in the Izzet League, I think.
>
	Was that an MtG reference?
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

[toc] | [prev] | [next] | [standalone]


#56647

FromChris Angelico <rosuav@gmail.com>
Date2013-10-11 17:01 +1100
Message-ID<mailman.984.1381471286.18130.python-list@python.org>
In reply to#56575
On Fri, Oct 11, 2013 at 11:13 AM, Dennis Lee Bieber
<wlfraed@ix.netcom.com> wrote:
> On Fri, 11 Oct 2013 01:20:01 +1100, Chris Angelico <rosuav@gmail.com>
> declaimed the following:
>
>>
>>This belongs in the Izzet League, I think.
>>
>         Was that an MtG reference?

It most assuredly was. The Ravnican guild known as the Izzet League
(epitomizing the color combination Red-Blue, mixing passion and chaos
with artifice and control) works a lot with electricity, madness,
science, and mad electrical science... it seemed a fair similarity.

ChrisA

[toc] | [prev] | [next] | [standalone]


#56674

FromNobody <nobody@nowhere.com>
Date2013-10-11 12:21 +0100
Message-ID<pan.2013.10.11.11.21.14.647000@nowhere.com>
In reply to#56575
On Thu, 10 Oct 2013 14:12:36 +0000, Grant Edwards wrote:

> Nope.  "i" is electical current (though it's more customary to use upper
> case).

"I" is steady-state current (either AC or DC), "i" is small-signal
current.

[toc] | [prev] | [next] | [standalone]


#56628

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2013-10-11 01:27 +0000
Message-ID<525753ee$0$29984$c3e8da3$5496439d@news.astraweb.com>
In reply to#56566
On Fri, 11 Oct 2013 00:25:27 +1100, Chris Angelico wrote:

> On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith <roy@panix.com> wrote:
>> BTW, one of the earliest things that turned me on to Python was when I
>> discovered that it uses j as the imaginary unit, not i.  All
>> right-thinking people will agree with me on this.
> 
> I've never been well-up on complex numbers; can you elaborate on this,
> please? All I know is that I was taught that the square root of -1 is
> called i, and that hypercomplex numbers include i, j, k, and maybe even
> other terms, and I never understood where j comes from. Why is Python
> better for using j?

Being simple souls and not Real Mathematicians, electrical engineers get 
confused by the similarity between I (current) and i (square root of -1), 
so they used j instead. Real Mathematicians are hardy folk completely at 
home with such ambiguity -- if you can deal with superscript -1 meaning 
both "inverse function" and "reciprocal" *in the same equation*, i vs I 
hold no fears for you.

<wink>

But seriously... I think the convention to use j for complex numbers 
comes from the convention of using i, j, k as unit vectors, i being in 
the X direction (corresponding to the real axis), j being in the Y 
direction (corresponding to the imaginary axis), and k being in the Z 
direction.

For what it's worth, there is no three-dimensional extension to complex 
numbers, but there is a four-dimensional one, the quaternions or 
hypercomplex numbers. They look like 1 + 2i + 3j + 4k, where i, j and k 
are all distinct but i**2 == j**2 == k**2 == -1. Quaternions had a brief 
period of popularity during the late 19th century but fell out of 
popularity in the 20th. In recent years, they're making something of a 
comeback, as using quaternions for calculating rotations is more 
numerically stable than traditional matrix calculations.

Unlike reals and complex numbers, quaternions are non-commutative: in 
general, q1*q2 != q2*q1.

There are also octonions, eight-dimensional numbers which are non-
commutative and non-associative, (o1*o2)*o3 != o1*(o2*o3), and sedenions, 
a 16-dimensional number.



-- 
Steven

[toc] | [prev] | [next] | [standalone]


#56671

FromDavid <bouncingcats@gmail.com>
Date2013-10-11 20:35 +1100
Message-ID<mailman.999.1381484151.18130.python-list@python.org>
In reply to#56628
On 11 October 2013 12:27, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> wrote:
> On Fri, 11 Oct 2013 00:25:27 +1100, Chris Angelico wrote:
>
>> On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith <roy@panix.com> wrote:
>>> BTW, one of the earliest things that turned me on to Python was when I
>>> discovered that it uses j as the imaginary unit, not i.  All
>>> right-thinking people will agree with me on this.
>>
>> I've never been well-up on complex numbers; can you elaborate on this,
>> please? All I know is that I was taught that the square root of -1 is
>> called i, and that hypercomplex numbers include i, j, k, and maybe even
>> other terms, and I never understood where j comes from. Why is Python
>> better for using j?
>
> Being simple souls and not Real Mathematicians, electrical engineers get
> confused by the similarity between I (current) and i (square root of -1),
> so they used j instead.
[...]
> <wink>

No, electrical engineers need many symbols for current for the same reason
that eskimos need many words for snow :) [*]

[*] https://en.wikipedia.org/wiki/Eskimo_words_for_snow

[toc] | [prev] | [next] | [standalone]


#56675

FromOscar Benjamin <oscar.j.benjamin@gmail.com>
Date2013-10-11 12:30 +0100
Message-ID<mailman.1001.1381491074.18130.python-list@python.org>
In reply to#56628
On 11 October 2013 10:35, David <bouncingcats@gmail.com> wrote:
> On 11 October 2013 12:27, Steven D'Aprano
> <steve+comp.lang.python@pearwood.info> wrote:
>> On Fri, 11 Oct 2013 00:25:27 +1100, Chris Angelico wrote:
>>
>>> On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith <roy@panix.com> wrote:
>>>> BTW, one of the earliest things that turned me on to Python was when I
>>>> discovered that it uses j as the imaginary unit, not i.  All
>>>> right-thinking people will agree with me on this.
>>>
>>> I've never been well-up on complex numbers; can you elaborate on this,
>>> please? All I know is that I was taught that the square root of -1 is
>>> called i, and that hypercomplex numbers include i, j, k, and maybe even
>>> other terms, and I never understood where j comes from. Why is Python
>>> better for using j?
>>
>> Being simple souls and not Real Mathematicians, electrical engineers get
>> confused by the similarity between I (current) and i (square root of -1),
>> so they used j instead.
> [...]
>> <wink>
>
> No, electrical engineers need many symbols for current for the same reason
> that eskimos need many words for snow :) [*]

There are many other letters in the Roman alphabet to choose from
though. In particular the study of complex numbers and the choice of i
for sqrt(-1) predates most of the study of electricity and the use of
I to denote current (it was previously called C in English texts).
Obviously I understand that that's all history and once conventions
are so widely adopted it's pointless to change them but it's good to
have common notation for the elementary parts of maths. If someone
tried to explain why their field couldn't use π for the circumference
of a unit circle I would suggest that they adjust the other parts of
their notation not π (there are other uses of π.

Truthfully I've now spent more time with engineers than
physicists/mathematicians and find it natural to switch between i and
j depending on who I'm talking to and what I'm talking about. It's
still confusing for students though when I switch between conventions
to use whichever is standard for a given subject.


Oscar

[toc] | [prev] | [next] | [standalone]


#56678

FromJussi Piitulainen <jpiitula@ling.helsinki.fi>
Date2013-10-11 15:11 +0300
Message-ID<qot8uy0knwk.fsf@ruuvi.it.helsinki.fi>
In reply to#56675
Oscar Benjamin writes:

> tried to explain why their field couldn't use π for the
> circumference of a unit circle I would suggest that they adjust the
> other parts of their notation not π (there are other uses of π.

There's τ for the full circle; π is used for half the circumference.

<duck/>

[toc] | [prev] | [next] | [standalone]


#56684

FromRoy Smith <roy@panix.com>
Date2013-10-11 10:05 -0400
Message-ID<roy-9288EE.10050311102013@news.panix.com>
In reply to#56675
In article <mailman.1001.1381491074.18130.python-list@python.org>,
 Oscar Benjamin <oscar.j.benjamin@gmail.com> wrote:

> If someone tried to explain why their field couldn't use ð for the 
> circumference of a unit circle I would suggest that they adjust the 
> other parts of their notation not ð (there are other uses of ð.

Pi is wrong:

http://www.youtube.com/watch?v=jG7vhMMXagQ

[toc] | [prev] | [next] | [standalone]


#56695

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2013-10-11 17:03 +0000
Message-ID<52582f60$0$29984$c3e8da3$5496439d@news.astraweb.com>
In reply to#56684
On Fri, 11 Oct 2013 10:05:03 -0400, Roy Smith wrote:

> In article <mailman.1001.1381491074.18130.python-list@python.org>,
>  Oscar Benjamin <oscar.j.benjamin@gmail.com> wrote:
> 
>> If someone tried to explain why their field couldn't use ð for the
>> circumference of a unit circle I would suggest that they adjust the
>> other parts of their notation not ð (there are other uses of ð.
> 
> Pi is wrong:

Pi is right, your newsreader is wrong. Oscar's post included the header:

Content-Type: text/plain; charset=ISO-8859-7

Your newsreader ignores the charset header and just assumes it is 
Latin-1. Since pi (π) in ISO-8859-7 is byte \xF0, your newsreader wrongly 
treats it as ð (LATIN SMALL LETTER ETH).



-- 
Steven

[toc] | [prev] | [next] | [standalone]


#56698

FromGene Heskett <gheskett@wdtv.com>
Date2013-10-11 13:00 -0400
Message-ID<mailman.1010.1381514985.18130.python-list@python.org>
In reply to#56684
On Friday 11 October 2013 12:49:40 Roy Smith did opine:

> In article <mailman.1001.1381491074.18130.python-list@python.org>,
> 
>  Oscar Benjamin <oscar.j.benjamin@gmail.com> wrote:
> > If someone tried to explain why their field couldn't use ً for the
> > circumference of a unit circle I would suggest that they adjust the
> > other parts of their notation not ً (there are other uses of ً.
> 
> Pi is wrong:
> 
> http://www.youtube.com/watch?v=jG7vhMMXagQ

The funnily/serious part of this current "comedy central session" is that, 
speaking as someone who was too busy fixing tv's for a living in the 1950 
era, to go far enough in school to get any really higher math, (algebra 
enough to solve ohms law etc was all I usually needed) the above argument 
has always made perfect sense to me, and I have often arrived at the 
correct answer to some problem by using 2Pi, but usually without calling it 
Tau.  And even that wasn't needed often enough to keep my mind fresh about 
it. But I managed to get the job done anyway, those two tv cameras that 
were on the Trieste when it went into the Challenger Deep in 1960 had 
traces of my fingerprints in them.

Cheers, Gene
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)

Linux poses a real challenge for those with a taste for late-night
hacking (and/or conversations with God).
		-- Matt Welsh
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
         law-abiding citizens.

[toc] | [prev] | [next] | [standalone]


#56870

FromJohn Nagle <nagle@animats.com>
Date2013-10-15 22:27 -0700
Message-ID<l3l850$2aq$1@dont-email.me>
In reply to#56628
On 10/10/2013 6:27 PM, Steven D'Aprano wrote:
> For what it's worth, there is no three-dimensional extension to complex 
> numbers, but there is a four-dimensional one, the quaternions or 
> hypercomplex numbers. They look like 1 + 2i + 3j + 4k, where i, j and k 
> are all distinct but i**2 == j**2 == k**2 == -1. Quaternions had a brief 
> period of popularity during the late 19th century but fell out of 
> popularity in the 20th. In recent years, they're making something of a 
> comeback, as using quaternions for calculating rotations is more 
> numerically stable than traditional matrix calculations.

    I've done considerable work with quaternions in physics engines
for simulation.  Nobody in that area calls them "hypercomplex numbers".
The geometric concept is simple.  Consider an angle represented
as a 2-element unit vector.  It's a convenient angle representation.
It's homogeneous - there's no special case at 0 degrees.

    Then upgrade to 3D.  You can represent latitude and longitude
as a 3-element unit vector.  (GPS systems do this; latitude and
longitude are only generated at the end, for output.)

    Then upgrade to 4D.  Now you have a 4-element unit vector
that represents latitude, longitude, and heading. It can
also be thought of as a point on the surface of a 4D sphere,
although that isn't too useful.

    If you have to numerically integrate torques to get
angular velocity, and angular velocity to get angular position,
quaternions are the way to go.  If you want to understand
all this, there's a good writeup in one of the Graphics Gems
books.

    Unlike complex numbers, these quaternions are always unit vectors.

				John Nagle

[toc] | [prev] | [next] | [standalone]


#56881

FromRoy Smith <roy@panix.com>
Date2013-10-16 08:21 -0400
Message-ID<roy-A4DC54.08213316102013@news.panix.com>
In reply to#56870
In article <l3l850$2aq$1@dont-email.me>, John Nagle <nagle@animats.com> 
wrote:

> Then upgrade to 3D.  You can represent latitude and longitude
> as a 3-element unit vector.  (GPS systems do this; latitude and
> longitude are only generated at the end, for output.)

And annoyingly so.  Somebody I know was building a tracking system based 
on a PIC chip and a Trimble GPS module.  The danged thing would only 
give him lat/long, which he then had to devote a sizable chunk of his 
very limited CPU power to converting into some more useful coordinate 
system.  Internally, the GPS module was certainly working in something 
more useful than lat/long, but didn't expose that.

I've done similar math when doing some molecular modeling.  Atoms are 
free to rotate in 3-space around the inter-atomic bonds.  You don't want 
to have to worry about dividing by zero just because some rotation angle 
is 0 or 90 or some other magic number.

[toc] | [prev] | [next] | [standalone]


#56885

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2013-10-16 13:22 -0400
Message-ID<mailman.1114.1381944171.18130.python-list@python.org>
In reply to#56870
On Tue, 15 Oct 2013 22:27:34 -0700, John Nagle <nagle@animats.com>
declaimed the following:


>    If you have to numerically integrate torques to get
>angular velocity, and angular velocity to get angular position,
>quaternions are the way to go.  If you want to understand
>all this, there's a good writeup in one of the Graphics Gems
>books.
>
	There are a couple of texts dedicated just to quartenions...

http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dstripbooks&field-keywords=quarternions&rh=n%3A283155%2Ck%3Aquarternions

	I have the Kuipers, may have the Vince -- though the date is
problematic; bought them as my prior job touched on them in some
applications, but as I was laid off in October 2011, haven't done much.
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web