S.Mustonen (1993)
1 *SAVE KUUTIO4 / 4-ulotteisen kuution 2-ulotteiset projektiot 2 *Hamiltonin reitti 4-ulotteisessa kuutiossa: 3 *MATRIX H /// 4 *0 0 0 0 5 *0 0 0 1 6 *0 0 1 1 7 *0 0 1 0 8 *0 0 0 0 9 *0 1 0 0 10 *0 1 0 1 11 *0 1 1 1 12 *0 1 1 0 13 *0 1 0 0 14 *1 1 0 0 15 *1 1 0 1 16 *0 1 0 1 17 *0 0 0 1 18 *1 0 0 1 19 *1 1 0 1 20 *1 1 1 1 21 *0 1 1 1 22 *0 0 1 1 23 *1 0 1 1 24 *1 0 0 1 25 *1 0 0 0 26 *1 1 0 0 27 *1 1 1 0 28 *0 1 1 0 29 *0 0 1 0 30 *1 0 1 0 31 *1 0 1 1 32 *1 1 1 1 33 *1 1 1 0 34 *1 0 1 0 35 *1 0 0 0 36 *0 0 0 0 37 * 38 *MAT SAVE H
39 *MAT TRANSFORM H BY X#-0.5
/ Keskistys (0,1) -> (-0.5,0.5) 40 *MAT CLABELS "X" TO H
/ Sarakeotsikot X1,X2,X3,X4 41 * 42 *MAT T=ZER(4,4)
43 *MAT TRANSFORM T BY sin(31*I#*J#)
/ "Mielivaltainen" T 44 * 45 *MAT GRAM-SCHMIDT DECOMPOSITION OF T TO Q,R
/ T:n ortogonalisointi 46 *MAT K=H*Q
/ Neliulotteisen kuution kierto 47 *MAT CLABELS "dim" TO K
/ Sarakeotsikot dim1,dim2,dim3,dim4 48 * 49 *MAT KB=ZER(33,8)
50 *MAT KB(1,1)=K
51 *MAT KB(1,5)=H
52 * 53 *....................................................................... 54 *Piirtäminen: (valkoista mustalle) 55 *SIZE=1000,1000 SCALE=-1,1 HEADER= XDIV=0,1,0 YDIV=0,1,0 FRAME=3 56 *FRAMES=F F=0,0,1000,1000,9 LINETYPE=[WHITE] PEN=[WHITE][SwissB(16)] 57 *XLABEL= YLABEL= LINE=[line_type(6)][line_width(0.5)],1 TEXTS=T 58 * 59 *PLOT KB.MAT,dim1,dim2
/ DEVICE=PS,A12.PS T=1_-_2,800,50 60 *PLOT KB.MAT,dim1,dim3
/ DEVICE=PS,A13.PS T=1_-_3,800,50 61 *PLOT KB.MAT,dim1,dim4
/ DEVICE=PS,A14.PS T=1_-_4,800,50 62 *PLOT KB.MAT,dim2,dim3
/ DEVICE=PS,A23.PS T=2_-_3,800,50 63 *PLOT KB.MAT,dim2,dim4
/ DEVICE=PS,A24.PS T=2_-_4,800,50 64 *PLOT KB.MAT,dim3,dim4
/ DEVICE=PS,A34.PS T=3_-_4,800,50 65 *....................................................................... 66 *SIZE=1000,1000 SCALE=-1,1 HEADER= XDIV=0,1,0 YDIV=0,1,0 FRAME=0 67 *XLABEL= YLABEL= 68 *LINETYPE=[WHITE] *ohut=[line_width(1)],1 *paksu=[line_width(2)],1 69 *PLOT KB.MAT,dim1,dim2
/ DEVICE=PS,B12.PS IND=X1,-0.5 LINE=*ohut 70 *PLOT KB.MAT,dim1,dim2
/ DEVICE=PS,C12.PS IND=X1,0.5 LINE=*paksu 71 *PLOT KB.MAT,dim1,dim3
/ DEVICE=PS,B13.PS IND=X1,-0.5 LINE=*ohut 72 *PLOT KB.MAT,dim1,dim3
/ DEVICE=PS,C13.PS IND=X1,0.5 LINE=*paksu 73 *PLOT KB.MAT,dim1,dim4
/ DEVICE=PS,B14.PS IND=X1,-0.5 LINE=*ohut 74 *PLOT KB.MAT,dim1,dim4
/ DEVICE=PS,C14.PS IND=X1,0.5 LINE=*paksu 75 *PLOT KB.MAT,dim2,dim3
/ DEVICE=PS,B23.PS IND=X1,-0.5 LINE=*ohut 76 *PLOT KB.MAT,dim2,dim3
/ DEVICE=PS,C23.PS IND=X1,0.5 LINE=*paksu 77 *PLOT KB.MAT,dim2,dim4
/ DEVICE=PS,B24.PS IND=X1,-0.5 LINE=*ohut 78 *PLOT KB.MAT,dim2,dim4
/ DEVICE=PS,C24.PS IND=X1,0.5 LINE=*paksu 79 *PLOT KB.MAT,dim3,dim4
/ DEVICE=PS,B34.PS IND=X1,-0.5 LINE=*ohut 80 *PLOT KB.MAT,dim3,dim4
/ DEVICE=PS,C34.PS IND=X1,0.5 LINE=*paksu 81 * 82 *EPS JOIN K12,A12,B12,C12
83 *EPS JOIN K13,A13,B13,C13
84 *EPS JOIN K14,A14,B14,C14
85 *EPS JOIN K23,A23,B23,C23
86 *EPS JOIN K24,A24,B24,C24
87 *EPS JOIN K34,A34,B34,C34
88 * 89 *K12=K12,0,2000 90 *K13=K13,0,1000 K23=K23,1000,1000 91 *K14=K14 K24=K24,1000,0 K34=K34,2000,0 92 * 93 *EPS JOIN KUUTIO4,K12,K13,K14,K23,K24,K34
94 * 95 * 96 *PRINT CUR+1,E
97 - picture KUUTIO4.PS,200,200,0.5,0.5 98 E 99 * 100 *
Hakemisto | Kuvasto | Edellinen | Seuraava