2021-03-04 04:06:45 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/jdxyw/generativeart"
|
2021-03-16 04:04:05 +00:00
|
|
|
"github.com/jdxyw/generativeart/arts"
|
2021-03-11 09:35:03 +00:00
|
|
|
"github.com/jdxyw/generativeart/common"
|
2021-03-04 04:06:45 +00:00
|
|
|
"image/color"
|
|
|
|
"math/rand"
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
rand.Seed(time.Now().Unix())
|
|
|
|
c := generativeart.NewCanva(2080, 2080)
|
|
|
|
c.SetBackground(color.RGBA{230, 230, 230, 255})
|
|
|
|
c.SetLineWidth(10)
|
2021-03-04 05:59:46 +00:00
|
|
|
c.SetIterations(15000)
|
2021-10-22 12:58:44 +00:00
|
|
|
c.SetColorSchema(common.DarkPink)
|
2021-03-04 04:06:45 +00:00
|
|
|
c.FillBackground()
|
2021-03-16 04:04:05 +00:00
|
|
|
c.Draw(arts.NewDotLine(100, 20, 50, false))
|
2021-03-04 04:06:45 +00:00
|
|
|
c.ToPNG("dotline.png")
|
|
|
|
}
|