Event JSON
{
"id": "4c960ab72d979adec00c44dff87988ab1c4fa23c400288e4df945ea18ec032eb",
"pubkey": "584b33223e8ee56eec67a8307121493eb3c5400258ff3b295789e13b9a1527be",
"created_at": 1720227247,
"kind": 1,
"tags": [
[
"t",
"programming"
],
[
"proxy",
"https://tech.lgbt/@0x10f/112736812893888881",
"web"
],
[
"imeta",
"url https://media.tech.lgbt/media_attachments/files/112/736/803/714/253/461/original/fc249f5117d17312.png",
"m image/png"
],
[
"imeta",
"url https://media.tech.lgbt/media_attachments/files/112/736/805/102/004/019/original/244c0c69c1fac97e.png",
"m image/png"
],
[
"t",
"graphics"
],
[
"proxy",
"https://tech.lgbt/users/0x10f/statuses/112736812893888881",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://tech.lgbt/users/0x10f/statuses/112736812893888881",
"pink.momostr"
],
[
"expiration",
"1722886313"
]
],
"content": "Trying to approximate an image by drawing random rectangles:\n1) Start with a blank canvas (initialised to the average colour of the target image).\n2) Draw a rectangle with random width, height, X position, Y position and colour.\n3) If the rectangle makes the difference between current image and target image smaller, continue, otherwise undo the previous step.\n4) Go to 2.\n\nLeft image: Doom title screen. Right image: 320 rectangles added to a blank canvas.\n\nSource code (messy): https://pastebin.com/mpvK2LKQ\n\n#programming #graphics\nhttps://media.tech.lgbt/media_attachments/files/112/736/803/714/253/461/original/fc249f5117d17312.png\nhttps://media.tech.lgbt/media_attachments/files/112/736/805/102/004/019/original/244c0c69c1fac97e.png\n",
"sig": "7fdb8b6426201d1bfb0484bee65571e031e4e8291615ef72e88464d1965d476ad498cecf3ee14713e8c3b575fc1d4993b092b8bc8e745c08285c85e44cc7abd3"
}