[UP]


Manual Reference Pages  - arrowhead (3)

NAME

arrowhead(3f) - [M_drawplus] Draw arrow head (for text boxes and line markers) (LICENSE:MIT)

CONTENTS

Synopsis
Description
Example
Author
License

SYNOPSIS

subroutine arrowhead(xpoint,ypoint,xstart,ystart,size,idraw)

   real,intent(in)    :: xpoint,ypoint
   real,intent(in)    :: xstart,ystart
   real,intent(in)    :: size
   integer,intent(in) :: idraw

DESCRIPTION

given line segment

     START --> POINT

draw an arrow head of overall length SIZE measured along the line segment. The arrow head is 2/3 SIZE wide and the indent is 1/3 SIZE.

if IDRAW is 0, draw line from x3 to START to P3 and leave current position at POINT.

    >                o START
    >                |
    >                |
    >                |
    >                |
    >                |  1/3*size
    >                |<------->
    >                |
    >                |
    >   P1  o .      |      . o P2   ---------
    >        \  .    |   .   /         ^
    >         \   .  | .    /          |
    >          \     o P3  / -------   |
    >           \         /     ^     SIZE
    >            \       /      |      |
    >             \     /    2/3*SIZE  |
    >              \   /        V      V
    >               \ /      -----------------
    >                o POINT

EXAMPLE

Sample program:

   program demo_arrowhead
   use :: M_draw
   use :: M_drawplus, only : arrowhead
   implicit none
   real :: xpoint,ypoint, xstart,ystart
   real :: PI, ang, size
   integer :: i, idraw, idum
   call prefsize(600,600)
   call vinit(’’)
   call ortho2(-10.0,10.0,-10.0,10.0)
   call linewidth(100)
   call color(D_WHITE)
   call clear()
   xstart=0.0
   ystart=0.0
   size=1.00
   idraw=0

call color(D_RED) xpoint=9.0 ypoint=0.0 call arrowhead(xpoint,ypoint,xstart,ystart,size,idraw)

call color(D_GREEN) xpoint=9.0 ypoint=9.0 call arrowhead(xpoint,ypoint,xstart,ystart,size,idraw)

call color(D_BLACK) idraw=-1 PI=4.0*atan(1.0) ang=PI/2.0 do i=1,20+1 xpoint=9.0*cos(ang) ypoint=9.0*sin(ang) call arrowhead(xpoint,ypoint,xstart,ystart,size,idraw) ang=ang+PI/20.0 enddo idum=getkey() call vexit() end program demo_arrowhead

AUTHOR

John S. Urban

LICENSE

MIT License


arrowhead (3) March 11, 2021
Generated by manServer 1.08 from dd6f42a9-cc91-47cc-85c9-60ebd2e55bee using man macros.