[UP]


Manual Reference Pages  - spirograph (3)

NAME

spirograph(3f) - [M_drawplus] draw a hypotrochoid (LICENSE:MIT)

CONTENTS

Synopsis
Description
Options
Example
Author
License

SYNOPSIS

subroutine spirograph(xcenter,ycenter,sunr0,planet0,offset0,radius,ilines,ang,angs,ifill)

   real,intent(in)    :: xcenter, ycenter
   real,intent(in)    :: sunr0,planet0,offset0
   real,intent(in)    :: radius
   integer,intent(in) :: ilines
   real,intent(in)    :: ang
   real,intent(in)    :: angs
   integer,intent(in) :: ifill

DESCRIPTION

Draw a hypotrochoid generated by a fixed point on a circle rolling inside a fixed circle. It has the parametric equations

      x = (R+r)costheta-(r+rho)cos((R+r)/rtheta)
      y = (R+r)sintheta-(r+rho)sin((R+r)/rtheta)

where R is the radius of the fixed circle, r is the radius of the rotating circle, and rho is the offset of the edge of the rotating circle. The figure closes only if R, r, and rho are rational. The equations can also be written

OPTIONS

xcenter,ycenter
  center of curve
sunr0 radii of sun, planet, and planet offset
planet0
  radii of sun, planet, and planet offset
offset0
  radii of sun, planet, and planet offset
radius radius to fit the shape to (no fit if radius is 0)
ilines number of points to sample along curve
ang angle to rotate the shape by, to orientate it.
angs angle to start sampling points at; ccw is +; 0 is East
ifill 1 make a filled polygon, 2 make a hatched polygon

EXAMPLE

AUTHOR

John S. Urban

LICENSE

MIT License


spirograph (3) March 11, 2021
Generated by manServer 1.08 from 94dbc081-9d3c-4bed-a9e8-4053d06c20bd using man macros.