RChemuturi

02-09-2011, 09:47 PM

Hello All,

I am trying to draw an arrow to represent a vector. I have two points with (x,y,z) coordinates of the vector. I have been searching the forums to draw an arrow which suggest the best way is to draw using three lines.

Now coming to my problem, I can draw the main arrow line joining the two coordinates I have, but drawing the two small lines at the tip is challenging.

The idea I settled down with is translating and rotating the axes to match the vector as one of the axes. I can calculate the angle but without the sign of the angle, so not sure in which direction I need to rotate.

Any suggestions as to how can I do this?! My ultimate goal is to draw an arrow along the vector as a representation. Is translation & rotation a good idea or is there a better way to achieve this?

Thanks in advance

I am trying to draw an arrow to represent a vector. I have two points with (x,y,z) coordinates of the vector. I have been searching the forums to draw an arrow which suggest the best way is to draw using three lines.

Now coming to my problem, I can draw the main arrow line joining the two coordinates I have, but drawing the two small lines at the tip is challenging.

The idea I settled down with is translating and rotating the axes to match the vector as one of the axes. I can calculate the angle but without the sign of the angle, so not sure in which direction I need to rotate.

Any suggestions as to how can I do this?! My ultimate goal is to draw an arrow along the vector as a representation. Is translation & rotation a good idea or is there a better way to achieve this?

Thanks in advance