Math question: How to compute the area of polygons
Jim Hurley
jhurley at infostations.com
Fri Mar 21 13:14:00 EST 2003
>
>Message: 6
>Date: Fri, 21 Mar 2003 13:32:29 +0100
>Subject: Re: Math question: How to compute the area of polygons
>From: malte.brill at t-online.de (Malte Brill)
>To: <use-revolution at lists.runrev.com>
>Reply-To: use-revolution at lists.runrev.com
>
>Thanks a lot again. :-)
>
>Jim,
>your solutions is more than close to what I am lokking for. (I just would
>need variable numbers of sides and bob is my uncle. I´m really happy, so I
>don´t know if I can get this silly grin from my face today. ;-) )
>I had to put a comment mark on the two scripst, where you call a handler
>called ct (does it require TG to be present?)
>The point is, that in the game logic I am thinking of there will never be
>more than 2 objects colliding. So if I check with the intersect function
>first this will defenitly be fast enough to run smoothly.
Sorry about the "ct" line. I forgot that I had a plugin running in
the background. "ct" stands for my "clearText" command.
I'm happy and surprised this works for you. I have modified it so
that it works for polygons of arbitrary number of sides and re-posted
it at
http://home.infostations.net/jhurley/
under the title: Colliding polygonsRevised.rev
Let me know if this works for you.
You can speed up or slow the motion of the polygon by changing the
values of vx and vy.
Jim
More information about the use-livecode
mailing list