# How do I plot many arrows in a sphere?

I want to plot a lot of arrows in a sphere (3D-Plot). That is not a problem with a small number of Arrows; for a few I can do than something like this:

Show[
Arrow[{{0, 0, 0}, {1, 0, 0}}], Arrow[{{0, 0, 0}, {0, 1, 0}}]},
Axes -> True],
SphericalPlot3D[1, {θ, 0, Pi}, {φ, 0, 2*Pi},
PlotStyle -> Opacity[0.2]]]


However, I want do something like a for-loop to plot many Arrows

For[i = 1, i < 11, i++, Arrow[{{0, 0, 0}, {1/i, (1-i)/5, (1-i)/5}}]


I have tried to paste for loop in many places of my graphics code, but without success. How should I build that code?

-
For loops do not create arrays. They repeat an action several times. Try using Table instead. –  Searke Mar 4 '13 at 16:47

Use Table when you want to create a list of values.

myarrows = Table[Arrow[{{0, 0, 0}, {1/i, (1 - i)/5, (1 - i)/5}}], {i, 1, 10}]

Graphics3D[myarrows]


For loops only repeat an evaluation over and over - it doesn't put the result of the evaluations into a list.

-
One might put an Append[] in the middle of the loop, or even use Sow[] and Reap[] in connection with a loop, in order to generate a list. However, there are few scenarios in which either of these is better than using Table[] as you suggest. –  Michael Stern Mar 4 '13 at 22:36
Sow and Reap hadn't occurred to me an a quick solution here until just now actually. I feel bad that I don't use it pr functions like it more often. –  Searke Mar 5 '13 at 16:57