Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
21
Task/Julia-set/VBScript/julia-set.vb
Normal file
21
Task/Julia-set/VBScript/julia-set.vb
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
'ASCII Julia set. Translated from lua. Run with CScript
|
||||
'Console should be 135x50 to avoid wrapping and scroll
|
||||
sub pause() wscript.stdout.write "Press Enter to Continue":wscript.stdin.readline: end sub
|
||||
cmap=array(" ", ".", ":", "-", "=", "+", "*", "#", "%", "$", "@" )
|
||||
for y = -1.0 to 1.0 step 0.05
|
||||
for x = -1.5 to 1.5 step 0.025
|
||||
zr=x
|
||||
zi=y
|
||||
i=0
|
||||
do while i < 100
|
||||
zr1 = zr*zr - zi*zi - 0.79
|
||||
zi=zr * zi * 2 + 0.15
|
||||
zr=zr1
|
||||
if (zr*zr + zi*zi) > 4. then exit do
|
||||
i = i + 1
|
||||
loop
|
||||
wscript.stdout.write cmap(i\10)
|
||||
next
|
||||
wscript.stdout.write vbcrlf
|
||||
Next
|
||||
pause
|
||||
Loading…
Add table
Add a link
Reference in a new issue