generativeart/docs/doc.md

178 lines
3.4 KiB
Markdown
Raw Normal View History

2021-03-08 07:56:32 +00:00
## Color Circle 2
2021-03-09 06:43:22 +00:00
`Color Circle2` is version 2 of `Color Circle`. It still draws the circle and point cloud.
2021-03-08 07:56:32 +00:00
### parameters
2021-03-09 06:43:22 +00:00
- circleNum: The number of the circle in this drawing.
2021-03-08 07:56:32 +00:00
```go
cc := generativeart.NewColorCircle2(30)
```
![](../images/colorcircle2.png)
## Dot Line
2021-03-09 06:43:22 +00:00
`dot line` would draw images with the short dot and short. The short lines would compose as a big circle.
2021-03-08 07:56:32 +00:00
### parameters
2021-03-09 06:43:22 +00:00
- n: The number of elements in this image.
2021-03-08 07:56:32 +00:00
- ras/canv: Control the appearance of this image.
2021-03-09 06:43:22 +00:00
- randColor: Use the specified color or random colors.
2021-03-08 07:56:32 +00:00
```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
2021-03-09 06:08:33 +00:00
`Janus` would draw an image with multiple circles split at its center with random noise in the horizontal direction.
2021-03-08 07:56:32 +00:00
### TODO
### parameters
2021-03-09 06:08:33 +00:00
## Contour Line
2021-03-09 06:43:22 +00:00
`Contour Line` uses the `perlin noise` to do some flow field.
2021-03-09 06:08:33 +00:00
### parameters
- lineNum: It indicates how many lines.
![](../images/contourline.png)
2021-03-08 07:56:32 +00:00
## Silk Sky
2021-03-09 06:08:33 +00:00
`Silk Sky` would draw an image with multiple circles converge to one point or one circle.
2021-03-08 07:56:32 +00:00
### 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.
2021-03-09 06:08:33 +00:00
- 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. It only indicates the first quadrant range.
2021-03-08 07:56:32 +00:00
```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)
```
2021-03-09 11:07:47 +00:00
![](../images/julia.png)
## Noise Line
`Noise Line` draws some random line and circles based on `perlin noise`.
### parameters
- n: The number of random line.
```go
nl := generativeart.NewNoiseLine(1000)
```
2021-03-10 03:58:56 +00:00
![](../images/noiseline.png)
## Ocean Fish
`Ocean Fish` draws an ocean and some fishes in the center.
2021-03-10 03:58:56 +00:00
### parameters
- lineNum: The number of the line used to simulate the ocean wave.
- fishNum: The number of fish.
```go
o := generativeart.NewOceanFish(100, 8)
```
![](../images/oceanfish.png)
## Circle Loop2
`Circle loop2` draws a circle composed by colored circles.
### parameters
- depth: Control the number of circles.
```go
cl := generativeart.NewCircleLoop2(7)
```
![](../images/colorloop2.png)
## Pixel Hole
`Pixel Hole` draws a hole with colored dots.
### parameters
- dotN: The number of point in each iteration.
```go
ph := generativeart.NewPixelHole(60)
```
2021-03-12 07:18:07 +00:00
![](../images/pixelhole.png)
## Dots Wave
### parameters
- dotsN: The number of dots wave in the image.
```go
d := generativeart.NewDotsWave(300)
```
2021-03-16 03:33:09 +00:00
![](../images/dotswave.png)
## Circle Move
### parameters
- circleNum: The number of the circle in the image.
```go
cm := generativeart.NewCircleMove(1000)
```
![](../images/circlemove.png)