Programming and Graphics

(Kiana) #1

116 Introduction to C++ Programming and Graphics


A typical session is:


Normalize the vector after each projection?
Enter 1 for yes, 0 for no


1
Matrix - initial vector:


1 -2 3 1.2 2.6 0.1
-4 2 -3 8.9 -5.9 0.4
3 -3 3 -2.7 0.1 -0.2
1.2 8.9 -2.7 3.2 1.3 -0.1
2.6 -5.9 0.1 1.3 -0.2 -2.9

Projected vector at stage: 0
-0.45848
0.88114
-0.077777
0.006652
-0.085453
One more projection?
1
Projected vector at stage: 1
-0.22529
0.3709
-0.36126
0.62582
-0.53807
One more projection?
1
Projected vector at stage: 2
-0.19481
0.828
-0.33318
0.38323
-0.13635
One more projection?
1
Projected vector at stage: 3
-0.1947
0.54262
-0.3629
0.64434
-0.34753
One more projection?
1
Projected vector at stage: 4
-0.1737
0.74636

Free download pdf