restart; with(linalg): with(plots): # Warning, the protected names norm and trace have been redefined and unprotected # Warning, the name changecoords has been redefined x1:=[0.0,0.0]: x2:=[1.0,1.0]: x3:=[1.0,0.0]: x4:=[0.0,0.5]: x5:=[0.5,0.5]: x6:=[1.0,0.5]: x7:=[0.0,1.0]: x8:=[0.5,1.0]: x9:=[0.5,0.0]: y1:=[0.0,0.0]: y2:=[1.0,1.0]: y3:=[1.0,0.0]: y4:=[0.0,0.5]: y5:=[0.5,0.5]: y6:=[1.0,0.5]: y7:=[0.0,1.0]: y8:=[0.5,1.0]: y9:=[0.5,0.0]: A := matrix(9,9): for i from 1 to 9 do for j from 1 to 9 do A[i,j] := norm(x||i-y||j,2): od: od: p1 := plot([seq(x||i,i=1..9)],style=point,symbol=diamond,symbolsize=24,thickness=5,color=blue,title=sprintf("det(A) = %5f",det(A)),titlefont=[TIMES,BOLD,18]): N := 30: dt := evalf(1/N): for k from 1 to N do x1[1] := x1[1] + dt: x1[2] := (x1[1])^2: x2[1] := x2[1] - dt: x2[2] := sqrt(x2[1]): A := matrix(9,9): for i from 1 to 9 do for j from 1 to 9 do A[i,j] := norm(x||i-y||j,2): od: od: p||(k+1) := plot([seq(x||i,i=1..9)],style=point,symbol=diamond,symbolsize=24,thickness=5,color=blue,title=sprintf("det(A) = %5f",det(A)),titlefont=[TIMES,BOLD,18]): od: #display(seq(p||k,k=1..N+1),insequence=true,axes=none); mcp := display(seq(p||k,k=1..N+1),insequence=true,axes=none): with(Maplets[Elements]): animator := Maplet( [ Plotter[P](mcp, continuous=false), [ Button("play",SetOption(P('play')=true)), Button("stop",SetOption(P('`stop`')=true)), Button("pause",SetOption(P('pause')=true)) ], [ Button("to start",SetOption(P('to_start')=true)), Button("to end",SetOption(P('to_end')=true)) ], [ Button("backwards",SetOption(P('frame_backwards')=true)), Button("forward",SetOption(P('frame_forward')=true)) ], [ "continuous", CheckBox[CONTINUOUS](value=false, onchange=SetOption(target=P, `option`='continuous', Argument(CONTINUOUS))) ], [ "delay", Slider[DELAY](100..500, 200, onchange=SetOption(target=P, `option`='delay', Argument(DELAY))) ], Button("ok",Shutdown()) ]): Maplets:-Display(animator);