2021-03-09 11:07:47 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/jdxyw/generativeart"
|
2021-03-16 04:04:05 +00:00
|
|
|
"github.com/jdxyw/generativeart/arts"
|
2021-03-09 11:07:47 +00:00
|
|
|
"image/color"
|
|
|
|
"math/rand"
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
rand.Seed(time.Now().Unix())
|
|
|
|
colors := []color.RGBA{
|
|
|
|
{0x06, 0x7B, 0xC2, 0xFF},
|
|
|
|
{0x84, 0xBC, 0xDA, 0xFF},
|
|
|
|
{0xEC, 0xC3, 0x0B, 0xFF},
|
|
|
|
{0xF3, 0x77, 0x48, 0xFF},
|
|
|
|
{0xD5, 0x60, 0x62, 0xFF},
|
|
|
|
}
|
|
|
|
c := generativeart.NewCanva(1000, 1000)
|
|
|
|
c.SetBackground(color.RGBA{0xF0, 0xFE, 0xFF, 0xFF})
|
|
|
|
c.FillBackground()
|
|
|
|
c.SetColorSchema(colors)
|
2021-03-16 04:04:05 +00:00
|
|
|
c.Draw(arts.NewNoiseLine(1000))
|
2021-03-09 11:07:47 +00:00
|
|
|
c.ToPNG("noiseline.png")
|
|
|
|
}
|