Brownian tree: Difference between revisions
m
→{{header|Uiua}}: improved algorithm
(Added Uiua solution) |
m (→{{header|Uiua}}: improved algorithm) |
||
Line 5,428:
<syntaxhighlight lang="Uiua">
S ← 80
# Create SxS grid, and set the centre point as seed.▼
⍜⊡(+1)↯2⌊÷2S ↯ S_S 0
RandInt ← ⌊×⚂
RandPoint ← ([⍥(RandInt S)2]) # [[Here] [Last pos]]
▲# Create SxS grid, and set the centre point as seed.
# Update the pair to be a new adjacent [[Here] [Last]]
Move ← ⊟∵(-1+⌊RandInt 3).⊢
Line 5,450 ⟶ 5,449:
# &fwa "BrownianTree.png"
</syntaxhighlight>
=={{header|Visual Basic .NET}}==
|