Sign in
|
Join PowerShell.com!
|
Help
Home
PowerTips
Ask the Experts
Forums
Webcasts
Blogs
eBook
Script Library
Twitter Grid
Modules
QuickClick
Scripts
Snippets
Videos
Library
»
Snippet Library
»
Samples
»
Mandelbrot Se
Mandelbrot Se
Share
|
Browse Library
Module Library
QuickClick Library
Script Library
Snippet Library
ADSI
Comparison
Conditions and Loops
.Net
Exception Handlers
Files and Folders
Functions
Headers
Includes
Network
Pipeline
PowerShell Internals
Registry
Samples
Script Functions Templates
Security
SQL Server
Templates
User Management
WMI
Video Library
Members Only
Tags
Mandelbrot
Snippet
telnet
Write-Host
View more
Previous
|
Next
|
View all files
|
View Slideshow
Download
posted by
Richard Giles
02-17-2009
Downloads: 378
File size: 1kB
Views: 1,228
Embed
Mandelbrot Se
<?
xml
version
=
"1.0"
?>
<CodeSnippets xmlns
=
"http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"
>
<CodeSnippet Format
=
"1.0.0"
>
<Header>
<Title>Mandelbrot Set<
/
Title>
<Shortcut
/
>
<Description>creates a mandelbrot set <
/
Description>
<Author>Dr. Tobias Weltner http:
//
www.powershell.de
<
/
Author>
<SnippetTypes>
<SnippetType>Expansion<
/
SnippetType>
<
/
SnippetTypes>
<
/
Header>
<Snippet>
<Code Language
=
"PowerShell"
Kind
=
"10"
><
!
[CDATA[
$i
=
$j
=
$r
=
$x
=
$y
=
[
float
]
-
16;
$colors
=
"Black"
,
"DarkBlue"
,
"DarkGreen"
,
"DarkCyan"
,
"DarkRed"
,
"DarkMagenta"
,
"DarkYellow"
,
"Gray"
,
"DarkGray"
,
"Blue"
,
"Green"
,
"Cyan"
,
"Red"
,
"Magenta"
,
"Yellow"
,
"White"
while
((
$y
++
)
-lt
15) {
for(
$x
=
0; (
$x
++
)
-lt
84;
write-host
" "
-backgroundcolor
(
$colors
[
$k
-band
15])
-nonewline
) {
$i
=
$k
=
$r
=
[
float
]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)
}
" "
}]]><
/
Code>
<
/
Snippet>
<
/
CodeSnippet>
<
/
CodeSnippets>
Filed under:
Snippet
,
Mandelbrot
Creates a mandelbrot set
Copyright 2011 PowerShell.com. All rights reserved.