Re: [pygame] extending pygame masks

2009-01-05 Thread Michael George
Nirav Patel wrote: Sorry about the very long delay on this, but I finally committed Mike's convolve function and tests as revision 1796. Nirav Thanks! --Mike

Re: [pygame] extending pygame masks

2009-01-04 Thread Nirav Patel
Sorry about the very long delay on this, but I finally committed Mike's convolve function and tests as revision 1796. Nirav On Fri, Oct 17, 2008 at 10:25 PM, Michael George mdgeo...@cs.cornell.eduwrote: Here are the files. It turns out the actual convolution is much simpler than the one I

Re: [pygame] extending pygame masks

2009-01-04 Thread Lenard Lindstrom
Hi Nirav, Did you make changes to locals.html, camera.html, index.html, color.html and pixelarray.html? I ask because I almost clobbered them when I ran makeref.py after applying a patch to src\music.doc. Lenard Nirav Patel wrote: Sorry about the very long delay on this, but I finally

Re: [pygame] extending pygame masks

2009-01-04 Thread Nirav Patel
Lenard, I didn't make any changes, and the diffs show no changes, but for some reason, they were included in the commit anyway. Nirav On Sun, Jan 4, 2009 at 5:41 PM, Lenard Lindstrom le...@telus.net wrote: Hi Nirav, Did you make changes to locals.html, camera.html, index.html, color.html and

Re: [pygame] extending pygame masks

2009-01-04 Thread Lenard Lindstrom
Hi, Possibly just carriage returns. I will see what happens when I run makeref.py on a fresh checkout. Lenard Nirav Patel wrote: Lenard, I didn't make any changes, and the diffs show no changes, but for some reason, they were included in the commit anyway. Nirav On Sun, Jan 4, 2009 at

Re: [pygame] extending pygame masks

2009-01-04 Thread Lenard Lindstrom
It was just that, line endings. I took care of it so no one else will be caught by surprise. Lenard Lenard Lindstrom wrote: Hi, Possibly just carriage returns. I will see what happens when I run makeref.py on a fresh checkout. Lenard Nirav Patel wrote: Lenard, I didn't make any

Re: [pygame] extending pygame masks

2008-10-17 Thread Michael George
I added a convolve function with the proposed interface, as well as docs and a handful of unit tests. How do I generate and submit a patch? --Mike René Dudfield wrote: Sounds cool. Remember to also write unittests :) The mask module is falling behind it unittests at the moment. cheers!

Re: [pygame] extending pygame masks

2008-10-17 Thread Nirav Patel
You can use the diff command to generate patches, but if its easier for you, you can just upload or email the files you changed. Nirav On Fri, Oct 17, 2008 at 6:57 PM, Michael George [EMAIL PROTECTED] wrote: I added a convolve function with the proposed interface, as well as docs and a handful

Re: [pygame] extending pygame masks

2008-10-15 Thread Michael George
Would it make sense for me to build this right into the Mask module and send you a patch then, or would it be better for me to develop it separately as I have been and share the source with you when it's finished so that you can put it together? I'm still not entirely sure about the interface

Re: [pygame] extending pygame masks

2008-10-15 Thread Nirav Patel
It's not necessarily a good idea to have stuff that specific to an app in a library. I think it would be good to have the convolution function built into mask, and leave the rest of the implementation up to the user. As for how to deal with the interface for convolving, perhaps it would be

Re: [pygame] extending pygame masks

2008-10-15 Thread Michael George
Nirav Patel wrote: It's not necessarily a good idea to have stuff that specific to an app in a library. I think it would be good to have the convolution function built into mask, and leave the rest of the implementation up to the user. As for how to deal with the interface for convolving,

Re: [pygame] extending pygame masks

2008-10-15 Thread René Dudfield
Sounds cool. Remember to also write unittests :) The mask module is falling behind it unittests at the moment. cheers! On Thu, Oct 16, 2008 at 5:40 AM, Michael George [EMAIL PROTECTED] wrote: Nirav Patel wrote: It's not necessarily a good idea to have stuff that specific to an app in a

Re: [pygame] extending pygame masks

2008-10-14 Thread Nirav Patel
Mike Ah, very interesting. Can I see the source on that? I would love to see that included in the Mask module. Nirav On Tue, Oct 14, 2008 at 10:44 AM, Michael George [EMAIL PROTECTED] wrote: Thanks, what I need is different - I need to compute overlap_mask for each possible offset, so that

Re: [pygame] extending pygame masks

2008-10-14 Thread Michael George
I just realized that with a very slight modification the code I sent you could be used for sweep-based pixel-perfect collision detection. That is, by convolving a mask with a path you would have a mask that covers all of the pixels that the object touches as it traverses the path (rather than

Re: [pygame] extending pygame masks

2008-10-14 Thread Michael George
Thanks, what I need is different - I need to compute overlap_mask for each possible offset, so that I can search for an optimal placement. Of course I could write a loop and call overlap_mask for each offset, but I think that would be prohibitively slow - I'm computing it all in one pass.

Re: [pygame] extending pygame masks

2008-10-14 Thread Michael George
Attached. It's not integrated w/ python yet, but the tricky part is mostly done. --Mike Nirav Patel wrote: Mike Ah, very interesting. Can I see the source on that? I would love to see that included in the Mask module. Nirav On Tue, Oct 14, 2008 at 10:44 AM, Michael George [EMAIL