0
$\begingroup$

Basically the arrowhead is dependent on the scaling, and I would like it so that it wasn't the case, for example when α is 1

normal

Then the arrowhead is displayed as it should, but as I slide α, then I get these kind of artifacts

a big arrow across the whole graphic

The code for the manipulate that I am using is

Manipulate[
  ParametricPlot3D[
    {x[t], y[t], z[t]} /. 
      {{x -> Function[{t}, a + b t α], 
        y -> Function[{t}, b], 
        z -> Function[{t}, c E^(t α)]}} /. 
        a -> 1 /. 
        b -> 2 /. 
        c -> 10, 
    {t, 0, 25}, 
    PlotRange -> All,
    AxesLabel -> {x, y, z}, 
    AspectRatio -> 1, 
    BoxRatios -> 1,
    PlotStyle -> 
      Directive[{Red, Arrowheads[.000000000004]}]] /. 
    Line[pts_] :> Arrow[Line[pts], {0, -.1}], 
  {α, -10, 10}]

How can I fix the arrows so that I don't get the artifacts while manipulating?

In the other question it was suggested to use Small, Medium or Large, or maybe use a numeric value to change the arrows size numerically. However, when using Medium or Large, this is what happens

This is what happens when I use medium or size

However, it does seem to work fine on certain perspectives and with a negative value of α.

now it works ok

If I change the perspective or rotate the graphic, then it becomes a mess.

So, okay, I already know I can change the size of the arrows numerically, that is good to know, but is there any way to know what is the best size for the arrow, so that the arrow appears the same size with different scalings of the plot? Besides, it seems that when I rotate the cube or change the perspective, the arrowhead dramatically changes the size, why does this happen?

$\endgroup$
4
  • 1
    $\begingroup$ In Details and Options of Arrowheads one can read: The symbolic values Tiny, Small, Medium, and Large can be used for s. With these values, the size of the arrowhead is independent of the total width of the graphic. So, you can set Medium or Large in place of your .000000000004. $\endgroup$
    – Alx
    Dec 27, 2019 at 15:26
  • $\begingroup$ I attempted with Large, medium and small, but no arrow shows up anymore. $\endgroup$
    – Rainb
    Dec 27, 2019 at 15:30
  • 1
    $\begingroup$ Does this answer your question? Fixed arrow size in parametric 3d plot $\endgroup$
    – Carl Woll
    Dec 27, 2019 at 16:18
  • $\begingroup$ I've edited the question to explain how this is different from that question. And that the accepted answer on that question doesn't solve my problem, anyway. $\endgroup$
    – Rainb
    Dec 27, 2019 at 20:10

2 Answers 2

1
$\begingroup$

The problem is the result of forcing the z-axis to rescale over 200 orders of magnitude asα is varied from -10 to +10. This appears to be beyond what Mathematica's 3D graphics engine can handle. When the range of α is restricted to something reasonable there is no problem. The critical value of α, the value at which the rendering begins to go bad, is at about α = 3.4.

Here is demonstration that I believe shows the problem better than the OP's examples.

With[{a = 1, b = 2, c = 10, tmax = 25, αmax = 4},
  Manipulate[
    ParametricPlot3D[{a + b Cos[2 π t/tmax], b Sin[2 π t/tmax], c E^(t α)}, {t, 0, max},
      PlotRange -> All,
      BoxRatios -> 1,
      PlotStyle -> Directive[{Red, Arrowheads[Medium]}]] 
    /. 
      Line[pts_] :> Arrow[Line[pts], {0, -.1}],
    {{α, 0}, -1, αmax, .05, ImageSize -> Large, Appearance -> "Labeled"}]]

demo

$\endgroup$
0
$\begingroup$

Just to show picture, probably not complete answer:

Manipulate[
 ParametricPlot3D[{x[t], y[t], 
        z[t]} /. {{x -> Function[{t}, a + b t α], 
         y -> Function[{t}, b], 
         z -> Function[{t}, c E^(t α)]}} /. a -> 1 /. 
     b -> 2 /. c -> 10, {t, 0, 25}, PlotRange -> All, 
   AxesLabel -> {x, y, z}, AspectRatio -> 1, BoxRatios -> 1, 
   PlotStyle -> Directive[{Red, Arrowheads[Large]}]] /. 
  Line[pts_] :> Arrow[Line[pts]], {α, -10, 10}]

enter image description here

This is for α = 2.25, and I rotated box with mouse a little to clearly see arrow head.

$\endgroup$
2
  • $\begingroup$ Which mathematica version are you using? It doesn't seem to work in mathematica 11.0 for windows $\endgroup$
    – Rainb
    Dec 27, 2019 at 16:00
  • 1
    $\begingroup$ Ah, it may be version depedent, I use Mathematica 12, Windows. $\endgroup$
    – Alx
    Dec 27, 2019 at 16:04

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.