diff --git a/circleloop.go b/circleloop.go new file mode 100644 index 0000000..e2048c0 --- /dev/null +++ b/circleloop.go @@ -0,0 +1,39 @@ +package generativeart + +import ( + "github.com/fogleman/gg" + "math" +) + +type circleLoop struct { + radius float64 +} + +func NewCircleLoop(radius float64) *circleLoop { + return &circleLoop{ + radius: radius, + } +} + +// Generative draws a Circle Loop images. +func (cl *circleLoop) Generative(c *canva) { + ctex := gg.NewContextForRGBA(c.img) + + r := cl.radius + var theta float64 = 0 + for i:=0; i