# Multiple shapes

**URL:** https://discourse.processing.org/t/multiple-shapes/29472
**Category:** Coding Questions
**Created:** [April 18, 2021, 5:14pm UTC](https://discourse.processing.org/t/multiple-shapes/29472 "2021-04-18T17:14:59Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![PARINAZ129](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@PARINAZ129](https://discourse.processing.org/u/PARINAZ129)
#### Post date: [April 18, 2021, 5:14pm UTC](https://discourse.processing.org/t/multiple-shapes/29472/1 "2021-04-18T17:14:59Z")

</div>

Dear  
As a beginner, I have rendered a car via rectangles and circles.  
Actually, I want to move this car via mouse but I cant movie multiple shapes which created the car at the same time.  
I would be grateful If you check out this code.

void setup()  
{  
size(700,700);  
background(0);  
}

void draw()  
{  
background(0);  
pushMatrix();  
translate(320,320);  
fill(255,255,255,240);  
rect(64,256,80,32);  
rect(88,224,32,32);  
fill(#030303);  
rect(96,234,18,18);  
fill(#030303);  
circle(80,288,32);  
circle(128,288,32);  
stroke(255,255,255);  
circle(80,288,16);  
circle(128,288,16);  
noStroke();  
popMatrix();  
}

---

<div class="post-metadata">

### Author: ![micuat](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/micuat/32/19407_2.png) [@micuat](https://discourse.processing.org/u/micuat)
#### Post date: [April 18, 2021, 5:32pm UTC](https://discourse.processing.org/t/multiple-shapes/29472/2 "2021-04-18T17:32:12Z")

</div>

Hi! Welcome to the forum!

First of all please use `</>` button to format your code.

Did you understand what `pushMatrix` do? If so it should be quite straightforward to move multiple shapes at the same time 🙂

---

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [April 19, 2021, 9:21pm UTC](https://discourse.processing.org/t/multiple-shapes/29472/3 "2021-04-19T21:21:01Z")

</div>

Hello,

Please format your code:  
_[FAQ - Processing Foundation](https://discourse.processing.org/faq#format-your-code)_

The Processing website has resources (tutorials, references, examples, etc.):  
_[https://processing.org/](https://processing.org/)_

The Coding Train on YouTube also has some great lessons.

`:)`

---

<div class="post-metadata">

### Author: ![jb4x](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jb4x/32/789_2.png) [@jb4x](https://discourse.processing.org/u/jb4x)
#### Post date: [April 19, 2021, 9:25pm UTC](https://discourse.processing.org/t/multiple-shapes/29472/4 "2021-04-19T21:25:20Z")

</div>

Have you heard of classes?  
Do you want to be able to move the car by moving the mouse anywhere on the screen or only if you click on the car?
