2021-03-02 03:23:29 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2021-03-03 16:48:26 +00:00
|
|
|
"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-02 03:23:29 +00:00
|
|
|
"math/rand"
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
rand.Seed(time.Now().Unix())
|
2021-03-04 02:46:41 +00:00
|
|
|
c := generativeart.NewCanva(600, 600)
|
2021-03-11 09:35:03 +00:00
|
|
|
c.SetBackground(common.DarkPink[rand.Intn(5)])
|
|
|
|
c.SetColorSchema(common.DarkPink)
|
2021-03-16 04:04:05 +00:00
|
|
|
c.Draw(arts.NewGirdSquares(24, 10, 0.2))
|
2021-03-02 03:23:29 +00:00
|
|
|
c.ToPNG("gsquare.png")
|
|
|
|
}
|