art3mis 42 Posted October 1 (edited) Hi Trying to implement several of these rotation formulas with simple geometry https://sites.google.com/site/fujitarium/technical-note/basic-math/rotation for instance the first example Quote add rotation X (x, y*cos(rx) + z*sin(rx), y*-sin(rx) + z*cos(rx)) (x, y*cos(rx) + z*sin(Rx), y*-sin(rx) + z*cos(rx)) x = x y = y*cos(rx) + z*sin(Rx) z = y*-sin(rx) + z*cos(rx) How would you implement this as Vex within a Point Wrangle? Edited October 1 by art3mis Share this post Link to post Share on other sites

sankeerthgs 3 Posted October 5 Hi, While rotating an object, we are essentially changing the position of the points of the Geo. So, the above mentioned formula changes the point position along y and z axis but not x axis. To implement it in a point wrangle, just drop in a test object on to the grid followed by a point wrangle and enter the following code in the wrangle : float angleX = ch("xRad"); float posY = @P.y*cos(angleX) + @P.z*sin(angleX); float posZ = @P.y*(-sin(angleX)) + @P.z*cos(angleX); @P = set(@P.x, posY, posZ); Change the "xRad" parameter, the object "appears" to be rotating along the X-Axis, but in reality, it is just changing the point positions along Y and Z axis. Hope it helps! S Share this post Link to post Share on other sites