2
$\begingroup$

I have been involved in a challenge for some time: A ring with a number of arrows on its perimeter. The number of arrows depends on the angle $\theta$. For example, for $\theta=2\pi/36$, the number of arrows is 36. Moreover, the angle between any neighbors is exactly $\theta$. I'm very weak at using graphs and do not know what the starting point is. Any idea can be welcome...

enter image description here

Based on the @flinty post and @cvgmt I Updated the image. Then I can say that I wish to have cvgmt's image as the below one. Please look the new desired blue arrows. I wish to have blue arrows that drawn by me with paint.

enter image description here

$\endgroup$
2
  • $\begingroup$ Do you want the arrows to spin around their normal? I have done this in my answer. $\endgroup$
    – flinty
    May 17, 2021 at 14:54
  • $\begingroup$ If I understand correctly you have 2 angles, theta, which is the angle describing the position on the circle, and alpha which is the angle by which the arrow is rotated around the radius vector? You want to do this such that alpha = theta? $\endgroup$
    – Dunlop
    May 21, 2021 at 5:42

3 Answers 3

7
$\begingroup$
n = 36;
len = .25;
points2d = N[CirclePoints[n]];
points3d = Append[#, 0] & /@ points2d;
tangents3d = Append[#, 0] & /@ (Cross /@ points2d);

arrows = MapThread[Arrow[{#1 - len #2, #1 + len #2}] &,
 {points3d, tangents3d}];

(* spin the arrows as we go around the circle *)
arrowsRotated = MapIndexed[
   With[{i = First[#2]},
     With[{p = points3d[[i]]},
      Rotate[#1, 2 Pi (i - 1)/n, p, p]]] &
   , arrows];

Graphics3D[{{Black, Thick, 
   ResourceFunction["Circle3D"][{0, 0, 0}, {1, 1}, Pi/2, 0]},
  Red, arrowsRotated}, Boxed -> False]

spinning arrows on a 3d circle

$\endgroup$
6
  • $\begingroup$ thank you so much but they do not rotate in a similar manner $\endgroup$ May 17, 2021 at 16:46
  • $\begingroup$ @Unbelievable what do you mean? Your diagram shows them spinning round. $\endgroup$
    – flinty
    May 17, 2021 at 16:48
  • $\begingroup$ @Unbelievable if you just need a fixed angle, then change 2 Pi (i - 1)/n to whatever fixed number you want. $\endgroup$
    – flinty
    May 17, 2021 at 16:51
  • $\begingroup$ I appreciate you again. But if you look at the second picture added, the difference with your form is tangible. $\endgroup$ May 18, 2021 at 6:03
  • $\begingroup$ Your arrows start from one point and are drawn on both sides of the circle. $\endgroup$ May 18, 2021 at 6:05
5
$\begingroup$

Reply to the comment

It means that we need to set f[s]:=-s ?

R = 8;
r[s_] := R {Cos[s], Sin[s], 0};
n[s_] := -r[s] // Normalize;
t[s_] := r'[s] // Normalize;
b[s_] := Cross[t[s], n[s]] // Normalize;
circle3 = 
  ParametricPlot3D[r[s], {s, 0, 2 π}, 
   PlotStyle -> {Opacity[.5], Green}];
d = 1;
f[s_] := -s;
Show[{circle3, 
  Table[Graphics3D[{Arrowheads[.01], Arrow[{r[s], r[s] + d*t[s]}], 
     Arrow[{r[s], r[s] + d*b[s]}], Red, 
     Arrow[{r[s] - d*(Cos[θ]*t[s] + Sin[θ]*b[s]), 
        r[s] + d*(Cos[θ]*t[s] + 
            Sin[θ]*b[s])} /. θ -> f[s]]}], {s, 0, 
    2 π, 2 π/36}]}, ViewProjection -> "Orthographic", 
 Boxed -> False, Axes -> False, PlotRange -> R + 1, 
 ImageSize -> Large, ViewPoint -> {0.60, -2.90, 1.62}]

enter image description here

Updated

Here we use Frenet-Serret frame $\{r(s): t(s),n(s),b(s)\}$ and set a rotation speed function f[s] so we can adjust such function to get another result.

R = 8;
r[s_] := R {Cos[s], Sin[s], 0};
n[s_] := -r[s] // Normalize;
t[s_] := r'[s] // Normalize;
b[s_] := Cross[t[s], n[s]] // Normalize;
circle3 = 
  ParametricPlot3D[r[s], {s, 0, 2 π}, PlotStyle -> Green];
d = 2;
f[s_] := s + π/2;
Show[{circle3, 
  Table[Graphics3D[{Arrowheads[.02], Red, 
     Arrow[{r[s] - d*(Cos[θ]*t[s] + Sin[θ]*b[s]), 
        r[s] + d*(Cos[θ]*t[s] + 
            Sin[θ]*b[s])} /. θ -> f[s]]}], {s, 0, 
    2 π, 2 π/36}]}, ViewProjection -> "Orthographic", 
 Boxed -> False, Axes -> True, PlotRange -> R + 1]

enter image description here

Original

We can rotate a line around the z-axis {0,0,1} with angle λ (2 π)/n where 0<λ<1 ( such line through the point {1,0,0} with direction dir)

n = 36;
λ = 0.8;
sol = NMaximize[{0, 
    VectorAngle[
      RotationTransform[((2 π)/n)*1, {0, 0, 1}][{x, y, z}], 
      RotationTransform[((2 π)/n)*2, {0, 0, 1}][{x, y, 
        z}]] == λ (2 π)/n, x^2 + y^2 + z^2 == 1, z > 0, 
    y > 0}, {x, y, z}];
dir = {x, y, z} /. sol[[2]];
circle3 = 
  ParametricPlot3D[{Cos[t], Sin[t], 0}, {t, 0, 2 π}, 
   PlotStyle -> Green];
Show[Graphics3D[{Arrowheads[0.02], 
   Table[GeometricTransformation[{{Red, PointSize[Large], 
       Point[{1, 0, 0}]}, 
      Arrow[{{1, 0, 0} - .3 dir, {1, 0, 0} + .3 dir}]}, 
     RotationTransform[((2 π)/n)*k, {0, 0, 1}]], {k, n}]}, 
  BoxRatios -> Automatic], circle3, Boxed -> False, Axes -> False, 
 ViewPoint -> {-1.39, -2.93, 0.97}]

enter image description here

$\endgroup$
2
  • $\begingroup$ Thanks a bunch for your answer. I thought a lot about your answer, but I am ashamed to say that there is a problem with the answer. I changed the text of the question and painted your shape inside it as desired. I would be so glad if you look at it. $\endgroup$ May 21, 2021 at 5:16
  • $\begingroup$ Are you looking for an answer where the position vectors begin on the circle, rather than their midpoints being on the circle? $\endgroup$ May 22, 2021 at 0:33
1
$\begingroup$

Graphics3D[ Table[{Hue[t/(2 [Pi])], Arrow [{{Cos[t], Sin[t], 0}, {(Cos[t] - Sin[t])/ Sqrt[1 + Cos[t]^2], (Sin[t] + Cos[t])/Sqrt[1 + Cos[t]^2], Cos[t]/Sqrt[1 + Cos[t]^2]}}]}, {t, 0, 2 [Pi], [Pi]/16}], Boxed -> False]

enter image description here

$\endgroup$

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.