Hello I wrote some code to calculate and demonstrate robotic like vectors. My functions allow to add vectors and links (changes from coordinate systems from elements) . So I can define the System with Rotation Matrices and vectors and creates a list of Vectors, dependend the los current angeles of the rotations.
data = {};
angles = {};
Move[vec_] := Module[{},
(*Move existing vectors to new Position*)
move[dat_] := {dat[[1]] + vec, dat[[2]] + vec };
For[i = 1, i <= Length[data], i++, data[[i]] = move[data[[i]]] ];
(*Print["moved: ",data//MatrixForm];*)
]
AddVector[vec_] := AppendTo[data, {{0, 0, 0}, vec}];
AddLink[vec_, rot_, angle_] := Module[{},
AddRot[rot, angle];
Move[vec];
AddVector[vec];
];
AddRot[rot_, angle_] := Module[{},
AppendTo[angles, angle];
(*Print[data//MatrixForm];*)
AddVector[{0.1, 0, 0}];
AddVector[{0, 0.1, 0}];
AddVector[{0, 0, 0.1}];
(*Print[data//MatrixForm];*)
(*Alle vektoren im K-System rotieren*)
(*Print["Rotating Vectors"];*)
conv[dat_] := {rot[angle].(dat[[1]]), rot[angle].(dat[[2]]) };
For[i = 1, i <= Length[data], i++, data[[i]] = conv[data[[i]]] ];
(*Print["rotated: ",data//MatrixForm];*)
];
ShowAll[] := Module[{},
arrows = Arrow[data];
region =
Point[{{0, 0, 2}, {0, 0, -2}, {0, 2, 0}, {2, 0, 0}, {0, -2,
0}, {-2, 0, 0}}];
Print[Graphics3D[{arrows, region}, Axes -> True, ViewPoint -> Front]]
]
Ri1[q1_] := ( {
{Cos[q1], 0, -Sin[q1]},
{0, 1, 0},
{Sin[q1], 0, Cos[q1]}
} );
AddVector[{1, 0, 0}];
AddLink[{1, 1, 1}, Ri1, x];
data // MatrixForm
ShowAll[];
Output:

When I set x to a value, y can display the result en this form:

My problem is, that i dont know how to put the system to the Manipulate function. I tried something like this, but the amount of variables is not defined:
arrows = Arrow[data]
region = Point[{{0, 0, 2}, {0, 0, -2}, {0, 2, 0}, {2, 0, 0}, {0, -2,
0}, {-2, 0, 0}}]
(*parameter = {Graphics3D[{arrows,region}, Axes -> True,ViewPoint\
\[Rule]Front],Axes -> True,ViewPoint\[Rule]Front};
For[i= 1,i<=Length[angles],i++,AppendTo[parameter,{angles[[i]],0,Pi}];\
*)
y = Dynamic[
Graphics3D[{arrows, region}, Axes -> True, ViewPoint -> Front]]
Manipulate[y, {x, 0, Pi}]
Any Ideas how to Manipulate this?