# Combining graphics with manipulate

For the code below, I am trying to make it such that when I go through $$\alpha$$ values, the plot updates. However, currently, it just plots with a stagnant $$\alpha$$ value with no updating. When I try to redefine everything in terms of a function of $$\alpha$$, mathematica tells me that I cannot use graphics and define variables. For instance, I cannot write plotcoordinates[$$\alpha$$] due to the limitations of graphics. How can I get around this to have the plot update as I wish in the slide bar?

plotcoordinates =
Graphics3D[{Arrow[{{0, 0, 0}, {0, 1, 0}}],
Arrow[{{0, 0, 0}, {1, 0, 0}}],
Arrow[{{0, 0, 0}, {0, 0, 1}}], {Dashed,
Arrow[{{0, 0, 0}, {x1, x2, x3}}]}, {Dashed,
Arrow[{{0, 0, 0}, {0, 1, 0}}]}, {Dashed,
Arrow[{{0, 0, 0}, {0, 0, 1}}]}}, Boxed -> False];

Voriginal = {1, 0, 0};
Rz = {{Cos[\[Alpha]], -Sin[\[Alpha]], 0}, {Sin[\[Alpha]],
Cos[\[Alpha]], 0}, {0, 0, 1}};

Vector = Rz.Voriginal;
x1 = Vector[[1]];
x2 = Vector[[2]];
x3 = Vector[[3]];

Manipulate[plotcoordinates, {\[Alpha], 0, 2 \[Pi],
Appearance -> "Labeled"}]


If I understood correctly the following is what you want to see

The code:

Voriginal = {1, 0, 0};
Rz = {{Cos[a], -Sin[a], 0}, {Sin[a], Cos[a], 0}, {0, 0, 1}};
Vector = Rz . Voriginal;
x1 = Vector[[1]];
x2 = Vector[[2]];
x3 = Vector[[3]];
plotcoordinates =
Graphics3D[
{Arrow[{{0, 0, 0}, {0, 1, 0}}],
Arrow[{{0, 0, 0}, {1, 0, 0}}],
Arrow[{{0, 0, 0}, {0, 0, 1}}],
{Dashed, Arrow[{{0, 0, 0}, {x1, x2, x3}}]},
{Dashed, Arrow[{{0, 0, 0}, {0, 1, 0}}]},
{Dashed, Arrow[{{0, 0, 0}, {0, 0, 1}}]}},
Boxed -> False];
Manipulate[
Evaluate[plotcoordinates], {a, 0, 2 π, Appearance -> "Labeled"}]

• thank you SO much Commented Feb 14, 2023 at 9:55
• @Relativisticcucumber glad I was able to help :)
– bmf
Commented Feb 14, 2023 at 9:56