8
$\begingroup$

I would like to draw a figure similar to the attached here. What I ended up with is the following figure. I use the code:

a = Graphics3D[{Opacity[.8], EdgeForm[], Cyan, 
    Cylinder[{{0, 0, 0}, {0, 0, 0.1}}, 0.8]}, Boxed -> False, 
   ImageSize -> Large, ViewPoint -> Above];
b = Graphics3D[{Red, 
    Arrow /@ 
     Table[{0.8 {Cos[θ], Sin[θ], 0}, { Cos[θ], 
        Sin[θ], 0}}, {θ, 0, 2 π, π/15}]}, 
   Boxed -> False, ViewPoint -> Above];
Show[a, b]

This gives me the output as follows (without the hand-made curved arrow below): enter image description here

Is there any way to make these arrows curvy? Instead of plain arrows, is it possible to draw curved arrows as shown in the figure. The curve may be similar to a sine or cosine (periodic) curve, for example (a hand-made example is shown below the figure).

Many thanks in advance.

$\endgroup$
1
  • 2
    $\begingroup$ Posters might want to create a CurvyArrow function with the following interface: CurvyArrow[ {startpoint, endpoint}, {offsetstart, offsetend},polarization], with given start and end points, an offset in position as given by the builtin Arrow, and a polarization parameter specifying the plane in which the wiggly line should reside (maybe via the normal vector to said plane?). That should be fairly general and useful to many readers. I would also call that PhotonArrow. Hey, I hope you don't expect me to do all the work! $\endgroup$
    – Peltio
    Commented Jul 14, 2015 at 14:16

1 Answer 1

9
$\begingroup$
pts = Table[{t, Sin[t]}, {t, 0, 2 π, π/4}];
Graphics[{Arrow[BSplineCurve[pts]]}]

enter image description here

For you then:

z = 0.09;
c = Table[{0.03 Sin[20 ϕ], ϕ, 0.05}, {ϕ, 0.8, 1.1, 
    0.01}];
d = RotationMatrix[θ, {0, 0, 1}];
e = Graphics3D[{Arrowheads[0], Red, 
    Arrow[BSplineCurve[
      Table[c.d, {θ, 0, 2 π, π/15}]]]}];
a = Graphics3D[{Opacity[.8], EdgeForm[], Cyan, 
    Cylinder[{{0, 0, 0}, {0, 0, 0.1}}, 0.8]}, Boxed -> False, 
   ImageSize -> Large, ViewPoint -> Above];
b = Graphics3D[{Red, 
    Arrow /@ 
     Table[{1.1 {Cos[θ + z], Sin[θ + z], 0}, 
       1.2 {Cos[θ + z], Sin[θ + z], 0}}, {θ, 0, 
       2 π, π/15}]}, Boxed -> False, ViewPoint -> Above];
Show[a, e, b]

enter image description here

$\endgroup$
5
  • $\begingroup$ I guess he wanted the little red arrows to be 'photon-like'. $\endgroup$
    – Peltio
    Commented Jul 14, 2015 at 13:22
  • $\begingroup$ Ahhh, right, I'll see if I can get that, but he seems to have buggered off himself. $\endgroup$
    – Feyre
    Commented Jul 14, 2015 at 13:29
  • $\begingroup$ Yes Peltio. You are right. I want that red arrows to appear as a curvy arrows, just a photon-like radiation coming out from the cylinder. Thanks Feyre for your help. $\endgroup$
    – Priyam
    Commented Jul 14, 2015 at 13:39
  • $\begingroup$ @Priyam Edited my answer. This should more or less be it then. $\endgroup$
    – Feyre
    Commented Jul 14, 2015 at 13:54
  • $\begingroup$ @Feyre Many thanks once again. it works perfectly fine. Just a small question: is there any command to change the angle of the arrow heads? $\endgroup$
    – Priyam
    Commented Jul 15, 2015 at 7:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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