I making some patch which must controls the moving lights in 3D space per DMX.
I have a question. Also I need to control the Sharpy - Moving Light per DMX so that I meet the precise points in 3D space. For example I have the real position of sharpy and the model of the hall and I need to look with my sharpy in the angle of the window or in each point I need.

How can I calculate the PAN and TILT parameters in the best way?
If I try to calculate rotation with Aim on point and Object CHOP - I get strange rotation angles.
Is there some who made an expirience with moving lights?

I think this is correct. Essentially you calculate rotation first with the help of atan2 in the Function CHOP. Rotation is atan2 of z position of the target over x position of the target.

To calculate aim, first get the length of the x and z position of the target via the Length function in the Math CHOP and next atan2 the y position of the target over the just calculated length.

Attached file shows this in the angle Network. Adjust the target position CHOP to move the target point.

when there is an extra rotation of the fixture then my approach would be to still regard the fixture’s position as unchanged and located in the origin but the target points coordinates changed by the inverse of the rotation of the fixture. Hence, I believe applying a rotation to the target position via a Transform CHOP should do the trick.