2
$\begingroup$

I'm trying to draw the following picture using drawing tools, but I could get just the arrows and points.

enter image description here

As you can imagine, I'm a begginer at mathematica, but I use LaTeX. I'd like to know if there is a nice reference for commands. I imaggine that we can't draw every thing with drawing tools, just simple figures, like this one.

$\endgroup$
  • 3
    $\begingroup$ MMA is not a graphics arts software. It can produce nice graphs/plots, but often companions of mathematical calculations... Anyway take a look at this $\endgroup$ – José Antonio Díaz Navas Jan 25 '18 at 15:54
  • $\begingroup$ Create the half ellipse, then use this to get the gradient (think of it as a green shadow.) $\endgroup$ – C. E. Jan 25 '18 at 16:12
  • $\begingroup$ I drow the 24 arrows with drawing tools, how do I do what you sugget with drawing tools? If not possible, how to draw these arrows at Graphics[]? Do I have to write Arrow[] 24 times? $\endgroup$ – geekformoney Jan 25 '18 at 17:24
  • $\begingroup$ With the drawing tools, this is not possible. You need to do programming (rasterize the ellipse, blur it, etc.) That programming is going to be more work than what it would take to do this with a proper drawing program. There are free ones, like Inkscape. $\endgroup$ – Szabolcs Jan 25 '18 at 17:34
5
$\begingroup$

I'll build on David's answer (if you vote for this one, please also vote for his), since it's been a while since anyone demonstrated the excellent shadow` package on this site.

We start by defining the arrows as in the previous answer:

myarrow[x_, y_] := Graphics[{
    Purple,
    Thickness[0.02],
    Arrowheads[.08],
    Arrow[{{x, y}, {x, y - 1.5}}],
    Black,
    PointSize[0.04],
    Point[{x, y}]
    }];
arrows = Show[Table[myarrow[x, y], {x, 0, 7, 1}, {y, 0, -4, -2}]];

Then we create the half ellipse:

myGreen = RGBColor[{165, 203, 149}/255];
ellipse = Graphics[{
   myGreen,
   DiskSegment[{0, 0}, {5, 1}, {Pi, 2 Pi}]
   }, ImageSize -> 600]

Mathematica graphics

Now we use the shadow` package to blur the ellipse:

<< shadow`

glowingEllipse = shadow[
  ellipse,
  ellipse,
  "blur" -> 30,
  "offset" -> {0, 0},
  "color" -> myGreen,
  "outline" -> False
  ]

Mathematica graphics

Finally, we put the arrow and the half ellipse together. We also add the gray line:

Show[
 arrows,
 Graphics[{
   Inset[glowingEllipse, {3.5, -5.5}, {Center, Top}, {10, 2}],
   Thick, Lighter@Gray,
   Line[{{-0.8, -6}, {7.8, -6}}]
   }]
 ]

Mathematica graphics

$\endgroup$
  • $\begingroup$ How do I call a package for the entire notebook? I'm writing a textbook $\endgroup$ – geekformoney Jan 25 '18 at 18:42
  • $\begingroup$ @geekformoney You can load it (using << shadow`) anywhere in the notebook. $\endgroup$ – C. E. Jan 25 '18 at 18:44
  • $\begingroup$ and how do i install this package? $\endgroup$ – geekformoney Jan 25 '18 at 18:44
  • 1
    $\begingroup$ @geekformoney There is information about that in the footer of this website. $\endgroup$ – C. E. Jan 25 '18 at 18:46
  • $\begingroup$ nice. sorry to bother all of you with such simple questions, i'm a noob beginner. I never heard about this site for mathematica packages. $\endgroup$ – geekformoney Jan 25 '18 at 18:50
3
$\begingroup$
myarrow[x_, y_] := 
  Graphics[{Purple, Thickness[0.02], Arrowheads[.08], 
    Arrow[{{x, y}, {x, y - 1.5}}], Black, PointSize[0.04], 
    Point[{x, y}]}];
myellipse = Graphics[
   DensityPlot[(x - 4)^2 + (y - 4)^2, {x, 0, 7}, {y, -6, -9},
    Frame -> None,
    AspectRatio -> 1/2]
   ];
 Show[Table[myarrow[x, y], {x, 0, 7, 1}, {y, 0, -4, -2}],
  myellipse]

enter image description here

Play with the ColorFunction to get your desired green.

$\endgroup$
  • $\begingroup$ can this be used inside Graphics[]? $\endgroup$ – geekformoney Jan 25 '18 at 17:37
  • $\begingroup$ @geekformoney: What do you mean by "this"? One typically uses or defines an abstract object outside of Graphics[], and then renders it visually through a call by Graphics. $\endgroup$ – David G. Stork Jan 25 '18 at 17:51
  • $\begingroup$ Graphics[Table[myarrow[x, y], {x, 0, 7, 1}, {y, 0, -4, -2}], ellipse commands] $\endgroup$ – geekformoney Jan 25 '18 at 18:42

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.