ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/rmtxop.1
(Generate patch)

Comparing ray/doc/man/man1/rmtxop.1 (file contents):
Revision 1.15 by greg, Mon Aug 12 16:55:24 2019 UTC vs.
Revision 1.16 by greg, Mon Aug 12 17:14:40 2019 UTC

# Line 96 | Line 96 | options are mutually exclusive, insofar as they cannot
96   to the same input matrix.
97   .PP
98   If present, the second and subsequent matrices on the command
99 < line are concatenated to the result, unless separated by a plus ('+'),
99 > line are concatenated together, unless separated by a plus ('+'),
100   asterisk ('*'), or forward slash ('/') symbol,
101   in which case the individual matrix elements are added,
102 < multiplied, or divided together, respectively.
103 < (Note that the asterisk must be quoted or escaped in most shells.)\0
102 > multiplied, or divided, respectively.
103 > The concatenation operator ('.') is the default and need not be specified.
104 > Note also that the asterisk must be quoted or escaped in most shells.
105   In the case of addition, the two matrices involved must have the same number
106   of components.
107   If subtraction is desired, use addition ('+') with a scaling parameter of -1
# Line 114 | Line 115 | If element-wise division is specified, any zero elemen
115   matrix will result in a warning and the corresponding component(s) in the
116   first matrix will be set to zero.
117   .PP
118 + Evaluation proceeds from left to right, and all operations have
119 + the same precedence.
120 + If a different evaluation order is desired, pipe the result of one
121 + .I rmtxop
122 + command into another, as shown in one of the examples below.
123 + .PP
124   The number of components in the new matrix after applying any
125   .I -c
126   transform must agree with the prior result.
# Line 159 | Line 166 | To convert a BTDF matrix into a Radiance picture:
166   .IP "" .2i
167   rmtxop -fc blinds.xml > blinds.hdr
168   .PP
169 + To extract the luminance values from a picture as an ASCII matrix:
170 + .IP "" .2i
171 + rmtxop -fa -c .265 .670 .065 image.hdr > image_lum.mtx
172 + .PP
173   To scale a matrix by 4 and add it to the transpose of another matrix:
174   .IP "" .2i
175 < rmtxop -s 4 left.mtx + -t right.mtx > result.mtx
175 > rmtxop -s 4 first.mtx + -t second.mtx > result.mtx
176   .PP
177 + To multiply elements of two matrices, then concatenate with a third,
178 + applying a final transpose to the result:
179 + .IP "" .2i
180 + rmtxop first.mtx \\* second.mtx . third.mtx -t > result.mtx
181 + .PP
182   To left-multiply the element-wise division of two matrices:
183   .IP "" .2i
184   rmtxop -fd numerator.mtx / denominator.mtx | rmtxop left.mtx - > result.mtx
# Line 173 | Line 189 | for further processing:
189   .IP "" .2i
190   rmtxop -fa orig.mtx | rcollate -ho -oc 1 | rcalc [operations]
191   .SH NOTES
192 < Matrix multiplication is associative but not commutative, so order
192 > Matrix concatenation is associative but not commutative, so order
193   matters to the result.
194   .I Rmtxop
195 < takes advantage of the associative property to evaluate the
196 < implicit equation from right to left when this reduces the
181 < number of basic operations.
195 > takes advantage of this associative property to concatenate
196 > from right to left when it reduces the number of basic operations.
197   If the rightmost matrix is a column vector for example, it is
198 < much faster to concatenate from the right, and the result should
198 > much faster to concatenate from the right, and the result will
199   be the same.
200 < This only applies to matrix multiplication.
201 < Element-wise addition, multiplication, and division are still
200 > Note that this only applies to concatenation;
201 > element-wise addition, multiplication, and division are always
202   evaluated from left to right.
203   .SH AUTHOR
204   Greg Ward

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines