Chaos game: Difference between revisions
Content added Content deleted
Line 193: | Line 193: | ||
mid ancho=0, Let( mid ancho:= Div(ancho,2)) |
mid ancho=0, Let( mid ancho:= Div(ancho,2)) |
||
Cls |
|||
i=LIMITE |
i=LIMITE |
||
Void(pixeles) |
Void(pixeles) |
||
Loop |
Loop |
||
Ceil(Rand(3)), On gosub( EQ1, EQ2, EQ3 ) |
|||
If( Eq(vertice,1) ) |
|||
Set( Int(y), Int(x), color),Apndrow(pixeles) |
|||
⚫ | |||
⚫ | |||
⚫ | |||
Else If( Eq(vertice,2)) |
|||
⚫ | |||
⚫ | |||
⚫ | |||
Else |
|||
⚫ | |||
⚫ | |||
⚫ | |||
End If |
|||
Set( Int(y), Int(x), color),Apndrow(pixeles) |
|||
⚫ | |||
Back if (i) is not zero |
Back if (i) is not zero |
||
Set video graph(2) |
|||
Canvas-term |
Canvas-term |
||
Cls |
Cls |
||
i=1 |
i=1 |
||
Iterator(++i, Leq(i,LIMITE), Colorfore([i,3]Get(pixeles)), \ |
Iterator(++i, Leq(i,LIMITE), Colorfore([i,3]Get(pixeles)), \ |
||
Locate( [i,1]Get(pixeles), [i,2]Get(pixeles) ), Print(c) ) |
|||
Pause |
Pause |
||
Set video text |
|||
End |
End |
||
Subrutines |
|||
EQ1: |
|||
Let(x := Div(x, 2)) |
|||
⚫ | |||
⚫ | |||
EQ2: |
|||
⚫ | |||
⚫ | |||
⚫ | |||
EQ3: |
|||
⚫ | |||
⚫ | |||
⚫ | |||
</syntaxhighlight> |
</syntaxhighlight> |
||
{{out}} |
{{out}} |