Julia set: Difference between revisions

Content added Content deleted
(Added XPL0 example.)
Line 3,801: Line 3,801:
</pre>
</pre>
</small>
</small>

=={{header|Wren}}==
=={{header|Wren}}==
{{libheader|DOME}}
{{libheader|DOME}}
Line 3,851: Line 3,852:


var Game = JuliaSet.new(800, 600)</syntaxhighlight>
var Game = JuliaSet.new(800, 600)</syntaxhighlight>

=={{header|XPL0}}==
[[File:JuliaSetXPL0.png|200px|thumb|right]]
<syntaxhighlight lang "XPL0">def Cx = -0.72, Cy = 0.27;
def ScrW=800, ScrH=600;
int X, Y, Iter;
real Zx, Zy, T;
[SetVid($115);
for Y:= 0 to ScrH-1 do
for X:= 0 to ScrW-1 do
[Iter:= 0;
Zx:= 3.2 * float(X-ScrW/2) / float(ScrW);
Zy:= 2.4 * float(ScrH/2-Y) / float(ScrH);
while Zx*Zx + Zy*Zy < 4.0 and Iter < 300 do
[T:= Zx*Zx - Zy*Zy + Cx;
Zy:= 2.0*Zx*Zy + Cy;
Zx:= T;
Iter:= Iter+1;
];
Point(X, Y, Iter<<21+Iter<<8+Iter<<3);
];
]</syntaxhighlight>



=={{header|zkl}}==
=={{header|zkl}}==