[UP]


Manual Reference Pages  - poly (3)

NAME

poly(3f) - [M_calcomp:general] draw an equilateral polygon (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Example
License

SYNOPSIS

subroutine poly(xpage,ypage,slen,sn,angle)

DESCRIPTION

POLY(3f) draws equilateral polygons.

OPTIONS

XPAGE,YPAGE
  are the coordinates, in inches, of the starting point of the polygon.
SLEN is the length, in inches, of a side of the polygon.
SN is the number of sides of the polygon.
ANGLE is the angle, in degrees, of the first side of the polygon.

    COMMENTS

If SN is negative, a star is drawn with SN points.

EXAMPLE

Sample program

   program demo_poly
   use M_calcomp, only : plots, poly, plot
   implicit none
   real              :: xstart, ystart
   real              :: side_length
   real              :: number_of_sides
   real              :: angle
   integer           :: i
      call plots(0.0,10.0,0.0,10.0)
      call plot(0.001,0.001,-3) ! move origin a bit so lines on edge OK
      call poly(0.0,0.0,10.0,4.0,0.0) ! 10 inch square
      side_length=2.35
      xstart=(10.0-side_length)/2.0
      ystart=0.5
      angle=0.0
      do i = 3,12
         number_of_sides=real(i)
         call poly(xstart,ystart,side_length,number_of_sides,angle)
      enddo
      call plot(0.0,0.0,999)
   end program demo_poly

LICENSE

Public Domain


poly (3) March 11, 2021
Generated by manServer 1.08 from 5a7b2396-5627-47a3-99b1-020a565c636a using man macros.