[UP]


Manual Reference Pages  - circleprecision (3)

NAME

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

CONTENTS

Synopsis
Description
Options
Example
Author
License

SYNOPSIS

definition:

   subroutine circleprecision(nsegs)
   integer   :: nsegs

DESCRIPTION

Set the number of line segments making up a circle. Default is currently 60. 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_pixel
   use M_writegif, only : writegif
   implicit none
   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
      !! set up long bar as plotting area
      call prefsize(1000,200)
      call vinit()
      call ortho2(-25.0-b, 25.0+b, -5.0-b, 5.0+b)
      call textsize( 2.5/2.0, 3.0/2.0)
      call font(’DUPLEX’)
      call centertext(.true.)
      call linewidth(30)
      call color(2)
      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 drawstr(ivals(i))     ! convert number to string and draw it
         call circle((x1+x2)/2.0, ym, (x2-x1)/2.10)
         x1=x1+width
      enddo
      ! write plot as GIF file
      call writegif(’circleprecision.3m_pixel.gif’,P_pixel,P_colormap)
      call vexit()
      ! use system to display GIF file
      call execute_command_line(’display circleprecision.3m_pixel.gif’)
   end program demo_circleprecision

AUTHOR

John S. Urban

LICENSE

Public Domain


circleprecision (3) March 11, 2021
Generated by manServer 1.08 from 3cf67eff-3bf1-4616-803c-c2f009fe1173 using man macros.