[UP]


Manual Reference Pages  - circle (3)

NAME

circle(3f) - [M_draw:ARCS] Draw a circle. (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Example

SYNOPSIS

subroutine circle(x, y, radius) real,intent(in) :: x real,intent(in) :: y real,intent(in) :: radius

DESCRIPTION

Draw a circle. x, y, and radius are values in world units.

Draw a circle using current line width and color

    NOTE

circles are regarded as polygons, so if polyfill or polyhatch has been called with .true., the circle will be filled or hatched accordingly.

OPTIONS

X,Y Coordinates for the center of the circle
RADIUS Radius of the circle

EXAMPLE

Sample program:

   program demo_circle
      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
      real :: b=0.5
      real :: R=5
      integer :: ipaws
   ! set up drawing surface
      call prefsize(1000,200)
      call vinit(’ ’) ! start graphics using device $M_DRAW_DEVICE
      call page(-25.0-b,25.0+b,-R-b,R+b)
      call linewidth(200)
      call color(D_CYAN)
      call clear()
   ! draw circles with hatching and fill
      call color(D_WHITE)
      call circle(-20.0,0.0, R)
      call color(D_RED)
      call circle(-10.0,0.0, R)
      call polyfill(.true.)
      call color(D_GREEN)
      call circle(0.0,0.0,R)
      call linewidth(20)
      call polyhatch(.true.)
      call hatchpitch(1.0/2.0)
      call color(D_MAGENTA)
      call circle(10.0,0.0,R)
   ! layer calls to get a filled crosshatched circle
   ! first a solid colored circle
      call color(D_YELLOW)
      call polyfill(.true.)
      call circle(20.0,0.0,R)

! draw hatch lines at 45 degrees call color(D_GREEN) call linewidth(80) call polyhatch(.true.) call hatchpitch(2.0/3.0) call hatchang(45.0) call circle(20.0,0.0,R) ! draw hatch lines at -45 degrees call hatchang(-45.0) call circle(20.0,0.0,R)

! outline circle with a thick border call color(D_WHITE) call linewidth(160) call polyhatch(.false.) call circle(20.0,0.0,R)

ipaws=getkey() ! exit graphics mode call vexit() end program demo_circle


circle (3) March 11, 2021
Generated by manServer 1.08 from ffb2f7df-ee7c-4f5b-b771-d02d6e57fd58 using man macros.