generativeart/example/example_circlenoise.go
2021-04-07 17:22:53 +08:00

22 lines
426 B
Go

package main
import (
"github.com/jdxyw/generativeart"
"github.com/jdxyw/generativeart/arts"
"github.com/jdxyw/generativeart/common"
"math/rand"
"time"
)
func main() {
rand.Seed(time.Now().Unix())
c := generativeart.NewCanva(500, 500)
c.SetBackground(common.White)
c.SetAlpha(5)
c.SetLineWidth(0.3)
c.FillBackground()
c.SetIterations(400)
c.Draw(arts.NewCircleNoise(2000, 60, 80))
c.ToPNG("circlenoise.png")
}