Skip to content

A javascript function to draw regular polygon for HTML5 canvas elements.

Notifications You must be signed in to change notification settings

GeniusMK2/RegularPolygonGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

RegularPolygonGenerator

A javascript function to draw regular polygon for HTML5 canvas elements.

Function RegularPolygonPoints(line,centerx,centery,radius)can return an array of points to generate a regular polygon. Parameters: line means number of edges. centerx and centery means the x-axis and y-axis of the geometric center of the polygon. radius means the length of radius of the circumscribed circle of the polygon.

Function RegularPolygon(elementId,line,centerx,centery,radius)can draw a regular polygon in the given canvas field. line,centerx,centery,radius means as above. elementId means the id of the canvas field.

About

A javascript function to draw regular polygon for HTML5 canvas elements.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published