Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    star-polygonpublic

    star-polygon

    Generates a regular star polygon.

    Example

    console.log(require("star-polygon")(5, 2))
     
    //Prints: 
    // 
    //  [[0,2], [2,4], [4,1], [1,3], [3,0]] 
    // 

    Install

    npm install star-polygon
    

    require("star-polygon")(n, k)

    Generates a star polygon.

    • n is the number of vertices
    • k is the step size between vertices

    Returns A list of edges

    Credits

    (c) 2013 Mikola Lysenko. MIT License

    Keywords

    none

    install

    npm i star-polygon

    Downloadsweekly downloads

    5

    version

    0.0.0

    license

    none

    repository

    github.com

    last publish

    collaborators

    • avatar