# Calculate speed from position values

Hi, I have moving objects in touchdesigner, with tx ty tz values and I would like to calculate the speed of object.

I tested it out with a kinect :

average channels in math > slope, but I am not sure if it is the right way,

Hey @sherlynn,

The Slope CHOP calculates speed when having a position as an input. So first pass the positions into a Slope CHOP with the result being speed in all 3 directions. To now calculate the general speed, append a Math CHOP and select Combine Channels > Length which will give you the length of the speed vector and hence the overall speed.

The image here just shows how you can confirm this: First you specify a speed that is distributed among 3 random directions. The Speed CHOP, given a value calculates distance so it can be seen as returning a position. The “Calculated Speed” section then is then what I described above, taking the position, calculating the speed in all directions and calculating the summed up speed.

Hope this helps
Markus