# Need Help! SHARPY PAN/TILT control in 3d space

Hey guys!!!

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?

Hi,

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.

cheers
Markus
rotAim.3.toe (12.5 KB)

1 Like

thank you Markus!!

what if you are wanting to move the origin point?

the functions dont seem to have any reference to the source location so its not clear how to adapt this to multiple beams

any help appreciated thanks!

hey i think ive been able to adapt this to work for multiple beams by simply offsetting source of the beam and the target by an equal amount.

the 3d render at least looks correct

does anyone have any feedback on why this may or may not be a good way to proceed?

sorry that file dosent work,

i had deleted the arcs which actually use the rotational values so the line and crosshair still looked right.

still curious if anyone has any input on this!

How the rotation of the fixture’s XYZ axis affects the rotation values of X,Y(or pan and tilt) please?

Hi @ninjai

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.

cheers
Markus

1 Like