For example:
How can I draw such kinds of coordinates?
Thank you~
Answer
You build this in Mathematica like you would do in any other descriptive language (you might want to use TikZ for this): step by step. Choosing nicer colors,adjusting the distances etc. is left as an exercise to the reader.
cosy[labels_, labelstyle_] := Flatten@{
Arrow[{{0, 0, 0}, {1, 0, 0}}],
Arrow[{{0, 0, 0}, {0, 1, 0}}],
Arrow[{{0, 0, 0}, {0, 0, 1}}],
labelstyle,
Text[labels[[1]], {1.1, 0, 0}],
Text[labels[[2]], {0, 1.1, 0}],
Text[labels[[3]], {0, 0, 1.1}]
};
Graphics3D[{
{ (* Coordinate system 1 *)
cosy[{"X", "Y", "Z"}, Darker@Orange],
Darker@Orange,
Text["World", {-.3, -.3, .5}]
},
{ (* Coordinate system 2 *)
Rotate[cosy[{"x", "y", "z"}, Blue], -30 \[Degree], {-1, 0, 1}]~
Translate~{0, 0, -2}
},
{ (* Connecting arrow *)
Darker@Green,
Arrow[{{0, 0, 0}, {0, 0, -2}}],
Text["C(t)", {0, -.2, -1}]
},
{ (* Red stuff *)
Red,
Arrow[{{0, 0, 0}, {0, 3, -1}}],
Arrow[{{0, 0, -2}, {0, 3, -1}}],
Text["\!\(\*SubscriptBox[\(p\), \(world\)]\)",
1/2 {0, 3, -1} + {0, 0, .5}],
Text["\!\(\*SubscriptBox[\(p\), \(0\)]\)",
1/2 {0, 3, -1} + {0, 0, -1.5}],
Text["p(t)", {0, 3, -1} + {0, .5, 0}]
}
}, Boxed -> False]
Comments
Post a Comment