solid (filled) arrowhead for vector plots

P.Romero romero619 at HOTMAIL.COM
Wed Sep 24 16:14:35 EDT 2008


Im interested in altering the source code to produce a filled/solid
arrowhead for vector plots.
Here's the gaarrw function from gagx.c source file

void gaarrw (gadouble x, gadouble y, gadouble ang, gadouble siz, gadouble
asiz) {
gadouble xx,yy;

  if (siz<0.0001) {
    gxmark (2, x, y, 0.01);
    return;
  }
  gxplot (x,y,3);
  xx = x+siz*cos(ang);
  yy = y+siz*sin(ang);
  gxplot (xx,yy,2);
  if (asiz==0.0) return;
  if (asiz<0.0) asiz = -1.0*asiz*siz;
  gxplot (xx+asiz*cos(ang+a150),yy+asiz*sin(ang+a150),2);
  gxplot (xx,yy,3);
  gxplot (xx+asiz*cos(ang-a150),yy+asiz*sin(ang-a150),2);
}

How would I go about creating a filled polygon between the three triangle
vertices that are plotted by the last 3 gxplot statements in the above code?
I found a 'gxfill' function, void gxfill (gadouble *xy, gaint num), which I
believe might work, but I'd like this confirmed.
Any advice from the developers? Please help.
Thanks,
P.Romero



More information about the gradsusr mailing list