Hi, trans functions like this :
- you get vectors Xdir and Ydir
- then you go to imaginary OCS of Xdir with trans (trans Ydir 0 Xdir) - OCS Z axis is actually Xdir and Ydir vector is translated from WCS to Xdir OCS - of course OCS is just explanation
- then you work in Xdir OCS with vector Ydir translated, so you firstly calculate initial angle of Ydir translated - basically the same like you are in WCS (angle '(0.0 0.0) Ydir-translated)
- then you add argument angle to calculated initial angle, so you know new position of Ydir-translated
- then you use that angle through (polar) function to obtain position of new rotated Ydir-translated-new (polar '(0.0 0.0) eang 1.0); eang is calculated angle and distance of 1.0 means that Ydir-translated-new is unit vector - ort in OCS of Xdir
- finally you just translate Ydir-translated-new from OCS of Xdir back to WCS to get actual vector expressed in real WCS coordinates...
- then you simply provide that Ydir-trnaslated-new along with origin and Xdir through (setucs) function to perform UCS transformation...