Advertisement

reflections

Started by September 16, 2000 01:30 PM
0 comments, last by Bino 24 years, 3 months ago
Can someone tell me how to put this algorithm "F = R(n,(0,1,0))T(-p)" into code? Oh, yeah the F stands for the whole operation, the R is for the rotation matrix, the n is for the normal of the reflector plane, and the T is the tranlslation matrix. Thanks, Bino Edited by - Bino on 9/16/00 1:48:31 PM
T(-p): T is a function that depends on p, it being the independent variable in the function... So the value for T(p) depends on p. Now, in order to reflect a function, you need to negate the dependent variable. That makes it flip on the other side of the y-axis. T(p) is the original function, and T(-p) is the reflection of the function. Now, to translate that into code, just replace the "x" value before you do any calculations, to "-x", and it should work. Hope this helps.

-------------------------------
That's just my 200 bucks' worth!

..-=gLaDiAtOr=-..

This topic is closed to new replies.

Advertisement