load (draw); load(vector_rebuild); listarith : true; domxmxops: true; A : [1,1,1]; netzberechnen(a) := block ([], n : [a,2,3], u1 : [n[2], -n[1], 0], u2 : [0, n[3], -n[2]], u3 : [n[1], 0, -n[3]], u : u1, v : u2, if (u1 = [0,0,0]) then ( u : u2, v : u3 ), if (u2 = [0,0,0]) then ( u : u1, v : u3 ), if (u3 = [0,0,0]) then ( u : u1, v : u2 ), /* Länge der Richtungsvektoren */ u : u * (6 / (sqrt (u.u))), v : v * (6 / (sqrt (v.v))), array(P, 4, 4), for i : 0 while i < 4 do ( for k : 0 while k < 4 do ( P[i+1, k+1] : A + i * u + k * v ) ), array(t, 4), graphlist : [], for i : 1 while i <= 3 do ( tmplist: [], for k : 1 while k <= 3 do tmplist : append (tmplist, [P[i, k]]), graphlist : append (graphlist, [points (tmplist)]) ), for i : 1 while i <= 3 do ( tmplist: [], for k : 1 while k <= 3 do tmplist : append (tmplist, [P[k, i]]), graphlist : append (graphlist, [points (tmplist)]) ), graphlist : append (graphlist, [vector (A, n)]), graphlist : append (graphlist, [vector (A, n)]), tmptxt : concat ("a=", a), graphlist : append (graphlist, [label ([tmptxt, 8, 15, 4]) ]), graphlist : append (graphlist, [label (["n", n[1], n[2], n[3]]) ]) ); bilderstellen() := block ([], [gr3d( xrange = [0,30], yrange = [-20,20], zrange = [-10,15], points_joined = true, point_size = 0, color = black, head_length = 0.4, line_width = 2, vector ([0,0,0], A), color = blue, vector (A, u), color = green, vector (A, v), color = black, line_width = 1, head_length = 0.5, font_size = 25, label (["A", A[1] - 3, A[2], A[3]]), graphlist )] ); bildliste : []; for i : 0 step 4 while i <= 32 do block ([], netzberechnen (i), bild : bilderstellen (), bildliste : append (bildliste, bild) ); graphlist; bildliste; draw ( dimensions = [400,400], bildliste, file_name = "ebene1", delay = 100, terminal = 'animated_gif );