Sierpinski triangle programs by 5 AI models
-
schrieb am 20. Juni 2025, 19:49 zuletzt editiert vonThis post did not contain any content.
-
This post did not contain any content.schrieb am 20. Juni 2025, 20:16 zuletzt editiert von
I'm disappointed that none of them seem to have gone with the random convergence approach.
Set the three corners of an equilateral triangle. Pick a random starting point on the canvas. Every iteration, pick a random corner from the triangle and your next point is the midpoint between the current point and that corner. While the original point is almost guaranteed not to be a point in Sierpinski's triangle, each iteration cuts the distance between the new point and the nearest Sierpinski point in half.
If you start plotting points starting with (say) the 50th one, every pixel is "close enough" to a Sierpinski point that you see the triangle materialize out of nothing. The whole thing could be programmed in about 20 lines of QBasic on DOS 30 years ago.
-
I'm disappointed that none of them seem to have gone with the random convergence approach.
Set the three corners of an equilateral triangle. Pick a random starting point on the canvas. Every iteration, pick a random corner from the triangle and your next point is the midpoint between the current point and that corner. While the original point is almost guaranteed not to be a point in Sierpinski's triangle, each iteration cuts the distance between the new point and the nearest Sierpinski point in half.
If you start plotting points starting with (say) the 50th one, every pixel is "close enough" to a Sierpinski point that you see the triangle materialize out of nothing. The whole thing could be programmed in about 20 lines of QBasic on DOS 30 years ago.
schrieb am 20. Juni 2025, 20:24 zuletzt editiert von monica_b1998@lemmy.worldrandom convergence
- isn't it the fourth one (NinjaTech)?
-
random convergence
- isn't it the fourth one (NinjaTech)?
schrieb am 20. Juni 2025, 20:26 zuletzt editiert vonOh, maybe! I didn't understand how it chose the points, but it does look like the random convergence approach.
Nice, thanks!
-
This post did not contain any content.schrieb am 21. Juni 2025, 01:14 zuletzt editiert von somethingsomethingidk@lemmy.world
Here's a cool video about it
https://yewtu.be/watch?v=kbKtFN71Lfs
Edit:
Meant to reply to msfroh, oops
-
This post did not contain any content.schrieb am 21. Juni 2025, 13:05 zuletzt editiert von
It's not pretty, but you can print one in a single line of python:
print(*["".join(" " if i & j else "MM" for j in range(64)) for i in range(64)], sep="\n")
-
It's not pretty, but you can print one in a single line of python:
print(*["".join(" " if i & j else "MM" for j in range(64)) for i in range(64)], sep="\n")
schrieb am 21. Juni 2025, 13:40 zuletzt editiert vonoh, wow! that's so cool!
-
-
Itch.io deindexes NSFW games after becoming the latest target of skittish credit card companies and anti-porn group Collective Shout, catching an award-winning indie and more in the crossfire
Technology vor 6 Tagen1
-
-
-
-
UK police working with controversial tech giant Palantir on real-time surveillance network
Technology 16. Juni 2025, 22:021
-
Oh Look, a New Censorship Tool: It's a new era for site-blocking bills — featuring some of the same ol' mistakes as before.
Technology 13. Juni 2025, 17:331
-