# \[SOLVED\] How do you individually rotate objects in a grid?

**URL:** https://discourse.processing.org/t/solved-how-do-you-individually-rotate-objects-in-a-grid/7510
**Category:** Coding Questions
**Created:** [January 14, 2019, 4:22pm UTC](https://discourse.processing.org/t/solved-how-do-you-individually-rotate-objects-in-a-grid/7510 "2019-01-14T16:22:55Z")
**Posts on this page:** 1
**Showing post:** 7

<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: [January 23, 2019, 9:07pm UTC](https://discourse.processing.org/t/solved-how-do-you-individually-rotate-objects-in-a-grid/7510/7 "2019-01-23T21:07:54Z")

</div>

Understood, @Namrad, and glad you are headed in the right direction. Yes, it did take me quite a bit to move from one transformation to looped or nested transformations.

> [@Namrad](#):
>
> How does the translate function ‘carry’ all the x, y values over to each rect?

The key thing to remember is that you are changing what “0,0” means each time you push. When you pop, you return to the previous definition of “0,0”.

There was an interesting related example a few months ago with a nested rotation sequence that you might find interesting – depending on where you are in the push / pop stack, 0,0 is the center of planet, or moon, or moon-of-a-moon, et cetera.

> [@Sequence of rotation](https://discourse.processing.org/t/sequence-of-rotation/3184/6):
>
> It does if you are not using translations between the rotations. If not, no. You can try this out with a physical object in your hand to confirm – rotate a stick of butter 90 x, then 90 y, or 90 y then 90 x, and it ends up in the same orientation. If you translate, however, (See expanded examples below) IN GENERAL everything is order-dependent. You may want to make sure that you have completely worked out the 2D case, then add another dimension of rotation to tilt the axes. For example, her…

---

_[View the full topic](https://discourse.processing.org/t/solved-how-do-you-individually-rotate-objects-in-a-grid/7510)._
