0
$\begingroup$

The following image represents two worlds drawn as tori with one door on each world. I would like to draw a bidirectional red arrow --- if possible as a tube for the fun --- going from one door to the other.

But my tentative solution is very poor. Any idea?

torus2 = First[
       ParametricPlot3D[{(4 + Cos[2 π v]) Sin[
           2 π u], (4 + Cos[2 π v]) Cos[2 π u], 
         Sin[2 π v]}, {u, 0, 1}, {v, 0, 1}, Boxed -> False, 
        Axes -> False, MeshFunctions -> {#3 &}, Mesh -> 0, 
        ColorFunction -> "BrownCyanTones"]];
    p2 = {LightBlue, AbsolutePointSize[20], Point[{2.5, 4, 1}]};
    g3D2 = Graphics3D[{p2, torus2}, Boxed -> False];
    torus1 = First[
       ParametricPlot3D[{(4 + Cos[2 π v]) Sin[
           2 π u], (4 + Cos[2 π v]) Cos[2 π u], 
         Sin[2 π v]}, {u, 0, 1}, {v, 0, 1}, Boxed -> False, 
        Axes -> False, MeshFunctions -> {#3 &}, Mesh -> 0, 
        ColorFunction -> "AlpineColors"]];
    p1 = {LightRed, AbsolutePointSize[20], Point[{-2.5, -4, 1}]};
    g3D1 = Graphics3D[{p1, torus1}, Boxed -> False];
    a1 = Graphics[{{Thick, 
        Arrow[BezierCurve[{{-2, 3}, {1, 3.5}, {2, 2}}]]}}]
    GraphicsRow[{, g3D2, a1, g3D1,}]

enter image description here

$\endgroup$
1
  • $\begingroup$ The third example in Arrow docs is way closer to what you describe than what your attempt shows. $\endgroup$
    – Kuba
    Commented Apr 10, 2017 at 6:51

1 Answer 1

2
$\begingroup$
Graph[{1 -> 2}, VertexShape -> {1 -> g3D1, 2 -> g3D2}, 
 VertexCoordinates -> {{0, 0}, {1, 0}}, 
 EdgeShapeFunction -> ({Arrowheads[{Large}], Thick, 
     Arrow[GraphElementData[{"CurvedArc",  "Curvature" -> 1}][##], .1]} &), 
 VertexSize -> Large]

Mathematica graphics

or, using Graphics3D

Graphics3D[{g3D1[[1]], Translate[g3D2[[1]], {20, 0, 0}], Opacity[.5], Red, 
  Arrow[Tube[#, .25]&@BSplineCurve[{{3, 6, 0}, {7, 15, 0.}, {15, 5, .0}}], 0.1]}, 
  Boxed -> False]

Mathematica graphics

$\endgroup$
1
  • $\begingroup$ Super Exactly what I was searching. $\endgroup$ Commented May 4, 2017 at 4:48

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