# Colorfunction of Arrow

I want to plot an arrow with a gradient of color. For example, the arrow is

Graphics3D[{Red,Arrow[{{0,0,0},{0,0,2}}]}]


Then I want the Opacity is a function of 'z' coordinate, so that Opacity is 0 at the beginning and 1 at the end of the arrow.

How to modify the code above?

• See my answer for a simple gradient of two colors. I'd too would be interested to know how to apply ColorFunction to a Line/Arrow Aug 30 '16 at 14:57

For a simple gradient you could use Line together with Arrow since Line accepts a VertexColors-option.
Graphics3D[{Red, Thick, Arrow@Line[{{0, 0, 0}, {0, 0, 2}},

• The first list entry (Red in my answer) determines the color of the arrow head Aug 30 '16 at 15:43