source files: [xc]tfm.[ch]
SYNTAX
(SEND <tfm> :SHEAR <s10> <s20> <s01> <s21> <s02> <s12> ) (SEND <tfm> :SHEAR-PRE <s10> <s20> <s01> <s21> <s02> <s12> ) (SEND <tfm> :SHEAR-POST <s10> <s20> <s01> <s21> <s02> <s12> )
DESCRIPTION
The shear operation isn't terribly common, in or out of computer graphics. Imagine taking a deck of cards and sliding each card a bit further than the card beneath it, so that when done the ends of the card deck form slanted planes instead of vertical ones. That would be a shear -- the X distance moved by each card is proportional to its Y coordinate.
The parameters to the :SHEAR transform are named above for the matrix positions in which they will be placed. The effect of the individual parameters are as follows:
s10 X shear in proportion to Y coordinate. s20 X shear in proportion to Z coordinate. s01 Y shear in proportion to X coordinate. s21 Y shear in proportion to Z coordinate. s02 Z shear in proportion to X coordinate. s12 Z shear in proportion to Y coordinate.
The first form simply sets transform <tfm> to shear as given.
The second and third forms differ from the first only in that the computed transform, instead of replacing the original one, is pre- or post-multiplied with it to yield the replacement value.
All the numeric parameters may be either fixnums or floats, in any combination.