!Heart Magic DEF i(x)=x^2-x DEF j(x)=-x^2-x DEF k(x)=-x^2+1/2*x+1 DEF l(x)=-x^2-1/2*x+1 DEF m(y)=y^2-y DEF n(y)=y^2+1/2*y-1 DEF o(y)=y^2-1/2*y-1 DEF p(y)=-y^2+1/2*y+1 DIM A(4,4),B(4,4),C(4,4),D(4,4),E(4,4),F(4,4),G(4,4),H(4,4) MAT READ A DATA 1, 0, 0, 0 DATA 0, 1, 0, 0 DATA 0, 0, 1, 0 DATA 0, 0, 0, 1 MAT READ B DATA -1, 0, 0, 0 DATA 0, 1, 0, 0 DATA 0, 0, 1, 0 DATA 0, 0, 0, 1 MAT READ C DATA -1, 0, 0, 0 DATA 0, -1, 0, 0 DATA 0, 0, 1, 0 DATA 0, 0, 0, 1 MAT READ D DATA 1, 0, 0, 0 DATA 0, -1, 0, 0 DATA 0, 0, 1, 0 DATA 0, 0, 0, 1 MAT READ E DATA 0, 1, 0, 0 DATA -1, 0, 0, 0 DATA 0, 0, 1, 0 DATA 0, 0, 0, 1 MAT READ F DATA 0, 1, 0, 0 DATA 1, 0, 0, 0 DATA 0, 0, 1, 0 DATA 0, 0, 0, 1 MAT READ G DATA 0, -1, 0, 0 DATA 1, 0, 0, 0 DATA 0, 0, 1, 0 DATA 0, 0, 0, 1 MAT READ H DATA 0, -1, 0, 0 DATA -1, 0, 0, 0 DATA 0, 0, 1, 0 DATA 0, 0, 0, 1 SET WINDOW -9.2,9.2,-9.2,9.2 FOR Q=6.9 TO 0 STEP -0.01 SET DRAW mode hidden CLEAR DRAW s WITH H*SHIFT(0,Q) DRAW s WITH F*SHIFT(0,-Q) DRAW s WITH B*SHIFT(Q,0) DRAW s WITH D*SHIFT(-Q,0) DRAW s WITH A*SHIFT(Q,-Q) DRAW s WITH C*SHIFT(-Q,Q) DRAW s WITH E*SHIFT(Q,Q) DRAW s WITH G*SHIFT(-Q,-Q) WAIT DELAY 0.01 SET DRAW mode explicit NEXT Q WAIT DELAY 8 FOR Q=0 TO 6.9 STEP 0.01 SET DRAW mode hidden CLEAR DRAW t WITH A*SHIFT(-Q,Q) DRAW t WITH C*SHIFT(-Q/3,Q) DRAW t WITH F*SHIFT(Q/3,Q) DRAW t WITH H*SHIFT(Q,Q) DRAW u WITH A*SHIFT(-Q,Q/3) DRAW u WITH C*SHIFT(-Q/3,Q/3) DRAW u WITH E*SHIFT(Q/3,Q/3) DRAW u WITH B*SHIFT(Q,Q/3) DRAW v WITH A*SHIFT(-Q,-Q/3) DRAW v WITH C*SHIFT(-Q/3,-Q/3) DRAW v WITH E*SHIFT(Q/3,-Q/3) DRAW v WITH G*SHIFT(Q,-Q/3) DRAW v WITH H*SHIFT(-Q,-Q) DRAW v WITH F*SHIFT(-Q/3,-Q) DRAW v WITH B*SHIFT(Q/3,-Q) DRAW v WITH D*SHIFT(Q,-Q) WAIT DELAY 0.01 SET DRAW mode explicit NEXT Q PICTURE t FOR x=-1 TO 1 STEP 0.01 PLOT LINES: x,i(ABS(x)); NEXT x FOR y=0 TO (1+SQR(17))/4 STEP 0.01 PLOT LINES: p(y),y; NEXT y PLOT LINES FOR y=(1+SQR(17))/4 TO 0 STEP -0.01 PLOT LINES: o(y),y; NEXT y END PICTURE PICTURE u FOR x=-1 TO 0 STEP 0.01 PLOT LINES: x,j(x); NEXT x FOR y=0 TO 1 STEP 0.01 PLOT LINES: m(y),y; NEXT y FOR x=0 TO 2 STEP 0.01 PLOT LINES: x,k(x); NEXT x FOR y=-2 TO 0 STEP 0.01 PLOT LINES: n(y),y; NEXT y END PICTURE PICTURE v FOR y=-2 TO 1 STEP 0.01 PLOT LINES: -i(ABS(y)), y; NEXT y FOR x=0 TO -2 STEP -0.01 PLOT LINES: x, l(x); NEXT x END PICTURE PICTURE s FOR y=-2 TO 1 STEP 0.01 PLOT LINES: -i(ABS(y)), y; NEXT y FOR x=0 TO -2 STEP -0.01 PLOT LINES: x, l(x); NEXT x FOR x=-2 TO 2 STEP 0.01 PLOT LINES: x, SGN(x)*i(ABS(x)); NEXT x END PICTURE END
|