How to change the texture of an ellipse

edited June 2016 in How To...

Hello, I'm sorry if the answer is simple but I'm new to Processing and I need to program a simple sketch for an exam.

I'll explain my idea: I have a background and two simple stick men. I want to change the texture of their head with various facial expressions (drawn by me in Photoshop and saved as jpg) when the mouse is pressed on that area.

How can I do that?

I tried to create a shape for their heads but the sketch doesn't run. I tried to create a specific area (100x100 px) but nothing.

Tagged:

Answers

  • edited June 2016

    Let's be very clear about something first:

    Are their heads SPHERES?

    Or are they CIRCLES? Or ELLIPSES?

    This matters. Texturing a circle/ellipse is MUCH easier than texturing a sphere.

  • edited June 2016

    They are ELLIPSES!

    I wrote SPHERE in the tile just because I found a tutorial about spheres and I thought it was easier, but they originally were ELLIPSES.

Sign In or Register to comment.