cfehring
(Colby Fehring)
1
Manipulate[p1 = {1, 4, 7 + a}, {a, 0, 5}]
p2 = {1, 3, 3};
p3 = {0, 4, 6};
p1p2Vector = p2 - p1;
p1p3Vector = p3 - p1;
points = Graphics3D[{PointSize[Large], Point[{p1, p2, p3}]}];
p1p2VectorG = Graphics3D[{Red, Arrow[{p1, p1 + p1p2Vector}]}];
p1p3VectorG = Graphics3D[{Blue, Arrow[{p1, p1 + p1p3Vector}]}];
Show[points, p1p2VectorG, p1p3VectorG]
I am trying to figureout how to update the Show command after I have manipulated my program. Please keep in mind I am new to Mathematica.
nma
(Nasser M. Abbasi)
2
The layout for Manipulate is this: Manipulate[code;code; someOutput, slider1,slider2,slider3]
So you need to put the final output inside Manipulate, not outside. Like this
Manipulate[
p2 = {1, 3, 3};
p3 = {0, 4, 6};
p1p2Vector = p2 - p1;
p1p3Vector = p3 - p1;
points = Graphics3D[{PointSize[Large], Point[{p1, p2, p3}]}];
p1p2VectorG = Graphics3D[{Red, Arrow[{p1, p1 + p1p2Vector}]}];
p1p3VectorG = Graphics3D[{Blue, Arrow[{p1, p1 + p1p3Vector}]}];
p1 = {1, 4, 7 + a};
Show[points, p1p2VectorG, p1p3VectorG]
, {a, 0, 5}]

cfehring
(Colby Fehring)
3
Thanks! This had me stumped for a few hours. 