We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Masking shapes (Read 616 times)
Masking shapes
Dec 6th, 2007, 3:14pm
 
Is there a good way to mask drawn shapes? I know there is mask functionality in PImage, but I need something that will mask out certain parts of a given shape. What I'm specifically working on is a vertex mesh that I'm using to simulate water. At the current time though its constrained as a rectangle, and I would like to make water like edges to it.

Any ideas on how to do this would be great,

Thanx

Re: Masking shapes
Reply #1 - Dec 6th, 2007, 9:21pm
 
Hi, do you want do more than what you can do with the texture() functions ? This allow you to put a texture to a shape defined by vertex.
Re: Masking shapes
Reply #2 - Dec 8th, 2007, 10:43pm
 
Thanks for the suggestion, but textures wont work since the vertex shapes is constantly changing in a wave pattern (a sine curve). I need something that could set up a perimeter, which would render any shapes crossing it invisible somehow.

Anyone have other ideas?

Re: Masking shapes
Reply #3 - Dec 9th, 2007, 12:37am
 
hi. so, why would vertexes not work? also mask() could do what you want. but it's quite slow when used every frame. I guess I just don't really understand what you're asking Wink
Page Index Toggle Pages: 1