Actually they aren't X/Y/Z positions, they are X/Y/Z rotation angles. This is my Dice program hacked. Pos 1,2,3 are the final angles to face the right way for the number 6 on a dice. Different Pos will give a different number on the dice. It relates in the same way to rotating a camera back to its start position. This example will need some changes for it to work in your program, but it shows you how to do it slightly.
pos1 = 270
pos2 = -270
pos3 = -270
x# = curveangle(pos1,x#,20)
y# = curveangle(pos2,y#,20)
z# = curveangle(pos3,z#,20)
cameraz# = curveangle(0,cameraz#,20)
xrotate object 41,x#
yrotate object 41,y#
zrotate object 41,z#
zrotate camera cameraz#