Most of our current users already know and use this, but I can see that more and more come here looking for specific information on how to achieve this type of x and y-axis motion.
You will need 3 things:
- time function that will give you back normal rotation value you could use in the rotation field
- place where you would want to have that circular motion have its center (in terms of normal rotation, it’s x and y position).
- how far from that center position do you want your element to move (if you will want to create an elliptical movement you should find out separate x and y-axis value for this one).
Now how to calculate x and y position of circular motion?
Use sines and cosines:
Now the basic usage:
for x-axis:
(((sin(((t+xa)/180)*pi))*xr)+x)
and for y-axis:
(((cos(((t+ya)/180)*pi))*yr)+y)
“t” is the time from point 1.
You can either use a tag that already gives back an angle (like #DWFSS#), or you can calculate it yourself, eg.:
((#Dsm#/60)*360)
“xa” and “ya” in most cases are equal 0, but if you would want to modify your rotation by having it rotated a bit more/less, here is where you put that modification (eg.: if for time you will use seconds and under xa and ya you will put 90 then at full minute (0 seconds) it will point at 15 seconds instead).
“xr” and “yr” are where you put numbers from point 3 - your rotation’s radius (you can use exact same amounts to have a normal circular motion, or different ones in order to have elliptical movement).
“x” and “y” is where you put your rotation’s center, from point 2.