Bcc.TransformPoints
Bcc.TransformPoints({points}, {matrix})
Description
Get the resulting list of coordinates by transforming the input list of points with a 4x4 matrix
Parameters
The primary input of this function is a Table which can include the following keys:
- points - table of points X, Y, Z positions: point={{X1,Y1,Z1},{X2,Y2,Z2},...{Xn,Yn,Zn}}
- matrix - table representing the transform matrix: matrix={{1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1}}
Return
Returns a table containing the new point in the format: result={{x1,y1,z1},{x2,y2,z2},...,{xn,yn,zn}}
Examples
The following example shows rotating a point at X=1.5, Y=1.5, Z=0 by 90 degrees around the Z axis at the origin.
point1 = {1.5,1.5,0}
point2 = {1,1,0}
matrix = {{0,1,0,0},{-1,0,0,0},{0,0,1,0},{0,0,0,1}}
newPoints = Bcc.TransformPoints({point1,point2},matrix)
The resulting newPoints will contain:
newPoints = {{-1.5,-1.5,0},{-1,-1,0}}