Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
20
Task/Mandelbrot-set/PowerShell/mandelbrot-set.psh
Normal file
20
Task/Mandelbrot-set/PowerShell/mandelbrot-set.psh
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
$x = $y = $i = $j = $r = -16
|
||||
$colors = [Enum]::GetValues([System.ConsoleColor])
|
||||
|
||||
while(($y++) -lt 15)
|
||||
{
|
||||
for($x=0; ($x++) -lt 84; Write-Host " " -BackgroundColor ($colors[$k -band 15]) -NoNewline)
|
||||
{
|
||||
$i = $k = $r = 0
|
||||
|
||||
do
|
||||
{
|
||||
$j = $r * $r - $i * $i -2 + $x / 25
|
||||
$i = 2 * $r * $i + $y / 10
|
||||
$r = $j
|
||||
}
|
||||
while (($j * $j + $i * $i) -lt 11 -band ($k++) -lt 111)
|
||||
}
|
||||
|
||||
Write-Host
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue