@@ -0,0 +1,1174 @@
+package com.nullprogram.noise;%0A%0Aimport java.awt.Color;%0Aimport java.awt.image.BufferedImage;%0Aimport java.io.File;%0Aimport java.io.IOException;%0Aimport javax.imageio.ImageIO;%0Aimport lombok.val;%0A%0Apublic final class Launcher %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        /* Create an image. */%0A        Noise noise = new PerlinNoise(0, 2);%0A        double max = 8.0;%0A        double step = 0.02;%0A        int size = (int) (max / step);%0A        val im = new BufferedImage(size, size, BufferedImage.TYPE_INT_RGB);%0A        for (int i = 0; i %3C size; i++) %7B%0A            double x = i * step;%0A            for (int j = 0; j %3C size; j++) %7B%0A                double y = j * step;%0A                Vector p = new Vector(x, y);%0A                double m = noise.sample(p);%0A                float v = (float) ((m + 1f / 3f) * 3f / 2f);%0A                int c = new Color(v, v, v).getRGB();%0A                im.setRGB(i, j, c);%0A            %7D%0A        %7D%0A%0A        /* Save the image. */%0A        try %7B%0A            ImageIO.write(im, %22PNG%22, new File(%22out.png%22));%0A        %7D catch (IOException e) %7B%0A            System.out.println(%22Failed to write image.%22);%0A            System.exit(-1);%0A        %7D%0A    %7D%0A%7D%0A

Create an output image for testing.