2 * Introduction to fractals::
3 * Definitions for IFS fractals::
4 * Definitions for complex fractals::
5 * Definitions for Koch snowflakes::
6 * Definitions for Peano maps::
9 @node Introduction to fractals, Definitions for IFS fractals, Package fractals, Package fractals
10 @section Introduction to fractals
13 This package defines some well known fractals:
15 - with random IFS (Iterated Function System): the Sierpinsky triangle, a
18 - Complex Fractals: the Mandelbrot and Julia Sets
20 - the Koch snowflake sets
22 - Peano maps: the Sierpinski and Hilbert maps
24 Author: Jos@'e Ram@'{@dotless{i}}rez Labrador.
26 For questions, suggestions and bugs, please feel free
29 pepe DOT ramirez AAATTT uca DOT es
31 @node Definitions for IFS fractals, Definitions for complex fractals, Introduction to fractals, Package fractals
32 @section Definitions for IFS fractals
34 Some fractals can be generated by iterative applications
35 of contractive affine transformations in a random way; see
37 Hoggar S. G., "Mathematics for computer graphics", Cambridge University
40 We define a list with several contractive affine transformations,
41 and we randomly select the transformation in a recursive way.
42 The probability of the choice of a transformation must be related
43 with the contraction ratio.
45 You can change the transformations and find another fractal
47 @anchor{sierpinskiale}
48 @deffn {Function} sierpinskiale (@var{n})
50 Sierpinski Triangle: 3 contractive maps; .5 contraction constant and translations;
51 all maps have the same contraction ratio. Argument @var{n} must be great enough, 10000 or greater.
56 (%i1) load("fractals")$
58 (%i3) plot2d([discrete,sierpinskiale(n)], [style,dots])$
61 @opencatbox{Categories:}
62 @category{Package fractals}
68 @deffn {Function} treefale (@var{n})
70 3 contractive maps all with the same contraction ratio.
71 Argument @var{n} must be great enough, 10000 or greater.
76 (%i1) load("fractals")$
78 (%i3) plot2d([discrete,treefale(n)], [style,dots])$
81 @opencatbox{Categories:}
82 @category{Package fractals}
88 @deffn {Function} fernfale (@var{n})
90 4 contractive maps, the probability to choice a transformation must be related
91 with the contraction ratio. Argument @var{n} must be great enough, 10000 or greater.
96 (%i1) load("fractals")$
98 (%i3) plot2d([discrete,fernfale(n)], [style,dots])$
101 @opencatbox{Categories:}
102 @category{Package fractals}
107 @node Definitions for complex fractals, Definitions for Koch snowflakes, Definitions for IFS fractals, Top
108 @section Definitions for complex fractals
110 @anchor{mandelbrot_set}
111 @deffn {Function} mandelbrot_set (@var{x}, @var{y})
117 This program is time consuming because it must make a lot of operations;
118 the computing time is also related with the number of grid points.
121 (%i1) load("fractals")$
122 (%i2) plot3d (mandelbrot_set, [x, -2.5, 1], [y, -1.5, 1.5],
123 [gnuplot_preamble, "set view map"],
124 [gnuplot_pm3d, true],
128 @opencatbox{Categories:}
129 @category{Package fractals}
137 @deffn {Function} julia_set (@var{x}, @var{y})
141 This program is time consuming because it must make a lot of operations;
142 the computing time is also related with the number of grid points.
147 (%i1) load("fractals")$
148 (%i2) plot3d (julia_set, [x, -2, 1], [y, -1.5, 1.5],
149 [gnuplot_preamble, "set view map"],
150 [gnuplot_pm3d, true],
154 See also @mref{julia_parameter}.
156 @opencatbox{Categories:}
157 @category{Package fractals}
164 @anchor{julia_parameter}
165 @defvr {Optional variable} julia_parameter
166 Default value: @mref{%i}
168 Complex parameter for Julia fractals.
169 Its default value is @mref{%i}; we suggest the values @code{-.745+%i*.113002},
170 @code{-.39054-%i*.58679}, @code{-.15652+%i*1.03225}, @code{-.194+%i*.6557} and
171 @code{.011031-%i*.67037}.
173 @opencatbox{Categories:}
174 @category{Package fractals}
183 @deffn {Function} julia_sin (@var{x}, @var{y})
185 While function @code{julia_set} implements the transformation @code{julia_parameter+z^2},
186 function @code{julia_sin} implements @code{julia_parameter*sin(z)}. See source code
189 This program runs slowly because it calculates a lot of sines.
193 This program is time consuming because it must make a lot of operations;
194 the computing time is also related with the number of grid points.
197 (%i1) load("fractals")$
198 (%i2) julia_parameter:1+.1*%i$
199 (%i3) plot3d (julia_sin, [x, -2, 2], [y, -3, 3],
200 [gnuplot_preamble, "set view map"],
201 [gnuplot_pm3d, true],
205 See also @mref{julia_parameter}.
207 @opencatbox{Categories:}
208 @category{Package fractals}
213 @node Definitions for Koch snowflakes, Definitions for Peano maps, Definitions for complex fractals, Top
214 @section Definitions for Koch snowflakes
219 @deffn {Function} snowmap (@var{ent}, @var{nn})
221 Koch snowflake sets. Function @code{snowmap} plots the snow Koch map
222 over the vertex of an initial closed polygonal, in the complex plane. Here
223 the orientation of the polygon is important. Argument @var{nn} is the number of
224 recursive applications of Koch transformation; @var{nn} must be small (5 or 6).
229 (%i1) load("fractals")$
230 (%i2) plot2d([discrete,
231 snowmap([1,exp(%i*%pi*2/3),exp(-%i*%pi*2/3),1],4)])$
232 (%i3) plot2d([discrete,
233 snowmap([1,exp(-%i*%pi*2/3),exp(%i*%pi*2/3),1],4)])$
234 (%i4) plot2d([discrete, snowmap([0,1,1+%i,%i,0],4)])$
235 (%i5) plot2d([discrete, snowmap([0,%i,1+%i,1,0],4)])$
238 @opencatbox{Categories:}
239 @category{Package fractals}
244 @node Definitions for Peano maps, , Definitions for Koch snowflakes, Package fractals
245 @section Definitions for Peano maps
247 Continuous curves that cover an area. Warning:
248 the number of points exponentially grows with @var{n}.
251 @deffn {Function} hilbertmap (@var{nn})
253 Hilbert map. Argument @var{nn} must be small (5, for example).
254 Maxima can crash if @var{nn} is 7 or greater.
259 (%i1) load("fractals")$
260 (%i2) plot2d([discrete,hilbertmap(6)])$
263 @opencatbox{Categories:}
264 @category{Package fractals}
269 @anchor{sierpinskimap}
270 @deffn {Function} sierpinskimap (@var{nn})
272 Sierpinski map. Argument @var{nn} must be small (5, for example).
273 Maxima can crash if @var{nn} is 7 or greater.
278 (%i1) load("fractals")$
279 (%i2) plot2d([discrete,sierpinskimap(6)])$
282 @opencatbox{Categories:}
283 @category{Package fractals}