2
$\begingroup$

I want to make drawings like these in Mathematica:

sc enter image description here

I don't know if Mathematica is a gppd solution for drawing such images. If it is, please tell me how to do it; if not, please suggest another solution.

$\endgroup$
  • 1
    $\begingroup$ Yes it is possible. Does that answer your question? If not and you want help actually drawing that trying showing what you have tried so far and where you are having trouble. $\endgroup$ – s0rce Oct 20 '13 at 0:33
  • $\begingroup$ @s0rce - I'm making a document with equations and want to draw the two coordinate systems, but I don't know where to start. $\endgroup$ – Kiyoshi Oct 20 '13 at 0:42
  • $\begingroup$ I suggest that you edit the title to something like "how to draw a coordinate system in mathematica", so search engines can index it. $\endgroup$ – stathisk Oct 20 '13 at 10:53
  • $\begingroup$ @Zet - Yes, you're right. $\endgroup$ – Kiyoshi Oct 20 '13 at 11:00
7
$\begingroup$

This may be late but I post for illustration:

orig = {0, 0, 0};
axes = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}};
pt = {0.5, 0.5, 0.5};
arc1 = Table[
   RotationMatrix[j, {0, 0, 1}].{0.5, 0, 0}, {j, 0, Pi/4, 0.01}];
ang = VectorAngle[{0, 0, 1}, {1, 1, 1}];
axis = Cross[{0, 0, 1}, {1, 1, 1}];
arc2 = Table[RotationMatrix[j, axis].{0, 0, 0.5}, {j, 0, ang, 0.01}];
labels = {
  Text[Style["\[Theta]", 12], RotationMatrix[ang/2, axis].{0, 0, 0.6}],
  Text[Style["\[Phi]", 12], 
   RotationMatrix[Pi/8, {0, 0, 1}].{0.6, 0, 0}],
  Text[Style[TraditionalForm["r"], 12], (orig + pt)/2 + {0, 0, -0.05}],
  Text[Style["P", Italic, 12], 1.1 pt],
  Text[Column[{"(x,y,z)", "(r,\[Theta],\[Phi])"}], 
   1.2 pt - {0, 0, 0.1}],
  MapThread[
   Text[#1, #2] &, {Style[#, 12] & /@ {"x", "y", "z"}, 1.1 axes}]
  }

Assembling into graphic object:

Graphics3D[{Arrow[{orig, #}] & /@ axes, {Red, Arrow[{orig, pt}]}, 
  Line[{orig, {0.5, 0.5, 0}}], Line[{{0.5, 0.5, 0}, {0.5, 0.5, 0.5}}],
   Line[arc1], 
  Line[arc2], {Opacity[0.2], 
   Polygon[{orig, {1, 0, 0}, {1, 0, 1}, {0, 0, 1}}]}, {Opacity[0.2], 
   Polygon[{orig, {0, 1, 0}, {0, 1, 1}, {0, 0, 1}}]}, labels}, 
 Boxed -> False]

Does not have all elements (left brace, shading of planes, z on vertical drop) but illustrative. enter image description here

$\endgroup$
2
$\begingroup$

Bit of manual, but can be a staring point, Arc3D function from How to draw an ellipse arc in 3D?:

Graphics3D[{Arrow[{{0, 0, 0}, #} & /@ {{0, 0, 1}, {0, 1, 0}, {1, 0, 0}}], 
 {Dashed, Line[{{.6, 0, 0}, {.6, .6, 0}}]}, 
 Arc3D[{{.3, 0, 0}, {.3, .3, 0}, {0, 0, 0}}, 30],
 Line[{{.6, .6, 0}, {.6, .6, .6}}],
 {PointSize[Medium], Point[{.6, .6, .6}]},
 Line[{{0, 0, 0}, {.6, .6, 0}}],
 Text[Style["O", Italic, Bold, 13], {0, 0, 0}, {2, -1}],
 Text[Style["x", Italic, Bold, 12], {1, 0, 0}, {-3, 0}],
 Text[Style["y", Italic, Bold, 12], {0, 1, 0}, {-2, 0}],
 Text[Style["z", Italic, Bold, 12], {0, 0, 1}, {-3, 1}]},
 Boxed -> False, PlotRangePadding -> .1]
$\endgroup$
  • $\begingroup$ +1, but you're missing a } at the end. $\endgroup$ – C. E. Oct 20 '13 at 6:26
  • $\begingroup$ @halmir - Thank you! $\endgroup$ – Kiyoshi Oct 20 '13 at 8:53
  • $\begingroup$ @Anon thanks, I fixed it. $\endgroup$ – halmir Oct 20 '13 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.