Revision 3695d6fa
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/library/DistortedObject.java | ||
---|---|---|
821 | 821 |
* second is the wave length, third is the offset (i.e. when offset = PI/2, the sine |
822 | 822 |
* wave at the center does not start from sin(0), but from sin(PI/2) ) and the next two |
823 | 823 |
* describe the 'direction' of the wave. |
824 |
* <p> |
|
824 | 825 |
* Wave direction is defined to be a 3D vector of length 1. To define such vectors, we |
825 | 826 |
* need 2 floats: thus the third member is the angle Alpha (in degrees) which the vector |
826 | 827 |
* forms with the XY-plane, and the fourth is the angle Beta (again in degrees) which |
827 | 828 |
* the projection of the vector to the XY-plane forms with the Y-axis (counterclockwise). |
828 |
* |
|
829 |
* <p> |
|
830 |
* <p> |
|
829 | 831 |
* Example1: if Alpha = 90, Beta = 90, (then V=(0,0,1) ) and the wave acts 'vertically' |
830 | 832 |
* in the X-direction, i.e. cross-sections of the resulting surface with the XZ-plane |
831 | 833 |
* will be sine shapes. |
834 |
* <p> |
|
832 | 835 |
* Example2: if Alpha = 90, Beta = 0, the again V=(0,0,1) and the wave is 'vertical', |
833 | 836 |
* but this time it waves in the Y-direction, i.e. cross sections of the surface and the |
834 | 837 |
* YZ-plane with be sine shapes. |
838 |
* <p> |
|
835 | 839 |
* Example3: if Alpha = 0 and Beta = 45, then V=(sqrt(2)/2, -sqrt(2)/2, 0) and the wave |
836 | 840 |
* is entirely 'horizontal' and moves point (x,y,0) in direction V by whatever is the |
837 | 841 |
* value if sin at this point. |
Also available in: Unified diff
Comments