scale) |
The scale should be a list of 3 numbers, or a single number. In the latter case, the scaling is homothetic.
dir,distance=None) |
dir is either an axis number (0,1,2) or a direction vector.
If a distance is given, the translation is over the specified distance in the specified direction. If no distance is given, and dir is specified as an axis number, translation is over a distance 1. If no distance is given, and dir is specified as a vector, translation is over the specified vector.
Thus, the following are all equivalent: F.translate(1); F.translate(1,1); F.translate([0,1,0]); F.translate([0,2,0],1)
angle,axis=2) |
The angle is specified in degrees. The axis is either one of 0,1,2 designating one of the global axes, or a 3-component vector specifying an axis through the origin. If no axis is specified, rotation is around the 2(z)-axis. This is convenient for working on 2D-structures.
Positive angles rotate clockwise when looking in the positive direction of the axis.
As a convenience, the user may also specify a 3x3 rotation matrix as argument. In that case rotate(mat) is equivalent to affine(mat).
dir,dir1,skew) |
The coordinate dir is replaced with (dir + skew * dir1).
dir,pos=0) |
Default position of the plane is through the origin.
mat,vec=None) |
The returned Formex has coordinates given by mat * xorig + vec, where mat is a 3x3 matrix and vec a length 3 list.