Julia set: Difference between revisions
Content added Content deleted
Antoni Gual (talk | contribs) Tag: Manual revert |
Antoni Gual (talk | contribs) |
||
Line 3,577: | Line 3,577: | ||
##</pre> |
##</pre> |
||
=={{header|VBScript}}== |
|||
<syntaxhighlight lang="vb"> |
|||
'ASCII Julia set. Translated from lua. Run with CScript |
|||
'Console should be 135x50 to avoid wrapping and scroll |
|||
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 |
|||
</syntaxhighlight> |
|||
{{out}}<small> |
|||
<pre> |
|||
.: |
|||
=@=:.#: |
|||
%@=:@%@ |
|||
..::::#. |
|||
:.+=-:+@--% |
|||
=+- .#+@@::::@-....--@:.@..$@ |
|||
.@*:.**=@=::::...=@@@*@@::@-# |
|||
:-:::*@@@-:::::--@@%@*+=+::%+:. -@+ |
|||
%@-=@@@==*@**=*@:%#*@@%@@@@@@@*@@#:-. @:.@@@+:- |
|||
- .$-==@%**@@==--*@@@@====@@@-#=@@@%@: -@+:%@@:::. |
|||
@@:@. .@ @*:=*@%@@@@*++@%@@@@#-#*-::::=:::*@@#+. .+%@%*@$=+:%%@@=-- |
|||
$-$-..@@#*:@... + .:=#@@@@@%@@@@@*$#@=:::@::::::::::-+%@.....%@@@@*+##@@=*@@@# |
|||
..:@=:::.*@%@=@#%*+:.@. ..:@@$@@@@%**%==+=*$:::::::::::::::::-+@....@@$@#*@+@@:=::::=- +:@= |
|||
.::@@#-:%*@=*@@-=@@=*@@@.......@-@+@*@@*+@=--==:::::::::::::@$=*---@=....=@=@@=-*=:::::::-@.-@@*#@. |
|||
-+@*@@=+@@@*%::::::::@+*$@......@=+@+@@@@@@--@=@::......:-@@===+*--#@....::@@@@@::...:@=@=+.:@@:::-.%@ |
|||
: .+. =#@@@@@+#@:::::::::::::-=@-.......:*==*#@@@#@@:::.......:-+=-=+%===@::...:::-#%#@+:...@-:::::##@$.@$- |
|||
@@-$=@==@+...-+@@+@==@::::::::-#@@----@=.......::=%@@@@@@@%=::.......=@----@@#-::::::::@==@+@@+-...+@==@=$-@@ |
|||
-$@.$@##:::::-@...:+@#%#-:::...::@===%+=-=+-:.......:::@@#@@@#*==*:.......-@=-:::::::::::::@#+@@@@@#= .+. : |
|||
@%.-:::@@:.+=@=@:...::@@@@@::....@#--*+===@@-:......::@=@--@@@@@@+@+=@......@$*+@::::::::%*@@@+=@@*@+- |
|||
.@#*@@-.@-:::::::=*-=@@=@=....=@---*=$@:::::::::::::==--=@+*@@*@+@-@.......@@@*=@@=-@@*=@*%:-#@@::. |
|||
=@:+ -=::::=:@@+@*#@$@@....@+-:::::::::::::::::$*=+==%**%@@@@$@@:.. .@.:+*%#@=@%@*.:::=@:.. |
|||
#@@@*=@@##+*@@@@%.....@%+-::::::::::@:::=@#$*@@@@@%@@@@@#=:. + ...@:*#@@..-$-$ |
|||
--=@@%%:+=$@*%@%+. .+#@@*:::=::::-*#-#@@@@%@++*@@@@%@*=:*@ @. .@:@@ |
|||
.:::@@%:+@- :@%@@@=#-@@@====@@@@*--==@@**%@==-$. - |
|||
-:+@@@.:@ .-:#@@*@@@@@@@%@@*#%:@*=**@*==@@@=-@% |
|||
+@- .:+%::+=+*@%@@--:::::-@@@*:::-: |
|||
#-@::@@*@@@=...::::=@=**.:*@. |
|||
@$..@.:@--....-@::::@@+#. -+= |
|||
%--@+:-=+.: |
|||
.#::::.. |
|||
@%@:=@% |
|||
:#.:=@= |
|||
:. |
|||
</pre> |
|||
</small> |
|||
=={{header|Wren}}== |
=={{header|Wren}}== |
||
{{libheader|DOME}} |
{{libheader|DOME}} |