Data update
This commit is contained in:
parent
0df55f9f24
commit
aec8ed51b6
1045 changed files with 18889 additions and 2777 deletions
20
Task/Chaos-game/Uiua/chaos-game.uiua
Normal file
20
Task/Chaos-game/Uiua/chaos-game.uiua
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
Dim ← 500
|
||||
Points ← [[50 ⌊÷2Dim] [-50Dim 50] [-50Dim -50Dim]]
|
||||
# Uncomment to try different square or pentagonal references.
|
||||
# Points ← [[50 50] [-50Dim 50] [50 -50Dim][-50Dim -50Dim]]
|
||||
# Points ← [[50 ⌊÷2Dim] [⌊×0.4Dim 50] [⌊×0.4Dim -50Dim] [-50Dim 120] [-50Dim -120Dim]]
|
||||
Colours ← [[1 0 0] [0 1 0] [0 0 1] [1 1 0] [1 0 1] [0 1 1]]
|
||||
Rand ← ⌊×⚂
|
||||
|
||||
↯Dim_Dim_3 0
|
||||
∧(⍜(⊡|[1 1 1]◌))Points
|
||||
⊟Rand Dim Rand Dim
|
||||
⍥(
|
||||
Rand⧻Points
|
||||
# Set next point and colour based on target.
|
||||
⊃(⌊÷2+⊡:Points|⊙◌⊡:Colours)
|
||||
⟜⍜⊡◌⊙:
|
||||
)10000
|
||||
◌
|
||||
# Uncomment to save image.
|
||||
# &fwa "UiuaChaosGameSerpinski.png" &ime "png"
|
||||
Loading…
Add table
Add a link
Reference in a new issue