DarianFlorianVoda / BioShapes

Bachelor Thesis R Package
0 stars 0 forks source link

arrowDouble: different interpretation of the sign of d argument #45

Closed discoleo closed 2 years ago

discoleo commented 2 years ago

Function arrowDouble

Change the meaning of the sign of the d argument:

# Double Lined ArrowHead: --->>
arrowHeadDouble = function(x, y, slope, d=-1, dH=d, dV=c(dH, -dH), scale=1) {
  # First Arrow:
  arrHead = list(arrowHeadSimple(x, y, slope=slope, d = dH, dV=dV, scale=scale));
  # Double Arrow:
  # - firstly shift point:
  p2 = shiftPoint(c(x, y), slope=slope, d=d);
  arrHead2 = list(arrowHeadSimple(p2[1], p2[2], slope=slope, d = dH, dV=dV, scale=scale));
  arrHead  = c(arrHead, arrHead2);
  return(arrHead);
}
DarianFlorianVoda commented 2 years ago

I think you were refering to the arrowHeadDouble, not arrowDouble. But I got the idea and I've implemented the suggestion! Thanks!