I am trying to create a plot of vectors using a Do-loop and "Graphics [{Arrow[{....". Within the Do loop I calculate the beginning (X,Y) and ending coordinates (X1,Y1) for each vector. Can I use the "Graphics [{Arrow[{" command within a Do-Loop or do I first have to create a Table? Below is my code. Terry
A = {
{.79, 1.36}, {.93, 1.38}, {.58, .38}, {.87, .87}, {.83, .79},
{.31, .99}, {.60, .48}, {.60, .87}, {1.64, .15}, {1.11, 1.30},
{.53, .97}, {1.26, .39}, {2.37, .00}, {1.17, 1.76}, {.96, 1.26},
{.56, .46}, {1.17, .20}, {.63, .26}, {1.01, .47}, {.81, .77}};
DI = {-.90, -1.20, 1., -.97, -1.08, -1.53, -.61, -.60,
1.24, -.69, -1.31, .92, 2.39, -.06, -.48, -.82, -.82,
1.11, .66, -.15, -1.08}
Do[MDISC = Sqrt[A[[i, 1]]^2 + A[[i, 2]]^2];
COSX = A[[i, 1]]/MDISC;
COSY = A[[i, 2]]/MDISC;
BIGD = -DI[[i]]/MDISC;
X = BIGD*COSX;
Y = BIGD*COSY;
X1 = (MDISC + BIGD)*COSX;
Y1 = (MDISC + BIGD)*COSY;
Graphics[{Arrow[{{X, Y}, {X1, Y1}}]}], {i, 20}]