# Shift perspective on a 2D sketch? or if not posible, easily convert to 3D?

**URL:** https://discourse.processing.org/t/shift-perspective-on-a-2d-sketch-or-if-not-posible-easily-convert-to-3d/5954
**Category:** Coding Questions
**Created:** [November 26, 2018, 1:42pm UTC](https://discourse.processing.org/t/shift-perspective-on-a-2d-sketch-or-if-not-posible-easily-convert-to-3d/5954 "2018-11-26T13:42:21Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![gio](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gio/32/2313_2.png) [@gio](https://discourse.processing.org/u/gio)
#### Post date: [November 26, 2018, 1:42pm UTC](https://discourse.processing.org/t/shift-perspective-on-a-2d-sketch-or-if-not-posible-easily-convert-to-3d/5954/1 "2018-11-26T13:42:22Z")

</div>

Hi,

I got this 2s array grid of sliding circles: [https://codepen.io/giorgiomartini/pen/MzGmwW?editors=0010](https://codepen.io/giorgiomartini/pen/MzGmwW?editors=0010)

Its inspired by this poster:

> **[International Year of Astronomy 2009 by Simon C Page, via Behance | Graphic...](https://www.pinterest.de/pin/331859066263088585/)**
>
> International Year of Astronomy 2009 by Simon C Page, via Behance

  
 ![](https://yyz2.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/9/96bc2cbe0939bf0883744c869b7268f173073d5a.jpeg)

as u can see in the poster, it has perspecive… is there a way to tilt/shift perspective in a 2D sketch, to get this effect?

If not… whats an easy way to convert a 2d sketch like this one to a 3d one where i can tilt the persective?

Thanks

---

<div class="post-metadata">

### Author: ![Sarah](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sarah/32/1675_2.png) [@Sarah](https://discourse.processing.org/u/Sarah)
#### Post date: [November 26, 2018, 10:30pm UTC](https://discourse.processing.org/t/shift-perspective-on-a-2d-sketch-or-if-not-posible-easily-convert-to-3d/5954/2 "2018-11-26T22:30:05Z")

</div>

You need to change your renderer to `WEBGL` to have an 3D environment. Then you can use `rotateX();` ([https://p5js.org/reference/#/p5/rotateX](https://p5js.org/reference/#/p5/rotateX)) to tilt your circles.

---

<div class="post-metadata">

### Author: ![gio](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gio/32/2313_2.png) [@gio](https://discourse.processing.org/u/gio)
#### Post date: [December 2, 2018, 6:53pm UTC](https://discourse.processing.org/t/shift-perspective-on-a-2d-sketch-or-if-not-posible-easily-convert-to-3d/5954/3 "2018-12-02T18:53:35Z")

</div>

Thans Sara! that was an easy fix! 🙂
