Skip to content

This script generates a set of points ( circle centers ) which form the mystical flower of life pattern.

License

Notifications You must be signed in to change notification settings

Alexander-0x80/floweroflife.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

floweroflife.js

This script generates a set of points ( circle centers ) which form the mystical flower of life pattern.

Install:

npm/bower install floweroflife

Usage:

var flower = require("floweroflife");
var radius = 40;
var layers = 4;
// Generate 4 layers, starting from x0,y0
var f = flower(0,0 , radius, layers);

f.layers(); // Returns 2d array of layered points
f.points(); // Returns array of all flower points ( layers flattened )
            // Each point is: Object { x: 0, y: 0 }

Here is a jsfiddle demo that uses snap.svg to draw the pattern. Use any drawing library of your choice and create your flower.

About

This script generates a set of points ( circle centers ) which form the mystical flower of life pattern.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages