Chaos game: Difference between revisions

Added Uiua solution
(Added Uiua solution)
Line 3,477:
XXX
</pre>
=={{header|Uiua}}==
<syntaxhighlight lang="Uiua">
Dim ← 500
Points ← [[50 ⌊÷2Dim] [-50Dim 50] [-50Dim -50Dim]]
Rand ← ⌊×⚂
 
⍜(⊡|+[1 1 1]) Points ↯Dim_Dim_3 0
⊟Rand Dim Rand Dim
⍥(
Rand⧻Points
# Set next point and colour based on target.
⊃(⌊÷2+ ⊡:Points|⊙◌⍜⊡1:↯3 0)
⟜⍜⊡(◌)⊙:
)20000
# Uncomment to save image.
# &fwa "UiuaChaosGameSerpinski.png" &ime "png"
</syntaxhighlight>
{{out}}
[[File:UiuaChaosGameSerpinski.png|thumb|center|Render using colours associated with each target point.]]
 
=={{header|Wren}}==
{{trans|Kotlin}}
107

edits