[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Polygon Objects



David J. C. Beach wrote:
> On Mon, 2004-02-23 at 05:14, Niki Spahiev wrote:
> > I am interested in general polygon algorithms and have collection of C 
> > extensions for boolean operations. Feel free to ask.
> 
> Okay, I'm interested in this.  :)

I'm very interested, too.

I guess collision checking would be done by having equations for the
borders of the polygons and setting them equal.

But then, it would be relatively easy to generalize it to any area with
polynomial borders, or even any area. I'm writing a platform-game, and I
can image a circular or parabolic slope along which a sprite would be
moving. If we are going to create a new class for this, I think we
should consider going further than area's with straight lines as borders
and have area's with any equation as border.

A Polygon would then be a special case (subclass?) of Area, and a Rect
would be a special case (subclass?) of Polygon. What do you think?

Gerrit.

-- 
Weather in Twenthe, Netherlands 26/02 19:25 UTC:
	0.0°C   wind 4.0 m/s SW (57 m above NAP)
-- 
Asperger Syndroom - een persoonlijke benadering:
	http://people.nl.linux.org/~gerrit/
Kom in verzet tegen dit kabinet:
	http://www.sp.nl/

Attachment: pgp00003.pgp
Description: PGP signature