[UP]


Manual Reference Pages  - circleprecision (3)

NAME

circleprecision(3f) - [M_draw:ARCS] Set number of line segments used to approximate a circle (LICENSE:PD)

CONTENTS

Synopsis
Options
Example
Image

SYNOPSIS

subroutine circleprecision(nsegs) integer,intent(in) :: nsegs

Set the number of line segments making up a circle. Default is currently 32. The number of segments in an arc or sector is calculated from the variable "nsegs" according to the span of the arc or sector.

OPTIONS

NSEGS number of line segments making up a circle

EXAMPLE

Sample program:

   program demo_circleprecision
   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
   real    :: b=0.5
   real    :: y1,y2,ym,x1,x2
   real    :: width=50.0/8.0,width2
   integer,parameter :: ivals(*)=[3,5,7,10,20,30,60,100]
   integer :: i
   integer :: ipaws
      !! set up long bar as plotting area
      call prefsize(1000,200)
      call vinit(’ ’) ! start graphics using device $M_DRAW_DEVICE
      call page(-25.0-b, 25.0+b, -5.0-b, 5.0+b)
      call textsize( 2.5/2.0, 3.0/2.0)
      call font(’futura.l’)
      call centertext(.true.)
      call linewidth(30)
      call color(D_GREEN)
      y1=-5
      y2=5
      ym=0
      x1=-25+.05*width
      ! draw colored rectangle and a circle and label center of circle repeat
      width2=width*0.95
      do i=1,size(ivals)
         x2=x1+width2
         call move2((x1+x2)/2.0,ym)
         call circleprecision(ivals(i))
         call print(ivals(i))     ! convert number to string and draw it
         call circle((x1+x2)/2.0, ym, (x2-x1)/2.10)
         x1=x1+width
      enddo
      ipaws=getkey()
      call vexit()
   end program demo_circleprecision

IMAGE

circles are drawn with various circle precision values.


circleprecision (3) March 11, 2021
Generated by manServer 1.08 from 1a2d71c3-bb9e-4c69-bf04-d1c50167dd38 using man macros.