# 3D Rotations: Rotating around the screen axes

**URL:** https://discourse.processing.org/t/3d-rotations-rotating-around-the-screen-axes/14239
**Category:** Coding Questions
**Created:** [September 27, 2019, 2:23pm UTC](https://discourse.processing.org/t/3d-rotations-rotating-around-the-screen-axes/14239 "2019-09-27T14:23:51Z")
**Posts on this page:** 1
**Showing post:** 13

<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: [September 28, 2019, 7:08pm UTC](https://discourse.processing.org/t/3d-rotations-rotating-around-the-screen-axes/14239/13 "2019-09-28T19:08:00Z")

</div>

> [@raetrakt](#):
>
> I should note that I actually switched to p5js because it allows me to rotate around a specified axis, instead of just x, y and z.
> 
> `rotate(-y, [cos(x), 0, sin(x)]);`
> 
> This is not possible in Java Processing afaik.

Take a look here:

> [@Understanding rotate before translate](https://discourse.processing.org/t/help-with-understanding-rotate-before-translate/8631/12):
>
> I thought it would clash with an existing P3D rotate() method but it seems not. Always thought it should be more like rotateAt() or rotateAround(). I have a few extra methods like that in PraxisLIVE (such as 7 parameter image()) but haven’t quite got around to this one yet. Interestingly, there is a 4 parameter version of rotate() in Processing already though - /\*\* \* Rotate around an arbitrary vector, similar to glRotate(), except that it \* takes radians (instead of degrees). \*/ publ…

> **[3D Rotations in Processing (Vectors, Matrices, Quaternions)](https://behreajj.medium.com/3d-rotations-in-processing-vectors-matrices-quaternions-10e2fed5f0a3)**
>
> This tutorial introduces how to rotate objects in 3D beyond Euler angles; to do this, it looks at the basics of matrices and quaternions…

🙂

---

_[View the full topic](https://discourse.processing.org/t/3d-rotations-rotating-around-the-screen-axes/14239)._
