Mandelbrot set: Difference between revisions
Content added Content deleted
m (→{{header|ALGOL W}}: try ada sytrax highlighting...) |
(missed some <lang> elements) |
||
Line 1,240: | Line 1,240: | ||
==={{header|DEC BASIC-PLUS}}=== |
==={{header|DEC BASIC-PLUS}}=== |
||
Works under RSTS/E v7.0 on the [[wp:SIMH|simh]] PDP-11 emulator. For installation procedures for RSTS/E, see [http://www.eecis.udel.edu/~mader/delta/downloadrsts.html here]. |
Works under RSTS/E v7.0 on the [[wp:SIMH|simh]] PDP-11 emulator. For installation procedures for RSTS/E, see [http://www.eecis.udel.edu/~mader/delta/downloadrsts.html here]. |
||
< |
<syntaxhighlight>10 X1=59\Y1=21 |
||
20 I1=-1.0\I2=1.0\R1=-2.0\R2=1.0 |
20 I1=-1.0\I2=1.0\R1=-2.0\R2=1.0 |
||
30 S1=(R2-R1)/X1\S2=(I2-I1)/Y1 |
30 S1=(R2-R1)/X1\S2=(I2-I1)/Y1 |
||
Line 3,473: | Line 3,473: | ||
Implementation in Google Dart works on http://try.dartlang.org/ (as of 10/18/2011) since the language is very new, it may break in the future. |
Implementation in Google Dart works on http://try.dartlang.org/ (as of 10/18/2011) since the language is very new, it may break in the future. |
||
The implementation uses a incomplete Complex class supporting operator overloading. |
The implementation uses a incomplete Complex class supporting operator overloading. |
||
< |
<syntaxhighlight>class Complex { |
||
double _r,_i; |
double _r,_i; |
||
Line 3,682: | Line 3,682: | ||
[https://easylang.online/apps/mandelbrot.html Run it] |
[https://easylang.online/apps/mandelbrot.html Run it] |
||
< |
<syntaxhighlight>for y0 range 300 |
||
cy = (y0 - 150) / 120 |
cy = (y0 - 150) / 120 |
||
for x0 range 300 |
for x0 range 300 |
||
Line 7,353: | Line 7,353: | ||
=={{header|Maple}}== |
=={{header|Maple}}== |
||
< |
<syntaxhighlight>ImageTools:-Embed(Fractals[EscapeTime]:-Mandelbrot(500, -2.0-1.35*I, .7+1.35*I, output = layer1));</syntaxhighlight> |
||
=={{header|Mathematica}} / {{header|Wolfram Language}}== |
=={{header|Mathematica}} / {{header|Wolfram Language}}== |
||
Line 10,620: | Line 10,620: | ||
uBasic does not support floating point calculations, so fixed point arithmetic is used, with Value 10000 representing 1.0. The Mandelbrot image is drawn using ASCII characters 1-9 to show number of iterations. Iteration count 10 or more is represented with '@'. To compensate the aspect ratio of |
uBasic does not support floating point calculations, so fixed point arithmetic is used, with Value 10000 representing 1.0. The Mandelbrot image is drawn using ASCII characters 1-9 to show number of iterations. Iteration count 10 or more is represented with '@'. To compensate the aspect ratio of |
||
the font, step sizes in x and y directions are different. |
the font, step sizes in x and y directions are different. |
||
< |
<syntaxhighlight>A =-21000 ' Left Edge = -2.1 |
||
B = 15000 ' Right Edge = 1.5 |
B = 15000 ' Right Edge = 1.5 |
||
C = 15000 ' Top Edge = 1.5 |
C = 15000 ' Top Edge = 1.5 |