87 lines
2 KiB
Markdown
87 lines
2 KiB
Markdown
|
## Color Circle 2
|
||
|
|
||
|
`Color Circle2` is version 2 of `Color Circle`. It still draws circle and point cloud.
|
||
|
|
||
|
### parameters
|
||
|
|
||
|
- circleNum: The number of circle in this drawing.
|
||
|
|
||
|
```go
|
||
|
cc := generativeart.NewColorCircle2(30)
|
||
|
```
|
||
|
|
||
|
![](../images/colorcircle2.png)
|
||
|
|
||
|
## Dot Line
|
||
|
|
||
|
`dot line` would draw images with short dot and short. The short lines would compose as a big circle.
|
||
|
|
||
|
### parameters
|
||
|
|
||
|
- n: The number of element in this image.
|
||
|
- ras/canv: Control the appearance of this image.
|
||
|
- randColor: Use the the specified color or random colors.
|
||
|
|
||
|
```go
|
||
|
dl := generativeart.NewDotLine(100, 20, 50, false)
|
||
|
```
|
||
|
|
||
|
![](../images/dotline.png)
|
||
|
|
||
|
## Random Shape
|
||
|
|
||
|
`random shape` would draw images with random shapes. The whole image would rotate with some degree.
|
||
|
|
||
|
### parameters
|
||
|
|
||
|
- shapeNum: It indicates how many shapes you want to draw.
|
||
|
|
||
|
```go
|
||
|
rs := NewRandomShape(150)
|
||
|
```
|
||
|
|
||
|
![](../images/randomshape.png)
|
||
|
|
||
|
## Janus
|
||
|
|
||
|
`Janus` would draws a image with multiple circles split at its center with random noise in the horizontal direction.
|
||
|
|
||
|
### TODO
|
||
|
|
||
|
### parameters
|
||
|
|
||
|
## Silk Sky
|
||
|
|
||
|
`Silk Sky` would draws a image with multiple circles converge to one point or circle.
|
||
|
|
||
|
### parameters
|
||
|
|
||
|
- circleNum: The number of the circles in this drawing.
|
||
|
- sunRadius: The radius of the sun. The sun is a point/circle where other circles meet.
|
||
|
|
||
|
```go
|
||
|
silkSky := NewSilkSky(circleNum int, sunRadius float64)
|
||
|
```
|
||
|
|
||
|
![](../images/silksky.png)
|
||
|
|
||
|
## Julia
|
||
|
|
||
|
`Julia` is to draw a `Julia Set`. [Julia Set](https://en.wikipedia.org/wiki/Julia_set) is a math concept. You can define your own formula in this package.
|
||
|
|
||
|
### parameters
|
||
|
|
||
|
- fn: The custom julia set function.
|
||
|
- maxz: The maximum modulus length of a complex number.
|
||
|
- xaixs, yaixs: The range for the X-Y coordination used to mapping the julia set number to the real pixel of the image. These should be positive number. It only indicates the first quadrant range.
|
||
|
|
||
|
```go
|
||
|
func julia1(z complex128) complex128 {
|
||
|
c := complex(-0.1, 0.651)
|
||
|
z = z*z + c
|
||
|
return z
|
||
|
}
|
||
|
julia := generativeart.NewJulia(julia1, 40, 1.5, 1.5)
|
||
|
```
|
||
|
|
||
|
![](../images/julia.png)
|