private static void GetAnEdgeWithRaster() { RandomWalk rw = new RandomWalk(10000000, true, false, null, null); Space Edge = rw.GetSpace().GetEdgeUsingRaster(); Bitmap b = Space.DrawToBitmap(Edge, false, new Palette() { Colors = new RingBuffer<Color>(new List<Color> { Color.White }) }, new Palette { Colors = new RingBuffer<Color>(new List<Color> { Color.White }) }); b.Save(@"C:\Users\kylan_000\Desktop\Test Projects\Random Bitmaps\RandomArt.2014\" + "Space " + "Random Walk EdgeWithRaster" + DateTime.Now.Month + "-" + DateTime.Now.Day + "-" + DateTime.Now.Year + " " + DateTime.Now.Hour + "h" + DateTime.Now.Minute + "m" + DateTime.Now.Second + "s" + ".bmp", System.Drawing.Imaging.ImageFormat.Bmp); }
private static void ConstructUnion() { RandomWalk rw1 = new RandomWalk(10000000, true, false, null, null); RandomWalk rw2 = new RandomWalk(10000000, true, false, null, null); Space union = Space.Union(rw1.GetSpace(), rw2.GetSpace()); Bitmap b = Space.DrawToBitmap(union, true, Palette.GeneratePallette(Color.Black, 5000, 255, 5), Palette.GeneratePallette(Color.White, 50, 255, 5)); b.Save(@"C:\Users\kylan_000\Desktop\Test Projects\Random Bitmaps\RandomArt.2014\" + "Space " + "Random Walk Union" + DateTime.Now.Month + "-" + DateTime.Now.Day + "-" + DateTime.Now.Year + " " + DateTime.Now.Hour + "h" + DateTime.Now.Minute + "m" + DateTime.Now.Second + "s" + ".bmp", System.Drawing.Imaging.ImageFormat.Bmp); }
private static void ConstructIntersections() { int randomWalkLength = 10000000; Timer workTime = new Timer(); for (int i = 0; i < 5; i++) { RandomWalk r1 = new RandomWalk(randomWalkLength, true); workTime.WriteTime(); RandomWalk r2 = new RandomWalk(randomWalkLength, true, false, r1.GetSpace().ElementAt(r1.GetSpace().Count / 2), null); workTime.WriteTime(); Console.WriteLine("Taking the intersection..."); System.Drawing.Bitmap b = Space.DrawToBitmap(Space.GetIntersection(r1.GetSpace(), r2.GetSpace()), true, Palette.GetNeighborhood(Color.WhiteSmoke, 100), Palette.GetNeighborhood(Color.DeepSkyBlue,10)); workTime.WriteTime(); b.Save(@"C:\Users\kylan_000\Desktop\Test Projects\Random Bitmaps\RandomArt.2014\" + "Space " + "Random Walk " + DateTime.Now.Month + "-" + DateTime.Now.Day + "-" + DateTime.Now.Year + " " + DateTime.Now.Hour + "h" + DateTime.Now.Minute + "m" + DateTime.Now.Second + "s" + ".bmp", System.Drawing.Imaging.ImageFormat.Bmp); r1 = null; r2 = null; } Console.WriteLine("Press any key to exit..."); Console.ReadKey(); }
private static void MakeRandomSpaces() { for (int i = 0; i < 5; i++) { RandomWalk r1 = new RandomWalk(10000000, true, false); Space randomSpace1 = r1.GetSpace(); Space edge = Space.GetEdge(randomSpace1); System.Drawing.Bitmap bmp = Space.DrawToBitmap(edge, true, Palette.Greens(), Palette.GetNeighborhood(Color.WhiteSmoke,150)); bmp.Save(@"C:\Users\kylan_000\Desktop\Test Projects\Random Bitmaps\RandomArt.2014\" + "Space " + "Random Walk " + DateTime.Now.Month + "-" + DateTime.Now.Day + "-" + DateTime.Now.Year + " " + DateTime.Now.Hour + "h" + DateTime.Now.Minute + "m" + DateTime.Now.Second + "s" + ".bmp", System.Drawing.Imaging.ImageFormat.Bmp); r1 = null; } }
private static void DrawAndSaveRandomBitmaps() { int i = 0; while (i < 10) { RandomWalk r = new RandomWalk(100000000, false, true, null, @"C:\Users\kylan_000\Desktop\Test Projects\Random Bitmaps\RandomArt.2014\"); i++; r = null; } }