How do i get the circle head behind the pages to look like the second photo

It would help us to help you if you would copy/paste your code into the editor. Select the icon at the top which has the backslashforward arrows (Preformatted text) and then copy/paste your source code in the gray box which now appears. That way we can run your code on our systems and try to help you with your question. Thanks and welcome to the forum.

1 Like
size(600,600);
background(255);

strokeWeight(2);   
ellipse(225,233,175,175); /*head*/

fill(255);
line(50,170,197,225); /*leftside of book*/
line(197,225,222,470);
line(222,470,85,420);
line(85,420,50,170);

line(75,210,175,250);  /*leftside title of book*/
line(175,250,182,280);
line(182,280,80,240);
line(80,240,75,210);

line(250,225,380,170); /*rightside of book*/
line(380,170,370,410);
line(370,410,235,470);
line(235,470,250,225);

line(275,250,360,210); /*rightside title of book*/
line(360,210,362,240);
line(362,240,275,276);
line(275,276,275,250);

ellipse(375,320,60,60); /*hands*/
ellipse(77,367,60,60);



1 Like

Thank you.

I hope this helps and is readable.

Yes, that is very helpful. I presume that you want the large circle at the top to appear to be in the background. Note that your small circles appear to be in the foreground because you gave them a fill. You have drawn the elements in the correct order for this to occur. To make the large circle appear to be behind the pages it would help if you gave it a fill and did not apply a stroke to just it.

  fill(209);  
  noStroke();
  ellipse(225, 233, 175, 175);

Output:

It would be even better if you could apply a fill to the book pages. You could do this if you used createShape() to create the pages instead of a series of lines and then applied a fill to that.

If i try that, this is how it is suppose to look:

This is what is possible with createShape() and beginContour…endContour:

The references are here:

Please try to create the output that you want by using the references. If you have problems, please post what you have tried and we will try to help you get to the finish line.

If you don’t want the ‘see through‘ slits on the pages then you can get by with two other pShapes with their own fills and not use beginContour…endContour.

Addendum:

With four separate PShapes for the book it’s possible to GROUP them together so that you wind up with one book object, a head, and two hands which should be close to what you’re looking for.