Alex Ayars > Math-Fractal-Noisemaker-0.105 > Math::Fractal::Noisemaker

Download:
Math-Fractal-Noisemaker-0.105.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.105   Source  

NAME ^

Math::Fractal::Noisemaker - Visual noise generator

VERSION ^

This document is for version 0.105 of Math::Fractal::Noisemaker.

SYNOPSIS ^

  use Math::Fractal::Noisemaker;

  Math::Fractal::Noisemaker::make();

See MAKE ARGS.

A command-line utility, make-noise, is included with this distribution. make-noise is a complete wrapper to this module.

  make-noise -h
  make-noise -h types

DESCRIPTION ^

Math::Fractal::Noisemaker provides a simple functional interface for generating several types of two-dimensional grayscale noise, which may be combined in interesting and novel ways.

This module isn't fast, but it can output production-quality noise for use in games or other media, and also serve as an educational toy.

FUNCTION ^

NOISE TYPES ^

To specify a noise type, use the type arg, for example:

  make-noise -type gradient

If generating multi-res noise, any single-res noise type may be specified as the slice type (stype), for example:

  make-noise -type ridged -stype gradient

SINGLE-RES NOISE

MULTI-RES TYPES

Multi-res noise combines the values from multiple 2D slices (octaves), which are generated using progressively higher frequencies and lower amplitudes.

The slice type used for generating multi-res noise may be controlled with the stype argument. Any single-res type may be specified.

The default slice type is smoothed white noise.

BONUS NOISE

NOISE ARGS ^

MAKE ARGS

In addition to any argument appropriate to the type of noise being generated, make accepts the following args in hash key form:

SINGLE-RES ARGS

Single-res noise consumes the following arguments in hash key form:

MULTI-RES ARGS

In addition to any of the args which may be used for single-res noise types, Multi-res types consume the following arguments in hash key form:

GEL TYPE ARGS

The "gel" types (gel, sgel, pgel, wgel) accept the following additional arguments:

FRACTAL ARGS

TERRA ARGS

In addition to all single-res and multi-res args, terra noise consumes the following args in hash key form:

BUGS AND LIMITATIONS ^

Noisemaker was written in Perl as an exploration of the included algorithms, and is much slower than, say, something written in C and optimized for speed.

This module only produces single-channel two-dimensional noise-- false colormaps don't count!

Image file types are limited to the types supported by Imager on your host.

Some noise algorithms might not be implemented "by the book".

SEE ALSO ^

Imager, Math::Trig, Tie::CArray

Check out the examples set on Flickr:

http://www.flickr.com/photos/aayars/sets/72157622726199318/

Math::Fractal::Noisemaker is on GitHub: http://github.com/aayars/noisemaker

Inspiration and/or pseudocode borrowed from these notable sources:

... and a host of others.

To learn more about the art of making noise, one might start here:

AUTHOR ^

  Alex Ayars <pause@nodekit.org>

COPYRIGHT ^

  File: Math/Fractal/Noisemaker.pm
 
  Copyright (C) 2009, 2010 Alex Ayars <pause@nodekit.org>

  This program is free software; you can redistribute it and/or modify
  it under the same terms as Perl 5.10.0 or later. See:
  http://dev.perl.org/licenses/
syntax highlighting: