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


Groups > comp.lang.python > #3771

Re: Vectors

From Algis Kabaila <akabaila@pcug.org.au>
Organization PCUG - Users Helping Users
Subject Re: Vectors
Date 2011-04-21 17:25 +1000
References <mailman.625.1303285644.9059.python-list@python.org> <053fd9a1-f829-4777-a6ad-32ea4b22789a@r4g2000prm.googlegroups.com> <654D9D97DA51AD479973BC2D5578603C0BE3C05BAD@PDC-MAIL-CMS01.ubisoft.org>
Newsgroups comp.lang.python
Message-ID <mailman.686.1303370707.9059.python-list@python.org> (permalink)

Show all headers | View raw


On Thursday 21 April 2011 01:49:57 Andreas Tawn wrote:
> > On Apr 20, 6:43 am, Andreas Tawn <andreas.t...@ubisoft.com> 
wrote:
> > > > Algis Kabaila <akaba...@pcug.org.au> writes:
> > > > > Are there any modules for vector algebra (three
> > > > > dimensional vectors, vector addition, subtraction,
> > > > > multiplication [scalar and vector]. Could you give
> > > > > me a reference to such module?
> > > > 
> > > > NumPy has array (and matrix) types with support for
> > > > these basic operations you mention. See the tutorial
> > > > athttp://numpy.scipy.org/
> > > 
> > > You might also want to
> > > considerhttp://code.google.com/p/pyeuclid/
> > > 
> > > Cheers,
> > > 
> > > Drea
> > 
> > Pyeuclid docs don't mention dot or cross products.
> > RJB
> 
> http://partiallydisassembled.net/euclid/vector-classes.html#S
> ECTION002220000000000000000
> 
> Bottom of the page.
> 
> Cheers,
> 
> Drea

Yes, pyeuclid had "cross" and "dot" product of vectors. I am 
impressed with it and curious how it works:  the Vector3 class 
is available without any prefix euclid:

import euclid 
v = Vector3(111.., 222.2, 333.3)

works without  requiring as in:
v = euclid.Vector3( etc...)

I am really intrigued by that. OTOH, I also am somewhat 
aprehensive about using something that affects the program 
writing after importing "euclid", without any need to explicitly 
refer to euclid.  Looks rather risky to me.  What does that do 
to the namespace?

Thanks for bringing this to my attention.  I confess that I 
would be hapier if euclid was accessible in a "standard" manner 
with prefix of module name for classes in the module.

OldAl.

-- 
Algis
http://akabaila.pcug.org.au/StructuralAnalysis.pdf

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Vectors Algis Kabaila <akabaila@pcug.org.au> - 2011-04-20 17:47 +1000
  Re: Vectors Anssi Saari <as@sci.fi> - 2011-04-20 11:07 +0300
    RE: Vectors Andreas Tawn <andreas.tawn@ubisoft.com> - 2011-04-20 15:43 +0200
      Re: Vectors RJB <rbotting@csusb.edu> - 2011-04-20 08:34 -0700
        RE: Vectors Andreas Tawn <andreas.tawn@ubisoft.com> - 2011-04-20 17:49 +0200
        Re: Vectors Algis Kabaila <akabaila@pcug.org.au> - 2011-04-21 17:25 +1000
          Re: Vectors Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-04-22 13:43 +1200
            Re: Vectors Algis Kabaila <akabaila@pcug.org.au> - 2011-04-22 20:58 +1000
      Re: Vectors Anssi Saari <as@sci.fi> - 2011-04-21 17:07 +0300
      Re: Vectors Jonathan Hartley <tartley@tartley.com> - 2011-04-25 03:49 -0700
        Re: Vectors Algis Kabaila <akabaila@pcug.org.au> - 2011-04-26 21:26 +1000
  Re: Vectors sturlamolden <sturlamolden@yahoo.no> - 2011-04-22 13:57 -0700
    Re: Vectors Algis Kabaila <akabaila@pcug.org.au> - 2011-04-23 10:32 +1000
      Re: Vectors sturlamolden <sturlamolden@yahoo.no> - 2011-04-22 21:13 -0700
        Re: Vectors Algis Kabaila <akabaila@pcug.org.au> - 2011-04-23 22:26 +1000
          Re: Vectors sturlamolden <sturlamolden@yahoo.no> - 2011-04-23 07:02 -0700
    Re: Vectors Robert Kern <robert.kern@gmail.com> - 2011-04-24 18:49 -0500
      Re: Vectors rusi <rustompmody@gmail.com> - 2011-04-24 19:59 -0700
        Re: Vectors Algis Kabaila <akabaila@pcug.org.au> - 2011-04-25 17:05 +1000

csiph-web