virtualsue: adding a command line mandelbrot example

This is a snippet borrowed from rosettacode to avoid
submitting yet another hello, world example.

Change-Id: I4b812e0cbfec1f78bd0ad4567c0512cdce9f645b
Reviewed-on: https://go-review.googlesource.com/117175
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
diff --git a/virtualsue/asterisk.go b/virtualsue/asterisk.go
new file mode 100644
index 0000000..0ac44ee
--- /dev/null
+++ b/virtualsue/asterisk.go
@@ -0,0 +1,28 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "fmt"
+import "math/cmplx"
+
+func mandelbrot(a complex128) (z complex128) {
+	for i := 0; i < 50; i++ {
+		z = z*z + a
+	}
+	return
+}
+
+func main() {
+	for y := 1.0; y >= -1.0; y -= 0.05 {
+		for x := -2.0; x <= 0.5; x += 0.0315 {
+			if cmplx.Abs(mandelbrot(complex(x, y))) < 2 {
+				fmt.Print("*")
+			} else {
+				fmt.Print(" ")
+			}
+		}
+		fmt.Println("")
+	}
+}