generativeart/example/example_circleline.go

21 lines
427 B
Go
Raw Normal View History

2021-03-02 10:02:47 +00:00
package main
import (
2021-03-03 16:48:26 +00:00
"github.com/jdxyw/generativeart"
"github.com/jdxyw/generativeart/arts"
"github.com/jdxyw/generativeart/common"
2021-03-02 10:02:47 +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)
c.SetBackground(common.Tan)
2021-03-02 10:02:47 +00:00
c.SetLineWidth(1.0)
c.SetLineColor(common.LightPink)
2021-03-02 10:02:47 +00:00
c.FillBackground()
c.Draw(arts.NewCircleLine(0.02, 600, 1.5, 2, 2))
2021-03-02 10:02:47 +00:00
c.ToPNG("circleline.png")
}