# Transformation and Position of Two Actors

**URL:** https://discourse.vtk.org/t/transformation-and-position-of-two-actors/1417
**Category:** Development
**Created:** [July 25, 2019, 1:40pm UTC](https://discourse.vtk.org/t/transformation-and-position-of-two-actors/1417 "2019-07-25T13:40:57Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![at123](https://discourse.vtk.org/user_avatar/discourse.vtk.org/at123/32/748_2.png) [@at123](https://discourse.vtk.org/u/at123)
#### Post date: [July 25, 2019, 1:40pm UTC](https://discourse.vtk.org/t/transformation-and-position-of-two-actors/1417/1 "2019-07-25T13:40:57Z")

</div>

Hello,

I have an actor and it has been transformed in 3D space. It has been rotated and translated. It is somewhere in 3D space. I have a second actor and I want it to be in the same position and orientation as the first object. How would I accomplish this? Is there a function that does this?

Any help would be greatly appreciated.  
Thank you!

---

<div class="post-metadata">

### Author: ![Andrew](https://discourse.vtk.org/user_avatar/discourse.vtk.org/andrew/32/3861_2.png) [@Andrew](https://discourse.vtk.org/u/Andrew)
#### Post date: [July 26, 2019, 3:12am UTC](https://discourse.vtk.org/t/transformation-and-position-of-two-actors/1417/2 "2019-07-26T03:12:20Z")

</div>

Questions a bit unclear? What kind of data are we talking about? An actor just represents the data. It is not the data. The data could be an image, polygon, whatever. If they’re polygons or point clouds you could use ICP (iterative closest point). Something along these lines [https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/AlignTwoPolyDatas/](https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/AlignTwoPolyDatas/)

---

<div class="post-metadata">

### Author: ![marcomusy](https://discourse.vtk.org/user_avatar/discourse.vtk.org/marcomusy/32/95_2.png) [@marcomusy](https://discourse.vtk.org/u/marcomusy)
#### Post date: [July 26, 2019, 11:21am UTC](https://discourse.vtk.org/t/transformation-and-position-of-two-actors/1417/3 "2019-07-26T11:21:54Z")

</div>

if I understand your question you can retrieve the user transformation as

```python
m = actor.GetMatrix()
tr = vtk.vtkTransform()
tr.SetMatrix(m)

actor2.SetUserTransform(tr) # or even actor2.SetUserMatrix(m)

```

check out also methods in  
[https://vtk.org/doc/nightly/html/classvtkProp3D.html](https://vtk.org/doc/nightly/html/classvtkProp3D.html)
