gitpan / math-fractal-julia Goto Github PK
View Code? Open in Web Editor NEWRead-only release history for Math-Fractal-Julia
Home Page: http://metacpan.org/release/Math-Fractal-Julia
License: Other
Read-only release history for Math-Fractal-Julia
Home Page: http://metacpan.org/release/Math-Fractal-Julia
License: Other
NAME Math::Fractal::Julia - Calculate points in the Julia set VERSION version 0.000003 SYNOPSIS use Math::Fractal::Julia; # Procedural usage: Math::Fractal::Julia->set_max_iter($iters); Math::Fractal::Julia->set_limit($limit); Math::Fractal::Julia->set_bounds( $x1, $y1, $x2, $y2, $w, $h ); Math::Fractal::Julia->set_constant( $cx, $cy ); for my $y ( 0 .. $h - 1 ) { for my $x ( 0 .. $w - 1 ) { my $iter = Math::Fractal::Julia->point( $x, $y ); } } # Object Oriented usage: my $julia = Math::Fractal::Julia->new(%options); $julia->set_max_iter($iters); $julia->set_limit($limit); $julia->set_bounds( $x1, $y1, $x2, $y2, $w, $h ); $julia->set_constant( $cx, $cy ); for my $y ( 0 .. $h - 1 ) { for my $x ( 0 .. $w - 1 ) { my $iter = $julia->point( $x, $y ); } } DESCRIPTION Calculates points in the set named after the French mathematician Gaston Julia. The procedural interface is based on that provided by Math::Fractal::Mandelbrot. METHODS new Arguments: %options? Return value: A Math::Fractal::Julia object Creates a new Math::Fractal::Object. If no options are provided, the default values will be used. options The "options" hash may contain any or all of the following: max_iter => $iters limit => $limit bounds => [ $x1, $x2, $y1, $y2, $width, $height ] constant => [ $cx, $cy ] The default maximum number of iterations is 600. The default limit is 5. The default bounds is [-2.2, -1.1, 1.0, 1.1, 640, 480]. The default constant is [0.0, 0.0]. my $julia = Math::Fractal::Julia->new(); my $julia = Math::Fractal::Julia->new(%options); my $julia = Math::Fractal::Julia->new( max_iter => $iters, limit => $limit, bounds => [ $x1, $x2, $y1, $y2, $width, $height ], constant => [ $cx, $cy ], ); set_max_iter Arguments: $max Return value: undefined Set the maximum number of iterations. The default value is 600. Math::Fractal::Julia->set_max_iter($max); $julia->set_max_iter($max); set_limit Arguments: $limit Return value: undefined The default value is 5. Math::Fractal::Julia->set_limit($limit); $julia->set_limit($limit); set_bounds Arguments: $x1, $y1, $x2, $y2, $width, $height Return value: undefined Set the bounds of the set. The first four values ($x1, $y1, $x2, $y2) define a rectangle. The remaining two ($width, $height) define a viewport. The default values are (-2.2, -1.1, 1.0, 1.1, 640, 480). Math::Fractal::Julia->set_bounds( $x1, $y1, $x2, $y2, $width, $height ); $julia->set_bounds( $x1, $x2, $y1, $y2, $width, $height ); set_constant Arguments: $cx, $cy Return value: undefined The default values are (0.0, 0.0). Math::Fractal::Julia->set_constant( $cx, $cy ); $julia->set_constant( $cx, $cy ); point Arguments: $x, $y Return value: The number of iterations needed to exceed the limit or 0 if the the limit is not exceeded. This function translates the coordinates using the bounds and then iterates. $iters = Math::Fractal::Julia->point( $x, $y ); $iters = $julia->point( $x, $y ); CAVEATS * This module is not thread-safe. * Any packages derived from "Math::Fractal::Julia" will share the same internal state when the procedural interface is used. SEE ALSO * Math::Fractal::Mandelbrot * Julia set <http://en.wikipedia.org/wiki/Julia_set> AUTHOR Jeffrey T. Palmer <[email protected]> COPYRIGHT AND LICENSE This software is copyright (c) 2012 by Jeffrey T. Palmer. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.