# Why transformations and shapes can't be used within beginShape()

**URL:** <https://discourse.processing.org/t/why-transformations-and-shapes-cant-be-used-within-beginshape/20997>\
**Category:** Beginners\
**Created:** [May 18, 2020, 6:32am UTC](https://discourse.processing.org/t/why-transformations-and-shapes-cant-be-used-within-beginshape/20997 "2020-05-18T06:32:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![alikaikai](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@alikaikai](https://discourse.processing.org/u/alikaikai)\
**Post date:** [May 18, 2020, 6:32am UTC](https://discourse.processing.org/t/why-transformations-and-shapes-cant-be-used-within-beginshape/20997/1 "2020-05-18T06:32:55Z")

</div>

Hello everyone!

I recently started using Processing and I learned from the reference page that transformations such as `translate()` `rotate()` as well as other shapes do not work within `beginShape()`.  
So why is that happening?

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [May 20, 2020, 5:49pm UTC](https://discourse.processing.org/t/why-transformations-and-shapes-cant-be-used-within-beginshape/20997/2 "2020-05-20T17:49:54Z")

</div>

Hi @alikaikai – welcome to the forum.

> [@alikaikai](#):
>
> So why is that happening?

I didn’t understand yoru question here. So why is what happening?

---

<div class="post-metadata">

**Author:** ![alikaikai](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@alikaikai](https://discourse.processing.org/u/alikaikai)\
**Post date:** [May 21, 2020, 2:08am UTC](https://discourse.processing.org/t/why-transformations-and-shapes-cant-be-used-within-beginshape/20997/3 "2020-05-21T02:08:59Z")

</div>

thank you!  
I just wonder why those functions can’t be used between `beginShape()` and `endShape()`

---

<div class="post-metadata">

**Author:** ![SomeOne](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/someone/32/8639_2.png) [@SomeOne](https://discourse.processing.org/u/SomeOne)\
**Post date:** [May 21, 2020, 3:40am UTC](https://discourse.processing.org/t/why-transformations-and-shapes-cant-be-used-within-beginshape/20997/4 "2020-05-21T03:40:16Z")

</div>

I think it is prevented, because you would have to create (calculate, draw) the construct from `beginShape() ... endShape()` before you can translate or rotate it. It would break how translate and rotate is implemented.

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [May 21, 2020, 5:49am UTC](https://discourse.processing.org/t/why-transformations-and-shapes-cant-be-used-within-beginshape/20997/5 "2020-05-21T05:49:07Z")

</div>

If you wish to find points using transformations and then add those relative coordinates to shapes as absolute vertices, one method is to use modelX / modelY:

[https://processing.org/reference/modelX\_.html](https://processing.org/reference/modelX_.html)
