26 lines
524 B
Go
26 lines
524 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"github.com/jdxyw/generativeart"
|
||
|
"image/color"
|
||
|
"math/rand"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
rand.Seed(time.Now().Unix())
|
||
|
colors := []color.RGBA{
|
||
|
{0x58, 0x18, 0x45, 0xFF },
|
||
|
{0x90, 0x0C, 0x3F, 0xFF },
|
||
|
{0xC7, 0x00, 0x39, 0xFF },
|
||
|
{0xFF, 0x57, 0x33, 0xFF },
|
||
|
{0xFF, 0xC3, 0x0F, 0xFF },
|
||
|
}
|
||
|
c := generativeart.NewCanva(800, 800)
|
||
|
c.SetBackground(color.RGBA{0x1a, 0x06, 0x33, 0xFF})
|
||
|
c.FillBackground()
|
||
|
c.SetColorSchema(colors)
|
||
|
c.Draw(generativeart.NewContourLine(200))
|
||
|
c.ToPNG("contourline.png")
|
||
|
}
|