Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
51
Task/Mandelbrot-set/Peri/mandelbrot-set.peri
Normal file
51
Task/Mandelbrot-set/Peri/mandelbrot-set.peri
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
###sysinclude standard.uh
|
||||
###sysinclude str.uh
|
||||
###sysinclude system.uh
|
||||
###sysinclude X.uh
|
||||
$ff0000 sto szin
|
||||
300 sto maxiter
|
||||
maxypixel sto YRES
|
||||
maxxpixel sto XRES
|
||||
myscreen "Mandelbrot" @YRES @XRES graphic
|
||||
#g
|
||||
@YRES 2 / (#d) sto y2
|
||||
@YRES 2 / (#d) sto x2
|
||||
@XRES i: {{
|
||||
@YRES {{
|
||||
{{}}§i #g !(#d) 480. - @x2 - @x2 /
|
||||
sto xx
|
||||
{{}} #g !(#d) @y2 - @y2 /
|
||||
sto yy
|
||||
zero#d xa zero#d ya zero iter
|
||||
|
||||
#d
|
||||
ciklus:
|
||||
@xa dup* @ya dup* - @xx +
|
||||
@xa 2. * @ya * @yy + sto ya
|
||||
sto xa ++()#g iter
|
||||
@xa dup* @ya dup* + 4. > @iter @maxiter >=#g |#g then §ciklusvége
|
||||
goto §ciklus
|
||||
ciklusvége:
|
||||
@iter @maxiter ==#g {
|
||||
myscreen {{}} {{}}§i @szin setpixel
|
||||
}{
|
||||
myscreen {{}} {{}}§i @iter 64 *#g setpixel
|
||||
}
|
||||
}}
|
||||
}}
|
||||
myscreen 10000 key?
|
||||
vége: myscreen inv graphic
|
||||
//."A lenyomott billentyű: " kprintnl
|
||||
end
|
||||
{ „xx” }
|
||||
{ „x2” }
|
||||
{ „yy” }
|
||||
{ „y2” }
|
||||
{ „xa” }
|
||||
{ „ya” }
|
||||
{ „iter” }
|
||||
{ „maxiter” }
|
||||
{ „szin” }
|
||||
{ „YRES” }
|
||||
{ „XRES” }
|
||||
{ „myscreen” }
|
||||
Loading…
Add table
Add a link
Reference in a new issue