| Author |
Comment/Response |
Jeff
|
08/24/09 12:51pm
Here is a question:
The code below displays 10 arrows in 3D space.
By mouse I can rotate the box that the arrows are in, but the arrowheads themselves will not rotate! Its like they are compass needles always pointing in the same direction. Can this be fixed?
Execute, rotate and see:
arrowPositions = {{-5.00000000000000, -5.00000000000000,
4.00000000000000}, {-5.00000000000000, -5.00000000000000,
6.00000000000000}, {-5.00000000000000, -5.00000000000000,
8.00000000000000}, {-5.00000000000000, -3.00000000000000,
4.00000000000000}, {-5.00000000000000, -3.00000000000000,
6.00000000000000}, {-5.00000000000000, -3.00000000000000,
8.00000000000000}, {-5.00000000000000, -1.00000000000000,
4.00000000000000}, {-5.00000000000000, -1.00000000000000,
6.00000000000000}, {-5.00000000000000, -1.00000000000000,
8.00000000000000}, {-5.00000000000000, 1.00000000000000,
4.00000000000000}};
arrow[\[Theta]_, \[Phi]_] :=
Graphics3D[
Rotate[Rotate[{Hue[.4], Arrowheads[.2],
Arrow[Tube[{{0, 0, 0}, { Cos[0] Sin[0], Sin[0] Sin[0], Cos[0]}},
Scaled[0.008]]]}, \[Theta], {1, 0, 0}], \[Phi], {0, 0, 1}],
Boxed -> False, ImageSize -> 100, Axes -> False,
PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}}]
allArrows =
Table[Text[arrow[Pi/i, Pi/i], arrowPositions[[i]]], {i, 1, 10}];
Show[Graphics3D[allArrows], Axes -> True, AxesLabel -> {"x", "y"},
PlotLabel -> "Custom Markers", Background -> White, AspectRatio -> 1]
URL: , |
|