Mandelbrot Se


posted by Richard Giles
02-17-2009

Downloads: 378
File size: 1kB
Views: 1,228

Embed
Mandelbrot Se
  1. <?xml version="1.0"?> 
  2. <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"
  3.     <CodeSnippet Format="1.0.0"
  4.         <Header> 
  5.             <Title>Mandelbrot Set</Title> 
  6.             <Shortcut /
  7.             <Description>creates a mandelbrot set </Description> 
  8.             <Author>Dr. Tobias Weltner http://www.powershell.de</Author> 
  9.             <SnippetTypes> 
  10.                 <SnippetType>Expansion</SnippetType> 
  11.             </SnippetTypes> 
  12.         </Header> 
  13.         <Snippet> 
  14.             <Code Language="PowerShell" Kind="10"><![CDATA[$i=$j=$r=$x=$y=[float]-16;  
  15. $colors="Black","DarkBlue","DarkGreen","DarkCyan","DarkRed","DarkMagenta","DarkYellow","Gray","DarkGray","Blue","Green","Cyan","Red","Magenta","Yellow","White" 
  16. while(($y++) -lt 15) { 
  17.     for($x=0; ($x++) -lt 84;  
  18.         write-host " " -backgroundcolor ($colors[$k -band 15]) -nonewline) { 
  19.         $i=$k=$r=[float]0; 
  20.         do{$j=$r*$r-$i*$i-2+$x/25;$i=2*$r*$i+$y/10;$r=$j}  
  21.         while (($j*$j+$i*$i) -lt 11 -band ($k++) -lt 111) 
  22.     
  23.     " " 
  24. }]]></Code> 
  25.         </Snippet> 
  26.     </CodeSnippet> 
  27. </CodeSnippets> 
Filed under: ,

Creates a mandelbrot set

Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.