# Make rotated images horizontaly oriented and canvas responsiveness

**URL:** <https://discourse.processing.org/t/make-rotated-images-horizontaly-oriented-and-canvas-responsiveness/2781>\
**Category:** Coding Questions\
**Created:** [August 19, 2018, 7:30pm UTC](https://discourse.processing.org/t/make-rotated-images-horizontaly-oriented-and-canvas-responsiveness/2781 "2018-08-19T19:30:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![leo](https://avatars.discourse-cdn.com/v4/letter/l/c2a13f/32.png) [@leo](https://discourse.processing.org/u/leo)\
**Post date:** [August 19, 2018, 7:30pm UTC](https://discourse.processing.org/t/make-rotated-images-horizontaly-oriented-and-canvas-responsiveness/2781/1 "2018-08-19T19:30:07Z")

</div>

Can someone help me with [this code pen](https://codepen.io/leonardo-cunha/pen/WKVgqp)? I am trying to find a way to keep the images **oriented horizontaly** and not this radial situation. Also i am having issues **making the elements inside this canvas responsive** to fit on a mobile screen, i know how to make this canvas responsive but that doesn’t change the size of the elements (images) inside.

---

<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:** [August 19, 2018, 7:38pm UTC](https://discourse.processing.org/t/make-rotated-images-horizontaly-oriented-and-canvas-responsiveness/2781/2 "2018-08-19T19:38:55Z")

</div>

Hi,

Instead of using the `rotate()` function, you can just set the x and y position of your image with simple trigonometry:

```auto
x = r * cos(angle);
y = r * sin(angle);

```

Where r is the distance of your image from the center 🙂

This way they won’t rotate on themselves

---

<div class="post-metadata">

**Author:** ![leo](https://avatars.discourse-cdn.com/v4/letter/l/c2a13f/32.png) [@leo](https://discourse.processing.org/u/leo)\
**Post date:** [August 19, 2018, 11:49pm UTC](https://discourse.processing.org/t/make-rotated-images-horizontaly-oriented-and-canvas-responsiveness/2781/3 "2018-08-19T23:49:21Z")

</div>

Yeah this is way better, thanks
