2021-03-17 08:29:20 +00:00
|
|
|
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)
|
2021-04-07 09:22:53 +00:00
|
|
|
c.SetAlpha(5)
|
2021-03-17 08:29:20 +00:00
|
|
|
c.SetLineWidth(0.3)
|
|
|
|
c.FillBackground()
|
|
|
|
c.SetIterations(400)
|
|
|
|
c.Draw(arts.NewCircleNoise(2000, 60, 80))
|
|
|
|
c.ToPNG("circlenoise.png")
|
|
|
|
}
|