[UP]


Manual Reference Pages  - arc (3)

NAME

arc(3f) - [M_draw:ARCS] Draw an arc in world units. (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Example

SYNOPSIS

subroutine arc(x, y, radius, startang, endang) real,intent(in) :: x real,intent(in) :: y real,intent(in) :: radius real,intent(in) :: startang real,intent(in) :: endang

DESCRIPTION

Draw an arc. x, y, and radius are values in world units using current line width and color

Angles are in degrees, positive measured counterclockwise from the +X axis. The current position after the arc is drawn is at the end of the arc.

OPTIONS

X,Y Coordinates for the center of the circle
RADIUS Radius of the circle
STARTANG
  Start angle
ENDANG End angle

EXAMPLE

Sample program:

   program demo_arc
      use M_draw
      use M_draw,    only  : D_BLACK,   D_WHITE
      use M_draw,    only  : D_RED,     D_GREEN,    D_BLUE
      use M_draw,    only  : D_YELLOW,  D_MAGENTA,  D_CYAN
      implicit none
      integer        :: icolor
      real           :: b=0.5
      real           :: R=4.9
      real           :: X, Y, A, YY
      integer        :: key
      call prefsize(1000,200)
      call vinit(’ ’)
      call color(D_BLACK)
      call clear()
      call color(D_YELLOW)
      call page(-25.0-b, 25.0+b, -5.0-b, 5.0+b)
      call textsize(1.0,1.4)
      call font("futura.l")
      call centertext(.true.)
      ! draw arcs with various start and end angles

X=-20.0; Y=0.0; A=0.0; B=30.0; icolor=7; YY=4 call drawit("0 to 30 deg.")

X=-10.0; YY=-4; A=0.0; B=-45.0; icolor=1 call drawit("0 to -45 deg.")

X=0.0; YY=-4; A=100.0; B=200.0; icolor=2 call drawit("100 to 200 deg.")

X=10.0; YY=-4; A=-30.0; B=30.0;icolor=5 call drawit("-30 to 30 deg.")

YY=4; X=20.0; A=45.0; B=-45.0; icolor=6 call drawit("45 to -45 deg.")

call vflush() key=getkey() call vexit() contains subroutine drawit(label) character(len=*) :: label call linewidth(150) call color(icolor) call arc(X,Y,R,A,B) call draw2(X,Y) call move2(X,YY) call linewidth(50) call color(D_WHITE) call drawstr(label) end subroutine drawit

end program demo_arc


arc (3) March 11, 2021
Generated by manServer 1.08 from ef7ad420-dc5f-426c-adaa-fa3b2d880b4b using man macros.