|
|
|
| |
Example commands using the off_trans program. This program
applies Euclidean transformations (rotations, translations, reflections,
central inversion), and scaling transformations to the model. Some
transformations are specified using the coordinate system alone
(e.g. a translation of 2 units in the direction of the z-axis) while
others also reference the model being
transformed (e.g. a translation that carries the model centroid onto the
coordinate origin).
|
|
|
|
|
Translate
|
Med
Lrg
|
Description :
|
The -T option specifies a translation. The argument is three values for
the number of units to translate the model along the x, y and z axes. In this
example the model is translated 0.5 units in the direction of the x-axis,
0.2 in the direction of the y-axis and 0.1 in the direction of the z-axis.
View this model with the command
off_color -r A0.2,f ant4 > orig.off off_trans -T 0.5,0.2,0.1 ant4 | antiview -C 0,0,0 - orig.off
|
|
|
|
|
Rotate 3 O
|
Med
Lrg
|
Description :
|
The -R option specifies a rotation about the origin. If the argument is
three values, these are the number of degrees to rotate the model around
the x, y and z axes, in that order. In this example the model is rotated
-30 degrees around the x-axis.
View this model with the command
off_color -r A0.2,f ant4 > orig.off off_trans -R -30,0,0 ant4 | antiview -C 0,0,0 - orig.off
|
|
|
|
|
Rotate 3 O
|
Med
Lrg
|
Description :
|
The -R option specifies a rotation about the origin. If the argument is
three values, these are the number of degrees to rotate the model around
the x, y and z axes, in that order. In this example the model is rotated
90 degrees around the x-axis, then 30 degrees around the z-axis.
View this model with the command
off_color -r A0.2,f ant4 > orig.off off_trans -R 90,0,30 ant4 | antiview -C 0,0,0 - orig.off
|
|
|
|
|
Rotate 4 O
|
Med
Lrg
|
Description :
|
The -R option specifies a rotation about the origin. If the argument is
four values this is a rotation about a single axis. The first three values
are a vector giving the direction of the axis, the fourth value is the number
of degrees to rotate. In this example the model is rotated 30 degrees
around the y-axis.
View this model with the command
off_color -r A0.2,f ant4 > orig.off off_trans -R 0,1,0,30 ant4 | antiview -C 0,0,0 - orig.off
|
|
|
|
|
Rotate 4 O
|
Med
Lrg
|
Description :
|
The -R option specifies a rotation about the origin. If the argument is
four values this is a rotation about a single axis. The first three values
are a vector giving the direction of the axis, the fourth value is the number
of degrees to rotate. In this example the model is rotated 30 degrees
around an axis in the direction (1, 1, 0); halfway between the x and y axes.
View this model with the command
off_color -r A0.2,f ant4 > orig.off off_trans -R 1,1,0,30 ant4 | antiview -C 0,0,0 - orig.off
|
|
|
|
|
Rotate 6 O
|
Med
Lrg
|
Description :
|
The -R option specifies a rotation about the origin. If the argument is
six values this is a rotation of a 'from' vector (the first three numbers)
onto a 'to' vector (the second set of three numbers) about a axis
perpendicular to the two vectors. In this example aligning a vertex
of a cube with the z-axis the rotations does not nicely align the
cube with the x and y axes, for that see the 12 parameter rotation.
View this model with the command
off_trans -R 1,1,1,0,0,1 cube | antiview
|
|
|
|
|
Rotate 12 O
|
Med
Lrg
|
Description :
|
The -R option specifies a rotation about the origin. If the argument is
12 values this is a rotation that carries two 'from'
vectors (the first and second set of three numbers), onto two
'to' vectors (the third and fourth set of three numbers). It may not be
possible
to align the second 'from' vector with the second 'to' vector,
in which case the second 'from' vector will be carried to lie in
the plane of the two 'to' vectors. In this example the cube has a
vertex aligned with the z-axis, and a second vertex aligned in the
zx-plane.
View this model with the command
off_trans -R 1,1,1,1,1,-1,0,0,1,1,0,0 cube | antiview
|
|
|
|
|
Rotate 3 Pt
|
Med
Lrg
|
Description :
|
The -R option specifies a rotation about the origin.
To rotate about a point that isn't the origin: translate by
the negative of the coordinates of the point, then rotate, then
translate by coordinates of the point. In this example the model
is rotated about an axis through the point (1,0,0).
View this model with the command
off_color -r A0.2,f ant4 > orig.off off_trans -T -1,0,0 -R 0,0.01,-10 -T 1,0,0 ant4 | antiview -C 0,0,0 - orig.off
|
|
|
|
|
Scale 1 O
|
Med
Lrg
|
Description :
|
The -S otion specifies a scaling, while fixing the origin.
If the argument is one value the scaling will be by this value
in all directions.
View this model with the command
off_color -r A0.2,f ant4 > orig.off off_trans -S 0.8 ant4 | antiview -C 0,0,0 - orig.off
|
|
|
|
|
Scale 3 O
|
Med
Lrg
|
Description :
|
The -S otion specifies a scaling, while fixing the origin.
If the argument is
three values these are the factors to scale in the x, y and z directions.
View this model with the command
off_color -r A0.2,f ant4 > orig.off off_trans -S 1.5,0.7,0.5 ant4 | antiview -C 0,0,0 - orig.off
|
|
|
|
|
Mirror 3 O
|
Med
Lrg
|
Description :
|
The -M option specifies a reflection in a plane passing through the origin.
The argument is three values, which specify a vector normal to the plane.
View this model with the command
off_color -r A0.2,f ant4 > orig.off off_trans -M 1,0,0.0001 ant4 | antiview -C 0,0,0 - orig.off
|
|
|
|
|
Mirror 3 Pt
|
Med
Lrg
|
Description :
|
The -M option specifies a reflection in a plane passing through the origin.
To reflect in a plane that doesn't pass through the origin: translate by
the negative of the coordinates of a point on the plane, then mirror
in the required direction, then
translate by the coordinates of the point. In this example the model
is reflected in a plane through the point (0.2,0,0).
View this model with the command
off_color -r A0.2,f ant4 > orig.off off_trans -T -0.2,0,0 -M 1,0,0.0001 -T 0.2,0,0 ant4 | antiview -C 0,0,0 - orig.off
|
|
|
|
|
Inversion O
|
Med
Lrg
|
Description :
|
The -I option specifies reflection, or inversion, in the origin.
It turns coordinates into their negatives.
View this model with the command
off_color -r A0.2,f J33 > orig.off off_trans -I J33 | antiview -C 0,0,0 - orig.off
|
|
|
|
|
Inversion Pt
|
Med
Lrg
|
Description :
|
The -I option specifies reflection, or inversion, in the origin.
To produce a reflection (inversion) in a point other than the origin:
translate by the negative of the coordinates of the point, then reflect in
the origin, then
translate by the coordinates of the point. In this example the model
is reflected in the point (0.2,0,0).
View this model with the command
off_color -r A0.2,f J33 > orig.off off_trans -T -0.2,0,0 -I -T 0.2,0,0 J33 | antiview -C 0,0,0 - orig.off
|
|
|
|
|
|
|
|
|
Home
|
Programs
|
Examples
|
Album
|
Download
|
Development
|
Forum
|
About
|