Contour rectangle with an ellipse

Hi,
there a simple way to contour a rectangle with an ellipse?
i’ve tried vertex, curvedvertex but nothing work well

what i’m trying to accomplish is a way to apply some sort of a circle mask to a underlyng object,shape,image.
an example of the image i’m trying to replicate is : https://whatsittech.com/wp-content/uploads/2017/10/Tycho-Album-Cover-Awake.jpg

Hi @guidoDimasi ,

Welcome to the forum! :wink:

You can use the PImage.mask() function to do that :

Masks part of an image from displaying by loading another image and using it as an alpha channel. This mask image should only contain grayscale data, but only the blue color channel is used. The mask image needs to be the same size as the image to which it is applied.

You can also check a previous message I did on a masking technique with PGraphics :

2 Likes

thank u! it was what i need for my experiment!

1 Like