# Rotation of point cloud

**URL:** <https://forum.commonvisionblox.com/t/rotation-of-point-cloud/506>\
**Category:** C++ API\
**Tags:** 3d, pointcloud\
**Created:** [August 1, 2018, 6:18am UTC](https://forum.commonvisionblox.com/t/rotation-of-point-cloud/506 "2018-08-01T06:18:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LRidley](https://avatars.discourse-cdn.com/v4/letter/l/85e7bf/32.png) [@LRidley](https://forum.commonvisionblox.com/u/LRidley)\
**Post date:** [August 1, 2018, 6:18am UTC](https://forum.commonvisionblox.com/t/rotation-of-point-cloud/506/1 "2018-08-01T06:18:21Z")

</div>

Hi guys,

can you tell me the ideal way how to transform a point cloud (rotation+translation)? Didn’t find anything in the tutorials.

---

<div class="post-metadata">

**Author:** ![Moli](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/moli/32/553_2.png) [@Moli](https://forum.commonvisionblox.com/u/Moli)\
**Post date:** [August 1, 2018, 7:41am UTC](https://forum.commonvisionblox.com/t/rotation-of-point-cloud/506/2 "2018-08-01T07:41:47Z")

</div>

Hi

here is a quick example how to perform a 3D coordinate transformation (rotation + translation).

**Translation**

```auto
CVC3DTransformation m = CVC3DIdentityTransformation;
m.Translation[0] = 0;
m.Translation[1] = 0;
m.Translation[2] = 10;
CVC3DTransformPointCloud(pointCloud, m, pointCloud);

```

**Rotation**

We use roll, pitch and yaw for the generation of the rotation matrix, however you could also set up the matrix itself if needed.

```auto
CVC3DTransformation rot = CVC3DIdentityTransformation;
CVC3DRotationMatrixFromRollPitchYaw(0, 0, 10, rot.Matrix);
CVC3DTransformPointCloud(pointCloud, rot, pointCloud);

```

Thank you for pointing that out! We will update our tutorials in the following release to also demonstrate this.
