# Rotate 3JS axis

**URL:** <https://discourse.threejs.org/t/rotate-3js-axis/47304>\
**Category:** Questions\
**Tags:** coordinate-system, geometry\
**Created:** [January 26, 2023, 10:46am UTC](https://discourse.threejs.org/t/rotate-3js-axis/47304 "2023-01-26T10:46:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahadi](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mahadi/32/37213_2.png) [@mahadi](https://discourse.threejs.org/u/mahadi)\
**Post date:** [January 26, 2023, 10:46am UTC](https://discourse.threejs.org/t/rotate-3js-axis/47304/1 "2023-01-26T10:46:07Z")

</div>

I have a coordinate system, where I know the origin and direction vector along X-axis and Y-axis and where Z-axis is always up. I want to map this coordinate system with 3JS coordinate system. Because:

1. I have some points in that coordinate system, that I want to plot in 3JS scene.

How can I achieve this? Sorry If I am not clear.

---

<div class="post-metadata">

**Author:** ![PavelBoytchev](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/pavelboytchev/32/38639_2.png) [@PavelBoytchev](https://discourse.threejs.org/u/PavelBoytchev)\
**Post date:** [January 26, 2023, 12:07pm UTC](https://discourse.threejs.org/t/rotate-3js-axis/47304/2 "2023-01-26T12:07:16Z")

</div>

@mahadi –

Just swap coordinates (x,y,z) → (x,z,y) or (y,z,x). You may need to add translation if the origin is not (0,0,0).

– Pavel
