[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] 2D Vector Class
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] 2D Vector Class
- From: "Ulf Ekström" <uekstrom@xxxxxxxxx>
- Date: Wed, 16 May 2007 22:11:43 +0200
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Wed, 16 May 2007 16:11:53 -0400
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=KD6wF9n69JHHkoo0irBTBbEtHfgWJBeIYYGFwVeebkbAtGXPa7bGElwGXfPP61vxDjosGpXkXQ2omRypiQMmpU+/9LoqYMySZXewSONSPO3Xz+x1VPl+vFgbNp9V12EBqBbeTvBhMfAp0EbXqW+TPbuERX3KiuoM83x7cXPNg1c=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=MEHmmY5km9TriB2P0anwqUJsstlNgRSzq1/tqJk5apJTlTW0SlagsaSy+XbE3k73JFB8byMTroEo1bVjUou+cP3dQdVSI/UMqp48uKdGs37J4YgM/t06zBPSBaopKvVW9kksePHqbqi6gLNb9bqJuipW5nICmEJaLpywNMYEGhY=
- In-reply-to: <464B6327.9090106@cs.rpi.edu>
- References: <004001c797ef$ffbc7ff0$0201a8c0@naomi> <464B6327.9090106@cs.rpi.edu>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
On 5/16/07, Ethan Glasser-Camp <glasse@xxxxxxxxxx> wrote:
John Krukoff wrote:
> I'd guess that numeric/numpy is probably a good way to do this too, but
> I've been trying to avoid pulling that in as a dependency.
How about making a very simple C library, which only does vectors of
doubles? I am thinking of a basic class that supports addition,
subtraction, scaling and dot product for arbitrary length vectors.
Then this could be used for implementing 2d and 3d vectors in Python,
with the more geometrical operations implemented in python. This would
be some kind of light weight numeric, I guess.
I wrote a physics system using Numeric. It still wasn't fast enough.
Do you know exactly what made it slow? Do you think it can be worked
around assuming we have fast vector operations?
Regards,
Ulf