// // // //Rotate Points in XZ-Plane vector rotAxis = set(0,1,0); // Set rotation axis to Y (we're working on '2D' here) vector X = (@P-point(0, "P", @ptnum+1)) * {1,0,1}; //get direction to next point vector N = normalize(set(-X.z, X.y, X.x)); // create a 3x3 orientation matrix using N and rotAxis as the principal axes. matrix3 m = maketransform(N, rotAxis); // now rotate this matrix around the N axis over time. float someAngle = 33; float angle = radians(someAngle); rotate(m, angle, rotAxis); p@orient += quaternion(m);