Skip to content

Generate vector coordinates for regular polygons along the circumference of a circle

License

Notifications You must be signed in to change notification settings

nlovell/vector-polygons

Repository files navigation

Project logo

Vector Polygons

Status GitHub Issues GitHub Pull Requests License

Easily generate coordinates for regular polygons

Just a little function that takes some parameters, and spits out vertex coordinates for any regular 2d polygons with n number of sides. It was a tangent on something else I was working on, and a fun little exercise in TypeScript. I'm also using this minor project to work on documentation and testing tools, so this will likely be overkill.

Feel free to submit an issue or pull request if you want to see anything changed.

Usage

Download the library from undecided package manager, and import the library into your project to get started.

Import example

Click here to view the resulting nonagon on Desmos!

Development

Want to contribute? Great!

To fix a bug or enhance the project, please follow these steps:

  • Fork the repo
  • Create a new branch (git checkout -b branch-name)
  • Make the appropriate changes in the files
  • Add changes to reflect the changes made
  • Commit your changes (git commit -am 'Stuff Fixed')
  • Push to the branch (git push origin branch-name)
  • Create a Pull Request

Built with

License

MIT License - found here.

About

Generate vector coordinates for regular polygons along the circumference of a circle

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published