0
$\begingroup$

I need to plot 6 points in 3D. I used the command 'Plot' but I couldn't draw it.

  1. The coordinates of points $A,A',B,B',C,C',D$ are given.
  2. $AD,BD,CD$ are straight line segments
  3. $AA',BB',CC'$ are arcs with known radius $r$ and centers $c_{0},c_{1},c_{2}$.

enter image description here

The coordinates are

A = {0, 0, 0}; B = {400, 0, 0} C = {200, 400, 200}; D = {226, 137, 62};
Aprime = {22, 36, 0}; Bprime = {382, 33, 0}; Cprime = {240, 357, 200};
c0 = {40, 0, 0}; c1 = {360, 0, 0}; c2 = {200, 360, 200}; 
r = 40;
$\endgroup$
  • 6
    $\begingroup$ Look up Graphics3D[], Point[], and Line[]. As for circle arcs, see this. $\endgroup$ – J. M. will be back soon Jul 30 '15 at 5:27
  • 3
    $\begingroup$ gotta wonder why wolfram doesnt just generalize Circle to 3D. $\endgroup$ – george2079 Jul 30 '15 at 13:55
  • $\begingroup$ @YvesKlett Coordinates are added in the question $\endgroup$ – Harry Jul 31 '15 at 1:32
  • $\begingroup$ See also How to draw an ellipse arc in 3D? $\endgroup$ – Jens Jul 31 '15 at 4:58
3
$\begingroup$

Relabeling to avoid conflict with in-bulit symbols:

a = {0, 0, 0};
b = {400, 0, 0};
c = {200, 400, 200}; d = {226, 137, 62};
aprime = {22, 36, 0}; bprime = {382, 33, 0}; cprime = {240, 357, 200};
c0 = {40, 0, 0}; c1 = {360, 0, 0}; c2 = {200, 360, 200};
r = 40;

arc just to deal with desired arcs. Sphere for illustration.

arc[p1_, p2_, p3_, n_] := With[{v1 = p2 - p1, v2 = p3 - p1},
  Table[p1 + RotationMatrix[j, Cross[v1, v2]].v1, {j, 0, 
    VectorAngle[v1, v2], VectorAngle[v1, v2]/n}]]

I leave labeling and modification to OP.

Graphics3D[{Thick, Line[{d, a}], Line[{d, b}], 
  Line[{d, c}], {Opacity[0.5], Sphere[#, 40]} & /@ {c0, c1, 
    c2}, {PointSize[0.02], Point@#} & /@ {a, b, c, aprime, bprime, 
    cprime}, {Red, PointSize[0.02], Point@#} & /@ {c0, c1, 
    c2}, {Thick, Line[arc[c0, a, aprime, 10]], 
   Line[arc[c1, b, bprime, 10]], Line[arc[c2, c, cprime, 10]]}}]

enter image description here

$\endgroup$
  • $\begingroup$ @ubpqdn. Thanks for that. Is that possible to remove Sphere's in the figure? $\endgroup$ – Harry Jul 31 '15 at 4:05
  • $\begingroup$ @Harry just remove from list of graphics objects, i.e. Graphics3D[{Thick, Line[{d, a}], Line[{d, b}], Line[{d, c}], {PointSize[0.02], Point@#} & /@ {a, b, c, aprime, bprime, cprime}, {Red, PointSize[0.02], Point@#} & /@ {c0, c1, c2}, {Thick, Line[arc[c0, a, aprime, 10]], Line[arc[c1, b, bprime, 10]], Line[arc[c2, c, cprime, 10]]}}] $\endgroup$ – ubpdqn Jul 31 '15 at 4:07

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.