experiments and stuff

This commit is contained in:
2026-03-05 00:55:17 +03:00
parent 84d241e619
commit 3677407f05
5 changed files with 7 additions and 4 deletions

View File

Before

Width:  |  Height:  |  Size: 424 KiB

After

Width:  |  Height:  |  Size: 424 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

@@ -5,6 +5,8 @@ import (
"image/color"
)
const side = 16
type grid struct {
color.Gray
}
@@ -14,16 +16,17 @@ func (_ grid) ColorModel() color.Model {
}
func (_ grid) Bounds() image.Rectangle {
return image.Rect(0, 0, 8, 8)
return image.Rect(0, 0, side, side)
}
func (g grid) At(x, y int) color.Color {
n := g.Gray.Y / 4
n := uint8(g.Gray.Y * 10)
if n == 0 {
return color.Black
}
step := int(64 / n)
if (y*8+x)%step == 0 {
step := int((side*side-1) / n)
if (y*side+x)%step == 0 {
return color.White
}
return color.Black