summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.txt837
-rw-r--r--debian/changelog48
-rw-r--r--debian/compat1
-rw-r--r--debian/control12
-rw-r--r--debian/copyright340
-rwxr-xr-xdebian/rules98
-rw-r--r--docstring.c200
-rw-r--r--flam3-animate.c297
-rw-r--r--flam3-animate.man36
-rw-r--r--flam3-genome.c1058
-rw-r--r--flam3-genome.man36
-rw-r--r--flam3-render.c229
-rw-r--r--flam3-render.man36
-rw-r--r--flam3.c29
-rw-r--r--flam3.h5
-rw-r--r--main.c434
-rw-r--r--palettes.c1
-rw-r--r--png.c2
-rw-r--r--private.h2
-rw-r--r--test.flam314
-rw-r--r--vidres.flam312
-rw-r--r--wscript5
22 files changed, 443 insertions, 3289 deletions
diff --git a/README.txt b/README.txt
deleted file mode 100644
index e7a30cc..0000000
--- a/README.txt
+++ /dev/null
@@ -1,837 +0,0 @@
-FLAM3 - cosmic recursive fractal flames
-see the file COPYING for the license covering this software.
-
-This is free software to render fractal flames as described on
-http://flam3.com. Flam3-animate makes animations, and flam3-render
-makes still images. Flam3-genome creates and manipulates genomes
-(parameter sets). A C library is also installed.
-
-Note: the following instructions are written for Linux users. Windows
-users may install the cygwin package to get the "env" command or set
-the envars in your windows command prompt manually. That means
-instead of a command like
-
- env dtime=5 prefix=foo. in=test.flame flam3-animate
-
-use the following set of commands:
-
- set dtime=5
- set prefix=foo.
- set in=test.flame
- flam3-animate
-
-As usual, to configure, build, and install:
-
- ./configure
- make
- sudo make install
-
-If this has problems, you may need to re-generate some configuration
-files. Do the following steps:
-
- libtoolize
- aclocal
- automake
- autoconf
-
-and then try to configure and install as above.
-
-This package depends on development packages for libz, libpng,
-libjpeg, and libxml2.
-
-To test it, run
-
- flam3-render < test.flam3
-
-and it should produce 00000.jpg and 00001.jpg, one image for each
-<flame> element in the parameter file. To make an animation run
-
- flam3-animate < test.flam3
-
-and it should produce 100 files named 00000.jpg through 00099.jpg that
-interpolate between the two <flame> elements.
-
-
-envar default meaning
-===== ======= =======
-prefix (empty) prefix names of output files with this string.
-begin j time of first frame to render (j=first time in input file) (animate only)
-end n-1 time of last frame to render (n=last time specified in the input file) (animate only)
-time NA time of first and last frame (ie do one frame) (animate only)
-frame NA synonym for "time" (animate only)
-in stdin name of input file
-out NA name of output file (bad idea if rending more than one, use prefix instead)
-template NA apply defaults based on this genome (genome only)
-dtime 1 time between frames (animate only)
-fields 0 if 1 then render fields, ie odd scanlines at time+0.5
-nstrips 1 number of strips, ie render fractions of a frame at once (render only)
-qs 1 quality scale, multiply quality of all frames by this
-ss 1 size scale, multiply size (in pixels) of all frames by this
-jpeg NA jpeg quality for compression, default is native jpeg default
-format png "jpg" or "ppm" or "png"
-pixel_aspect 1.0 aspect ratio of pixels (width over height), eg 0.90909 for NTSC
-seed random integer seed for random numbers, defaults to time+pid. deprecated.
-nthreads auto number of threads to use (render and animate)
-verbose 0 if non-zero then print progress meter on stderr
-bits 33 also 32 or 64: sets bit-width of internal buffers (33 means 32-bit floating-point)
-bpc 8 bits per channel of color: only png supports 16 (render/animate)
-image filename replace palette with png, jpg, or ppm image
-use_vars -1 comma sep list of variation #'s to use when generating a random flame (genome only)
-dont_use_vars unset comma sep list of variation #'s to NOT use when generating a random flame. (genome only)
-cross0 NA randomly select one genome from this file to genetically cross (genome only)
-cross1 NA with one genome from this file (genome only)
-method NA method for genetic cross: alternate, interpolate, or union. (genome only)
-mutate NA randomly mutate a random genome from this file (genome only)
-symmetry NA set symmetry of result. (genome only)
-clone NA clone random flame in input (genome only)
-clone_all NA clones all flames in file. useful for applying template to all flames (genome only)
-animate NA interpolates between all flames in a file, using times specified in file (genome only)
-sequence NA 360 degree rotation 'loops' times of each control point plus rotating transitions (genome only)
-loops NA number of times to rotate each control point in sequence (genome only)
-tries 50 number of tries to make to find a good genome. (genome only)
-strip NA strip input, frame and nframes control which one. (genome only)
-transparency 0 make bknd transparent, if format supports it (render/animate)
-name_enable 0 use 'name' attr in <flame> to name image output if present (render only)
-nick "" nickname to use in <edit> tags / img comments
-url "" url to use in <edit> tags / img comments
-id "" ID to use in <edit> tags / img comments
-comment "" comment string for <edit> tags (genome only)
-use_mem auto floating point number of bytes of memory to use (render only)
-noedits unset omit edit tags from output (genome only)
-write_genome 0 write out genome associated with center of motion blur window (animate only)
-print_edit_depth 0 depth to truncate <edit> tag structure. 0 prints all <edit> tags (genome only)
-intpalette unset round palette entries for importing into older Apophysis versions (genome only)
-insert_palette unset insert the palette into the image.
-enable_jpeg_comments 1 enables comments in the jpeg header (render and animate)
-enable_png_comments 1 enables comments in the png header (render and animate)
-
-earlyclip 0 enables the early clipping of rgb values for better antialiasing and resizing
- defaults to 0 for backwards compatibility
-flam27 0 flam3 2.7 compatibility mode; ensures generated genomes can be used by flam3 2.7.18
-stagger 0 affects simultaneity of xform interpolation during genome interpolation.
- represents how 'separate' the xforms are interpolated. set to 1 for each
- xform to be interpolated individually, fractions control interp overlap.
-apo_palette 0 set this to 1 to use only the first 255 elements of the palette (apophysis compatibility)
-
-for example:
-
- env dtime=5 prefix=foo. in=test.flam3 flam3-animate
-
-means to render every 5th frame of parameter file foo.flam3, and store
-the results in files named foo.XXXX.jpg.
-
-the flam3-convert program reads from stdin the old format created by
-the GIMP and writes to stdout the new xml format.
-
-the flam3-genome program creates random parameter files. it also mutates,
-rotates, and interpolates existing parameter files. for example to
-create 10 wholly new control points and render them at normal quality:
-
- env template=vidres.flam3 repeat=10 flam3-genome > new.flam3
- flam3-render < new.flam3
-
-if you left out the "template=vidres.flam3" part then the size,
-quality, etc parameters would be their default (small) values. you
-can set the symmetry group:
-
- env template=vidres.flam3 symmetry=3 flam3-genome > new3.flam3
- env template=vidres.flam3 symmetry=-2 flam3-genome > new-2.flam3
- flam3-render < new3.flam3
- flam3-render < new-2.flam3
-
-Mutation is done by giving an input flame file to alter:
-
- env template=vidres.flam3 flam3-genome > parent.flam3
- env prefix=parent. flam3-render < parent.flam3
- env template=vidres.flam3 mutate=parent.flam3 repeat=10 flam3-genome > mutation.flam3
- flam3-render < mutation.flam3
-
-Normally one wouldn't use the same file for the template and the file
-to mutate. Crossover is handled similarly:
-
- env template=vidres.flam3 flam3-genome > parent0.flam3
- env prefix=parent0. flam3-render < parent0.flam3
- env template=vidres.flam3 flam3-genome > parent1.flam3
- env prefix=parent1. flam3-render < parent1.flam3
- env template=vidres.flam3 cross0=parent0.flam3 cross1=parent1.flam3 flam3-genome > crossover.flam3
- flam3-render < crossover.flam3
-
-flam3-genome has 3 ways to produce parameter files for animation in
-the style of electric sheep. the highest level and most useful from
-the command line is the sequence method. it takes a collection of
-control points and makes an animation that has each flame do fractal
-rotation for 360 degrees, then make a smooth transition to the next.
-for example:
-
- env sequence=test.flam3 nframes=20 flam3-genome > seq.flam3
- flam3-animate < seq.flam3
-
-creates and renders a 60 frame animation. there are two flames in
-test.flam3, so the animation consists three stages: the first one
-rotating, then a transition, then the second one rotating. each stage
-has 20 frames as specified on the command line. if you want to
-render only some fraction of a whole animation file, specify the begin
-and end times:
-
- env begin=20 end=40 flam3-animate < seq.flam3
-
-the other two methods are harder to use because they produce files that
-are only good for one frame of animation. the output consists of 3
-control points, one for the time requested, one before and one after.
-that allows proper motion blur. for example:
-
- env template=vidres.flam3 flam3-genome > rotme.flam3
- env rotate=rotme.flam3 frame=10 nframes=20 flam3-genome > rot10.flam3
- env frame=10 flam3-animate < rot10.flam3
-
-the file rot10.flam3 specifies the animation for just one frame, in
-this case 10 out of 20 frames in the complete animation. C1
-continuous electric sheep genetic crossfades are created like this:
-
- env inter=test.flam3 frame=10 nframes=20 flam3-genome > inter10.flam3
- env frame=10 flam3-animate < inter10.flam3
-
-see http://flam3.com/flame.pdf for descriptions & formulas, and
-see http://electricsheep.wikispaces.com/Variations for updates.
-
-The complete list of variations:
-
- 0. linear
- 1. sinusoidal
- 2. spherical
- 3. swirl
- 4. horseshoe
- 5. polar
- 6. handkerchief
- 7. heart
- 8. disc
- 9. spiral
- 10. hyperbolic
- 11. diamond
- 12. ex
- 13. julia
- 14. bent
- 15. waves
- 16. fisheye
- 17. popcorn
- 18. exponential
- 19. power
- 20. cosine
- 21. rings
- 22. fan
- 23. blob
- 24. pdj
- 25. fan2
- 26. rings2
- 27. eyefish
- 28. bubble
- 29. cylinder
- 30. perspective
- 31. noise
- 32. julian
- 33. juliascope
- 34. blur
- 35. gaussian_blur
- 36. radial_blur
- 37. pie
- 38. ngon
- 39. curl
- 40. rectangles
- 41. arch
- 42. tangent
- 43. square
- 44. rays
- 45. blade
- 46. secant2
- 47. twintrian
- 48. cross
- 49. disc2
- 50. super_shape
- 51. flower
- 52. conic
- 53. parabola
- 54. bent2
- 55. bipolar
- 56. boarders
- 57. butterfly
- 58. cell
- 59. cpow
- 60. curve
- 61. edisc
- 62. elliptic
- 63. escher
- 64. foci
- 65. lazysusan
- 66. loonie
- 67. pre_blur
- 68. modulus
- 69. oscilloscope
- 70. polar2
- 71. popcorn2
- 72. scry
- 73. separation
- 74. split
- 75. splits
- 76. stripes
- 77. wedge
- 78. wedge_julia
- 79. wedge_sph
- 80. whorl
- 81. waves2
- 82. exp
- 83. log
- 84. sin
- 85. cos
- 86. tan
- 87. sec
- 88. csc
- 89. cot
- 90. sinh
- 91. cosh
- 92. tanh
- 93. sech
- 94. csch
- 95. coth
- 96. auger
- 97. flux
-
-see http://flam3.com/flame.pdf for descriptions & formulas for each of
-these. note that, by default, if a random flame is requested and neither
-'use_vars' or 'dont_use_vars' are specified, the following variations are
-not used: noise, blur, gaussian_blur, radial_blur, ngon, square, rays,
-and cross.
-
-note: these variations do not use the variation weight to scale their
-contributions, and so will not be implemented in flam3:
-circlize
-
-
-======================================
-
-todo: eliminate all static storage.
-
-======================================
-
-changelog:
-
-12/29/10 Added --version option to flam3-genome. fixed bug in 16 bpc
- png image writing when using strips. xform opacity now affects
- calculated width of density estimation filters. Release as 3.0.1.
-
-10/05/10 Small tweaks. Fuse iterations default to 15 but increase to
- 100 when using earlyclip. flux variation added. Release as 3.0.
-
-12/20/09 Highlight power now interpolates smoothly from old behavior
- (-1) to new behavior. flam3-genome 'split' mode was broken, fixed
- (thanks Exper.) Die gracefully instead of segfault when very small
- estimator_curve values are specified. Version attribute added to
- flame tag. Number of iterations used to fuse attractor increased to
- 100. Release as 2.8beta7.
-
-11/24/09 Potential speedup of 5% over prior versions. Many threading
- issues identified and resolved when using flam3 shared library as
- back end for user interfaces. 14 complex plane variations added.
- auger variation added. new flam3_make_strip library function to
- generate stripped genomes for external ui strip renders. bug fix:
- when rendering strips, use the same random context for each strip
- to prevent edge effects where strips butt against each other. flam3
- will now linearly interpolate missing colors in the colormap.
- Release as 2.8beta6.
-
-10/16/09 Non-threadsafe progress tracking code in main iteration thread
- replaced with per-render progress storage. Fixed bug where pausing
- render during density estimation stage terminated render. Waves2
- variation fixed (thx Joel F). Release as 2.8beta5.
-
-10/07/09 Fixed bug affecting 'animate' mode with flam3-genome. Changed
- estimate_bounding_box to increase discarded iterations if numerous
- badvals were encountered during iterations. Exported a few more
- functions for Windows DLL. Release as 2.8beta4.
-
-10/03/09 Changed color_speed range from 0 (no color change) to 1
- (use new xform color). Animate attribute is now 0 for no motion,
- 1 for motion. Removed final xform from stagger algorithm. 'oscope'
- parameters are now called 'oscilloscope' to match the rest of the
- parametric variations (backwards compatible, so old genomes can be
- read.) Stagger now affects morphing as well as sheep rotation, but
- only using flam3-genome (not flam3-animate). Release as 2.8beta3.
-
-03/18/09 Major upgrade :
- - 28 variations added, mostly from the sourceforge plugins pack
- - significant speed optimization of variations
- - setting earlyclip env var on commandline will enable an alternate
- calculation of color values, resulting in better antialiasing
- - 'highlight_power' flame element controls the white highlights in
- dense areas, eliminating the hue shift bug
- - Apophysis chaos and solo xform/plotmode features have been
- implemented. solo/plotmode are promoted to floating point
- 'opacity'. opacity and chaos are both interpolatable.
- - <motion> tag now available for xforms...allows cyclic variation
- of any regular xform parameter/coef/post.
- - env var 'stagger' affects the simultaneity of xform interpolation
- when morphing from one flame to another. set to 0 for existing
- behaviour, set to 1 to make each xform interpolate individually
- - symmetry has been broken out into color_speed and animate tags
- with the same sense (which is confusing and will be fixed in a
- future release).
- - set the flam27 env var to output backwards compatible genomes
- (when possible.)
- - passes the consistency test where rendering an image at double
- size and filtering it down produces the same results as the
- original (modulo quality).
-
-03/17/09 Added fuzz testing with zzuf to the regression tests. 'Strip'
- mode and genomes with the zoom parameter used now break into pieces
- properly. insert_palette fixed (broken a few versions ago.) fixed
- twintrian variation when small weights are used. various rare
- segfaults and memory leaks fixed. 'palette_mode' attribute added to
- flame element for smoother palette interpolation in slow animations;
- possible values are 'step' and 'linear' ('step' mode is default and
- matches previous behaviour.) Release as 2.7.18.
-
-11/11/08 Add error checking on the numbers in the input genome. Do
- not exit on read errors, fail gracefully. Changed sin/cos = tan in
- the tangent variation. Added polar to list of variations that use
- the inverted linear identity. Bugfix: temporal_filter_exp was not
- set properly in template. Apply interpolation attribute in
- templates. Add/publish datarootdir with pkg-config so the palette
- file is easy to find (for qosmic). Copyright by Spotworks LLC
- instead of Spot and Erik. Add fuzz checks to the regression
- suite. include LNX/OSX/WIN in the version string. In
- flam3-genome animate command, added one to last flame time, so the
- end time is inclusive. Release as 2.7.17.
-
-09/06/08 Added 'clone_all' to flam3_genome to allow application of
- template to all flames in a file at once, and 'animate' to write
- a full sequence of interpolations out. 'animate' is similar to
- 'sequence' except that no control point rotation is performed.
- Fixed non-functional 'write_genome' env var for flam3_animate.
- Two bugs associated with interpolating from a log interpolation_type
- to a non-log interpolation_type fixed (rotate angle reduction and
- special inverted identity). when using flam3_rotate in 'spin_inter'
- the interp type of the first genome is now used rather than the
- current genome's interp type. Enforced upper and lower bounds for
- xform color and upper bound for interpolated colormap values
- as "smooth" interpolation led to values out of range. If "smooth"
- interpolation is specified for all flames in a file, the first and
- second-to-last genome is switched to "linear" with a warning.
- spatial filters with non-box-filter window functions fixed.
- Release as 2.7.16.
-
-
-08/25/08 Added new interpolation types 'old' and 'older', for use in
- recreating old animations. 'linear' mode now does not rotate padded
- xforms (results in prettier symmetric singularities). switched to
- using a 'padding' flag instead of a 'just initialized' flag; padding
- flag used for implementation of 'old' and 'older' types.
- interpolation_space now deprecated, instead use interpolation_type.
- flam3_align is now idempotent (multiple applications do not change
- the control points.) Default number of temporal samples bumped to
- 1000. Removed CVS headers from source code (now using SVN).
- Default interpolation mode now log. Removed 'move' and 'split' vars.
- changes to flam3-genome: sequence mode now returns linear
- interpolation mode for all control points except first/last of edges
- - these cps will use the original interpolation mode; inter and
- rotate modes will now return padded genomes for all control points,
- all with linear interpolation specified. instead of centering
- sometimes reframe by golden mean plus noise. Release as 2.7.15.
-
-07/21/08 Add configuration option for atomic-ops. bug fix: do not
- truncate floating point palettes. new motion blur features: add
- temporal_filter_type, can be "box" (default) or "gaussian" or
- "exp". Temporal_filter_width and temporal_filter_exp are parms to
- it. 'blur' env var no longer used. Small bug fix: iteration
- count depends only on the size of the output image, not the padded
- image (the gutter). When interpolating, only do -pi/pi adjustment
- for non-asymmetric cases. Julian/juliascope variations use the
- alternate inverted identity for interpolation (reduces wedge
- effect). Add python script for regression and consistency
- checking. Add svn revision number to version string (in the
- software not of the package). Release as 2.7.14.
-
-05/28/08 Restored upper limit on particle coordinates. Release as
- 2.7.13.
-
-05/16/08 Added man pages. Removed upper limit on particle
- coordinates. fixed FSF address in comments. update to automake
- 1.10.1. added eps to denom of perspective fraction to avoid
- infinities (thanks fred). Put contents of 'id' env var in png/jpg
- comment block. Release as 2.7.12.
-
-04/05/08 Added 16 bit per channel support to PNG via bpc envar.
- isaac.h is now installed with the flam3 headers. Strip indexing
- now done with size_t's to fix bug in large images (thanks Paul).
- Progress callback now returns ETA, and per-thread verbose flag
- functionality fixed. Enumerated spatial filter types now used in
- flam3.h, taking the place of function pointers (simplifies the
- API). Fix bug by moving precalculation of variation variables to
- flam3_iterate (thanks david). Release as 2.7.11.
-
-03/15/08 fixed interpolation bug when magnitude of rotation/scaling
- component of affine transform is 0. replaced secant variation
- with more flame-friendly secant2 (eliminates gap in y direction,
- scales y-coordinate by weight). warning message now printed when
- unrecognized variation is present in an xform. fixed bad
- inequality when checking for -pi/pi discontinuity during complex
- interpolation. release as 2.7.10.
-
-02/08/08 non-zero weights for final xforms no longer allowed, and now
- have no effect. recompiled windows exes with mingw gcc 4.1 to
- take advantage of scalability improvements in flam3 2.7.8 (was
- compiling with mingw gcc 3.4 until now). for fedora package
- compliance, flam3.pc.in patched by ian weller and moved use of
- config.h to c files only. release as 2.7.9.
-
-01/26/08 better scalability across multiple CPUs by using compare and
- swap (from Tim Hockin). fix bug in large images (>2GB). add
- flam3_srandom and flam3_malloc/free to better support wrapping
- with python on windows, which links with a different C
- runtime. add --enable-shared option to configure script (from
- Bobby R Ward). release as 2.7.8.
-
-12/16/07 fixed bug (rare random crash) identified by david burnett.
- initialize new xforms with better defaults for parametric
- variations (based on interpolated-against xforms). add id envar,
- like nick/url. add clone_action envar. return to xform
- interpolation based on complex logs, but make consistent decisions
- about counter/clockwise rotation across the sheep edges.
- interpolation_space attribute to flame element can be set to
- "linear" to go back to the simpler method, or "log" to use this
- new (default) method. release as 2.7.7
-
-10/20/07 fixed action string overflow when many xforms are present.
- added 'print_edit_depth' env var to control how many levels of
- <edit> tags are saved when using flam3-genome. Fixed wrong
- placement of random improve_colors code in flam3-genome. go to
- five digit filenames. fixed bug in supershape variation. API
- cleanup, thanks to david bitseff. release 2.7.6.
-
-08/14/07 various code updates to assist with compiling under msvc++.
- now can specify --disable-pthread or --enable-pthread to configure
- to better control compilation. fixed bug preventing renders of
- flames with more than 128 xforms. release 2.7.5.
-
-07/12/07 fixed bug in split variation, now compatible with both
- versions of Apo. added insert_palette option. switched density
- estimation kernel from Epanichnikov to Gaussian. genetic cross
- now crosses palettes rather than selecting one of the parent
- palettes. remove noisy variations from random generation if
- use_vars or dont_use_vars not specified. fixed metrics calculated
- on small test render for genetic operations. reduced memory
- requirements for density estimation filters. 64-bit linux distros
- now supported. release 2.7.4.
-
-
-06/21/07 flam3 version, rendered genome, some render statistics and
- optionally nick/url stored in jpeg/png headers. fixed two bugs
- in isaac rng code (strongly affected temporal blur). prevent
- final xform rotation for sheep animation. fixed interpolation
- when only one flame has final xform. added Supershape, Flower,
- Conic, Parabola, Move and Split variations. Shape combined with
- Supershape via 'rnd' parameter. flam3-genome now writes 'name'
- attribute for rotate and sequence modes. oversample attribute
- deprecated; supersample now preferred. new build process for
- windows exes using MinGW/MSYS. added 'intpalette' env var to
- round floating point palettes to allow older versions of Apophysis
- to read them. default image type is now PNG, transparency off.
- density estimation code revised to be more consistent between
- different supersample levels, which required change to default
- de params. limit number of de filters to conserve memory. fixed
- julia variation dependency on non-thread-safe random bit function.
- removed random number storage for radial blur variation.
- release 2.7.3.
- 07/26/08: Note, incompat. change made to direction of cp->rotate
- (as of 2.7.3, rotates shortest distance instead of clockwise)
-
-02/09/07 use isaac random number generator to avoid differences
- between mac/pc/linux. use multiple threads to take advantage
- of multiple CPUs or cores. new variations: disc2, Arch,
- Tangent, Square, Rays, Blade, Secant, Twintrian, Cross.
- fixed bug reading hex color format - must remove \n prior to
- start of colors if present. use EPS in spiral, hyperbolic
- and spherical to eliminate black spots. fix numbering of
- disc2, change parameter to estimate_bounding_box. made blur
- kernel type templatable. removed extraneous 'enabled="1"' in
- writing out final xform information (no longer needed).
- release 2.7.2.
-
-12/31/06 fixed bug in waves precalculation code. curl and rectangles
- variations from joel faber. remove visibility of
- rotation_center attribute, fix strips operator to handle
- rotation without it. added motion exponent and gamma lin
- thresh to flam3_print. list of variations in the docstring
- automatically generated. flam3-genome: envar noedits
- suppresses output of edit history. release 2.7.1.
-
-09/27/06 print out palette as floating point with up to 6 digits
- rather than integers (for very slow smooth transitions).
- Added optimization to only recalculate the xform distrib
- array when necessary (Thanks Joel Faber). Added settable
- kernel for downrez. Added XML reading code for new <palette>
- format for gradients. Functionalized hex gradient read.
- Removed color shift experimental feature. New
- 'motion_exponent' attribute controls fade of temporal steps.
- added gaussian_blur and radial_blur vars from apo. added pie
- and ngon variations from joel faber. add rotation_center
- attribute. added but disabled image variation from joel.
- release as 2.7.
-
-06/26/06 use new libpng api, handle libpng errors properly (from nix
- at esperi.org.uk). print out palette as floating point with
- 6 digits rather than integers (for very slow smooth
- transitions).
-
-06/11/06 disable density estimation for 16 and 32 bit buffers because
- it doesn't work. Apo team removed "enabled" from final xform
- specification, so now it defaults to on. make default
- temporal samples be 60 so that motion blur is the default,
- but explicitly ignore temporal samples when rendering still
- frames. add strip genetic operator to flam3-genome for
- breaking a flame into strips for parallel rendering. add
- subpixel offsets for antialiasing by averaging multiple
- images. release as 2.7b8.
-
-05/25/06 change attribute name "batches" to "passes" because many old
- genomes have it set, and with density estimation it is
- harmful.
-
-04/28/06 remove debugging code, release as 2.7b7.
-
-04/28/06 add attribute interpolation="smooth" for catmull-rom
- interpolation. known bug: some frames come out dark.
- release as 2.7b6.
-
-04/15/06 rename XML attribute "estimator" to "estimator_radius". fix
- the progress callback. add use_mem envar. move palette
- database to external file. cleanup namespace. add new
- variations blur, julian, and juliascope. fix flam3-convert.
- add experimental color shifting via "shift" envar. supports
- finalxform. can read hex palette format. avoids the "square"
- that appears from NaNs. release as 2.7b5.
-
-01/11/06 unlimited number of xforms per flame. new variations
- cylinder and perspective. rename rename de_max_filter to
- estimator, de_min_filter to estimator_minimum, de_alpha
- to estimator_curve, and jitters to temporal_samples.
- release as 2.7b4.
-
-11/28/05 performance optimization, fix symmetry singularities, added
- bubble variation, fixed handkerchief variation, templates
- apply to sequence and rotate flam3-genome commands, added
- envar "name_enable" to render filenames specified in the
- "name" attribute of the flame element, small bugfixes,
- release as 2.7b3.
-
-11/04/05 verbose on by default. Added 'transparency' envar for png
- renders without transparency channel. Fixed non-black
- background jpeg renders. add improve_colors mutation,
- rewrite most of estimate_bounding_box. added new variations
- blob pdjd fan2 rings2 eyefish. added '33bit' method for
- 32-bit floats. <edit> tags track history. alter the gamma
- curve to be linear near 0 to avoid singularity and reduce
- noise, set with gamma_threshold. release as v2.7b2.
-
-09/24/05 new density estimator and temporal jitter code from Erik
- Reckase (note removal of todo items above :). allow gamma,
- vibrancy, contrast, pixels_per_unit, and brightness to vary
- as part of the genome rather than as part of the rendering
- parameters. flam3-genome does not retry when cloning. ditch
- 2nd color coordinates. release as v2.7b1.
-
-06/27/05 in flam3_dimension, give up and return NaN if 90% or more of
- the samples are being clipped. release v2.6.
-
-06/22/05 add envar to control the number of tries.
-
-06/06/05 add new form of mutation that introduces post xforms.
-
-05/20/05 fix memory trashing bug resulting from xform overflow. put
- regular xforms before symmetry in printed genomes. enforce
- weights non-negative & at least one xform. remove
- nan-protection from popcorn variation. truncate xforms with
- very small weight.
-
-05/13/05 fix bug reported by erik reckase where fan variation could
- blow up to NaN because the domain of atan2 was not protected.
- remove protection from all atan2 calls and instead detect NaN
- results and replace them with noise. count really large
- values as bad too to prevent blowing up to infinity. enforce
- 0<=hue<1, release v2.6b1.
-
-05/05/05 report choices made during genome generation in notes
- attribute. flam3_dimension no longer hangs when most of the
- attractor is outside the camera. limit number of variations
- produced by genetic operators to 5. reduce rate of
- interpolation method of crossover.
-
-03/17/05 put cloning back in (found by James Rantanen).
-
-03/08/05 change sawtooth variation (incompatible!). add fan
- variation. rename sawtooth to rings. release as v2.5.
-
-03/01/05 fix rotation when nstrips > 1. add flam3_dimension(). minor
- bugfixes. release as v2.4.
-
-01/25/05 release as v2.3.
-
-01/18/05 support post xforms (idea from eric nguyen). support camera
- rotation.
-
-12/28/04 release as v2.2.
-
-12/27/04 preview implementation of image fractalization by adding a
- color coordinate. changed how random/default color
- coordinates are selected (they alternate 0 and 1 instead of
- being distributed between 0 and 1). WARNING: incompatible
- format change to samples argument of flam3_iterate.
-
-12/20/04 allow mutation and crossover from files with multiple
- genomes. a random genome is selected for each repetition.
-
-12/11/04 fix bug printing out interpolated non-built-in palettes.
- warn if any images sizes in animation do not match.
-
-12/01/04 remove debugging code left in flam3-convert, thanks to Paul
- Fishwick for reporting this. add cosine variation. add
- sawtooth variation. handle nstrips that do not divide the
- height. write partial results as strips are computed. fix
- old bug where in 32 bit mode one of the terms appeared to be
- calculated at 16 bits. release as v2.1.
-
-10/28/04 fix docstring bug. release as v2.0.1.
-
-10/28/04 renaming, cleanup, and modularization. now exports
- libflam3.a and flam3.h, all names prefixed with flam3_.
- binaries named with flam3- prefix, genome files use flam3
- suffix. create and install a flam3.pc pkg-config file.
- release as v2.0.
-
-09/21/04 fix bug where code for integer rounding was left in 64-bit
- floating point version. round remaining time up so we do not
- say ETA in 0 seconds. do not use static allocation to hold
- onto memory, just malloc and free what we need every frame.
- enforce positive oversampling. fix bug in hqi on sequences
- of images of different sizes. release as v1.15.
-
-09/17/04 change name of envar to control jpeg compression quality from
- "quality" to "jpeg". check for bad nbatches values. release
- as v1.14.
-
-08/23/04 add about 600 cmaps from Jackie, Pat Phillips, Classylady,
- and BTomchek. use 64-bit (double) sized buffers. remove
- white_level. add new variations: exponential & power. fix
- bug where hue_rotation was left uninitialized. add clone
- option to pick-flame which just applies template to the input
- without modifying genome. random_control_point can now put
- multiple variations in one xform. remove altivec code because
- it is incompatible with 64-bit buffers. verbose (progress bar
- on stderr) from Jon Morton. control random number seeds via
- seed envar. support buffer sizes 16, 32, or 64 bits with
- three versions of rect.c included into libifs.c.
-
-03/28/04 fix bug interpolating between flames with different numbers
- of xforms introduced by the new de/parsing. add modified
- version of the popcorn variation from apophysis. fix small
- bug in waves variation. make distribution of variations
- even. add altivec code from R.J. Berry of warwick.ac.uk.
- release as v1.13.
-
-03/26/04 add wave variation. allow negative variational coefs. do
- not truncate filter width to an integer. add fisheye
- variation. make variations print by name instead of using a
- vector, that is say spherical="1" instead of var="0 0 1" or
- var1="2". it should still read the old format.
-
-03/07/04 fix bug printing out result of interpolating between
- symmetries. release as v1.11.
-
-03/03/04 add new means of crossover: a random point between the
- parents as defined by linear interpolation. in all kinds of
- crossover, reset the color coordinates to make sure they are
- spread out well. somehow lost part of the extra_attributes
- patch, so put it in again. add pixel_aspect_ratio envar.
- decrease filter cutoff threshold. the edges of the filter
- were almost zeros, so making the filter smaller saves time
- with almost no effect on the results. do not print out the
- attributes of control points that have default values.
- release as v1.10.
-
-02/26/04 remove prefix argument to print_control_point, and add
- extra_attributes. allow any value for vibrancy parameter.
- allow variation blending coefs to have any values. do not
- normalize them. on windows nstrips is computated
- automatically to fit within memory (leaves at least 20%
- unused). support png image format and if output is png then
- compute & output alpha channel. release as v1.9.
-
-02/01/04 add julia variation, and put bent variation back in. change
- how colors are computed in presense of symmetry: xforms that
- come from a symmetry do not change the color index. this
- prevents the colors from washing out. since an xform may be
- interpolated between a symmetry and not, this this is a
- blending factor. add more documentation. add function to
- compute lyapunov coefs. allow control over symmetries
- produced by pick-flame. release as v1.8.
-
-07/20/03 cleanup, update documentation, release as v1.7.
-
-07/15/03 fix bug in interpolation where in last frame when going from
- non-symmetric to symmetric it left out some xforms. drop
- support for "cmap_inter". add var1 as a abbreviation to var
- in xml output, and do not print trailing 0s in var string.
-
-07/09/03 change matrix interpolation to be linear rather than complex
- log to avoid the discontinuity at 180 degrees. this was
- causing jumpiness in the C1 continuous algorithm. this means
- that rotation has to be handled with pick-flame. put direct
- support for symmetries in the de/parser to make control
- points smaller and easier to understand. support
- combinations of bilateral & rotational symmetry.
-
-06/22/03 bug in colormap interpolation. release as v1.6.
-
-06/20/03 fix some bugs, in particular remove sorting of the xforms
- when control points are read. they are only sorted when they
- are generated. updated dates on copyright notices. added
- time parameter to anim, shorthand for begin & end being the
- same. added a fairly terrible hack to allow palettes to be
- specified as blending of two basic palettes. this requires
- much less bandwidth than sending 256 rgb triples. in
- pick-flame change default to be enclosed xml output.
-
-06/09/03 add C1 continuous interpolation to pick-flame (suggested by
- Cassidy Curtis). added new variations from Ultra Fractal
- version by Mark Townsend. added symmetry xforms.
-
-06/02/03 add convert-flame which reads the old file format and writes
- the new one. release as v1.5.
-
-03/22/03 fix bug in hqi & anim. somewhere along the way (prolly jpeg)
- nstrips was broken. add qs and ss params to hqi.
- discontinue strips for anim because the implementation is a
- bit problematic (animating zoom??). bump version to 1.4.
-
-03/05/03 add pick-flame.c to the project, and extend it with mutation
- and crossover capability. add parse_control_points_from_file
- (and use it). rename non-xml variants of de/parsers to *_old
- and rename xml variants to remove _xml. add
- rotate_control_point. bump version to 1.3.
-
-02/10/03 increase CHOOSE_XFORM_GRAIN by 10x and use chars instead of
- ints. remove extra -ljpeg from Makefile. lose hack that
- ignored density xforms after interpolation. what was that
- for?? it makes a difference, and just makes interpolation
- less smooth as far as i can tell. bump version to 1.2.
-
-01/17/03 release as v1.1.
-
-01/16/03 support output in jpeg format; this is the default. support
- win32.
-
-01/08/03 by default don't render the last frame so that animations
- dove-tail and loop
-
-01/06/03 fix how too many xforms are detected so that one more xform
- is allowed.
-
-12/22/02 first release as independent package. release as v1.0.
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644
index 4f3725a..0000000
--- a/debian/changelog
+++ /dev/null
@@ -1,48 +0,0 @@
-flam3 (2.7.18-0ubuntu1~ppa0) hardy; urgency=low
-
- * Bug fixes from upstream.
-
- -- Spotworks LLC <ubuntu@spotworks.com> Tue, 17 Mar 2009 20:52:50 -0600
-
-flam3 (2.7.17-0ubuntu1~ppa0) hardy; urgency=low
-
- * Bug fixes from upstream.
-
- -- Spotworks LLC <ubuntu@spotworks.com> Wed, 12 Nov 2008 19:07:18 -0500
-
-flam3 (2.7.16-0ubuntu1~ppa2) hardy; urgency=low
-
- * Fixed version number for 2.7.16.
-
- -- Spotworks LLC <ubuntu@spotworks.com> Sat, 06 Sep 2008 08:05:17 -0600
-
-flam3 (2.7.16-0ubuntu1~ppa0) hardy; urgency=low
-
- * More bugs fixed and features from upstream, again interpolation related.
-
- -- Spotworks LLC <ubuntu@spotworks.com> Sat, 06 Sep 2008 07:27:23 -0600
-
-flam3 (2.7.15-0ubuntu1~ppa0) hardy; urgency=low
-
- * Many bugs fixed and features from upstream, mostly about interpolation.
-
- -- Spotworks LLC <ubuntu@spotworks.com> Thu, 28 Aug 2008 00:28:37 -0400
-
-flam3 (2.7.14-0ubuntu1~ppa0) hardy; urgency=low
-
- * Many bugs fixed and features from upstream.
-
- -- Spotworks LLC <ubuntu@spotworks.com> Mon, 21 Jul 2008 18:23:45 -0400
-
-flam3 (2.7.13-0ubuntu1~ppa8) hardy; urgency=low
-
- * Attempt to fix erroneous O2 compile flag.
-
- -- Spotworks LLC <ubuntu@spotworks.com> Fri, 27 Jun 2008 11:23:02 -0600
-
-flam3 (2.7.13-0ubuntu1~ppa2) hardy; urgency=low
-
- * Initial package release.
-
- -- Spotworks LLC <ubuntu@spotworks.com> Thu, 12 Jun 2008 17:16:17 -0600
-
diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index 7ed6ff8..0000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-5
diff --git a/debian/control b/debian/control
deleted file mode 100644
index b1ef38d..0000000
--- a/debian/control
+++ /dev/null
@@ -1,12 +0,0 @@
-Source: flam3
-Section: graphics
-Priority: optional
-Maintainer: Spotworks LLC <ubuntu@spotworks.com>
-Build-Depends: debhelper (>= 5), automake, autotools-dev, libjpeg62-dev, libpng12-dev, libxml2-dev, libtool, subversion
-Standards-Version: 3.7.2
-Homepage: http://www.flam3.com
-
-Package: flam3
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: render and animate FLAM3s and manipulate their genomes
diff --git a/debian/copyright b/debian/copyright
deleted file mode 100644
index 0f1aab7..0000000
--- a/debian/copyright
+++ /dev/null
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- Appendix: How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) 19yy <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) 19yy name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/debian/rules b/debian/rules
deleted file mode 100755
index b485aa3..0000000
--- a/debian/rules
+++ /dev/null
@@ -1,98 +0,0 @@
-#!/usr/bin/make -f
-# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-
-# These are used for cross-compiling and for saving the configure script
-# from having to guess our platform (since we know it already)
-DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-
-config.status: configure
- dh_testdir
- # Add here commands to configure the package.
-ifneq "$(wildcard /usr/share/misc/config.sub)" ""
- cp -f /usr/share/misc/config.sub config.sub
-endif
-ifneq "$(wildcard /usr/share/misc/config.guess)" ""
- cp -f /usr/share/misc/config.guess config.guess
-endif
- ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="-g -O3 -ffast-math" LDFLAGS="-Wl,-z,defs"
-
-
-build: build-stamp
-
-build-stamp: config.status
- dh_testdir
-
- # Add here commands to compile the package.
- $(MAKE)
- #docbook-to-man debian/flam3.sgml > flam3.1
-
- touch $@
-
-clean:
- dh_testdir
- dh_testroot
- rm -f build-stamp
-
- # Add here commands to clean up after the build process.
- -$(MAKE) distclean
- rm -f config.sub config.guess
-
- dh_clean
-
-install: build
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
-
- # Add here commands to install the package into debian/flam3.
- $(MAKE) DESTDIR=$(CURDIR)/debian/flam3 install
-
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
- dh_testdir
- dh_testroot
- dh_installchangelogs
- dh_installdocs
- dh_installexamples
-# dh_install
-# dh_installmenu
-# dh_installdebconf
-# dh_installlogrotate
-# dh_installemacsen
-# dh_installpam
-# dh_installmime
-# dh_python
-# dh_installinit
-# dh_installcron
-# dh_installinfo
- dh_installman
- dh_link
- dh_strip
- dh_compress
- dh_fixperms
-# dh_perl
-# dh_makeshlibs
- dh_installdeb
- dh_shlibdeps
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
diff --git a/docstring.c b/docstring.c
deleted file mode 100644
index d0b3920..0000000
--- a/docstring.c
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- FLAM3 - cosmic recursive fractal flames
- Copyright (C) 1992-2009 Spotworks LLC
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-
-#include "config.h"
-#include "flam3.h"
-
-
-static char *the_docstring0 =
- "FLAM3 - cosmic recursive fractal flames version ";
-
-static char *the_docstring1 =
-"\n\n"
-"This software is licensed under the GPL. You should have access\n"
-"to the source code; see http://www.fsf.org/licenses/gpl.html.\n"
-"\n"
-"This is free software to render fractal flames as described on\n"
-"http://flam3.com. Flam3-animate makes animations, and flam3-render\n"
-"makes still images. Flam3-genome creates and manipulates genomes\n"
-"(parameter sets). A C library is also installed.\n"
-"\n"
-"Note: the following instructions are written for Linux users. Windows\n"
-"users may have to install the cygwin package to get the \"env\"\n"
-"command or set the envars in your windows command prompt manually.\n"
-"That means instead of a command like\n"
-"\n"
-" env dtime=5 prefix=foo. in=test.flame flam3-animate\n"
-"\n"
-"use the following set of commands:\n"
-"\n"
-" set dtime=5\n"
-" set prefix=foo.\n"
-" set in=test.flame\n"
-" flam3-animate\n"
-"\n"
-"\n"
-"envar default meaning\n"
-"===== ======= =======\n"
-"prefix (empty) prefix names of output files with this string.\n"
-"begin j time of first frame to render (j=first time specified in file) (animate only)\n"
-"end n-1 time of last frame to render (n=last time specified in the input file) (animate only)\n"
-"time NA time of first and last frame (ie do one frame) (animate only)\n"
-"frame NA synonym for \"time\" (animate only)\n"
-"in stdin name of input file\n"
-"out NA name of output file (bad idea if rending more than one, use prefix instead)\n"
-"template NA apply defaults based on this genome (genome only)\n"
-"dtime 1 time between frames (animate only)\n"
-"fields 0 if 1 then render fields, ie odd scanlines at time+0.5\n"
-"qs 1 quality scale, multiply quality of all frames by this\n"
-"ss 1 size scale, multiply size (in pixels) of all frames by this\n"
-"pixel_aspect 1.0 aspect ratio of pixels (width over height), eg 0.90909 for NTSC\n"
-"nthreads 0 number of threads to use for render. default auto-detects.\n"
-"verbose 0 if non-zero then print progress meter on stderr\n"
-"bits 33 also 32 or 64: sets bit-width of internal buffers (33 means 32-bit floating-point)\n"
-"bpc 8 bits per color channel: png supports 16, all others are 8 only (render/animate)\n"
-"image filename replace palette with png, jpg, or ppm image\n"
-"use_vars -1 comma separated list of variation #'s to use when generating a random flame (genome only)\n"
-"dont_use_vars NA comma separated list of variation #'s to NOT use when generating a random flame (genome only)\n"
-"cross0 NA randomly select one genome from this file to genetically cross (genome only)\n"
-"cross1 NA with one genome from this file (genome only)\n"
-"method NA method used for genetic cross: alternate, interpolate, or union. (genome only)\n"
-"mutate NA randomly mutate a random genome from this file (genome only)\n"
-"symmetry NA set symmetry of result. (genome only)\n"
-"clone NA clone random flame in input (genome only)\n"
-"clone_all NA clones all flames in file. useful for applying template to all flames (genome only)\n"
-"animate NA interpolates between all flames in a file, using times specified in file (genome only)\n"
-"sequence NA 360 degree rotation 'loops' times of each control point plus rotating transitions (genome only)\n"
-"loops NA number of times to rotate each control point in sequence (genome only)\n"
-"tries 50 number of tries to make to find a good genome. (genome only)\n"
-"strip NA strip input, frame and nframes control which one. (genome only)\n"
-"transparency 0 make bknd transparent, if format supports it (render/animate)\n"
-"name_enable 0 use 'name' attr in <flame> to name image output if present (render only)\n"
-"nick \"\" nickname to use in <edit> tags / img comments\n"
-"url \"\" url to use in <edit> tags / img comments\n"
-"id \"\" ID to use in <edit> tags\n"
-"comment \"\" comment string for <edit> tags (genome only)\n"
-"use_mem auto floating point number of bytes of memory to use (render only)\n"
-"write_genome 0 write out genome associated with center of motion blur window (animate only)\n"
-"noedits unset omit edit tags from output (genome only)\n"
-"print_edit_depth 0 depth to truncate <edit> tag structure. 0 prints all <edit> tags (genome only)\n"
-"intpalette unset round palette entries for importing into older Apophysis versions (genome only)\n"
-"insert_palette unset insert the palette into the image.\n"
-"enable_png_comments 1 enables comments in the png header (render and animate)\n"
-"\n"
-"earlyclip 0 enables the early clipping of rgb values for better antialiasing and resizing\n"
-" defaults to 0 for backwards compatibility\n"
-"flam27 0 flam3 2.7 compatibility mode; ensures generated genomes can be used by flam3 2.7.18\n"
-"stagger 0 affects simultaneity of xform interpolation during genome interpolation.\n"
-" represents how 'separate' the xforms are interpolated. set to 1 for each\n"
-" xform to be interpolated individually, fractions control interp overlap.\n"
-"apo_palette 0 set this to 1 to use only the first 255 elements of the palette (apophysis compatibility)\n"
-
-"\n"
-"for example:\n"
-"\n"
-" env dtime=5 prefix=foo. in=test.flam3 flam3-animate\n"
-"\n"
-"means to render every 5th frame of parameter file foo.flam3, and store\n"
-"the results in files named foo.XXXX.jpg.\n"
-"\n"
-"the flam3-convert program reads from stdin the old format created by\n"
-"the GIMP and writes to stdout the new xml format.\n"
-"\n"
-"the flam3-genome program creates random parameter files. it also mutates,\n"
-"rotates, and interpolates existing parameter files. for example to\n"
-"create 10 wholly new control points and render them at normal quality:\n"
-"\n"
-" env template=vidres.flam3 repeat=10 flam3-genome > new.flam3\n"
-" flam3-render < new.flam3\n"
-"\n"
-"if you left out the \"template=vidres.flam3\" part then the size,\n"
-"quality, etc parameters would be their default (small) values. you\n"
-"can set the symmetry group:\n"
-"\n"
-" env template=vidres.flam3 symmetry=3 flam3-genome > new3.flam3\n"
-" env template=vidres.flam3 symmetry=-2 flam3-genome > new-2.flam3\n"
-" flam3-render < new3.flam3\n"
-" flam3-render < new-2.flam3\n"
-"\n"
-"Mutation is done by giving an input flame file to alter:\n"
-"\n"
-" env template=vidres.flam3 flam3-genome > parent.flam3\n"
-" env prefix=parent. flam3-render < parent.flam3\n"
-" env template=vidres.flam3 mutate=parent.flam3 repeat=10 flam3-genome > mutation.flam3\n"
-" flam3-render < mutation.flam3\n"
-"\n"
-"Normally one wouldn't use the same file for the template and the file\n"
-"to mutate. Crossover is handled similarly:\n"
-"\n"
-" env template=vidres.flam3 flam3-genome > parent0.flam3\n"
-" env prefix=parent0. flam3-render < parent0.flam3\n"
-" env template=vidres.flam3 flam3-genome > parent1.flam3\n"
-" env prefix=parent1. flam3-render < parent1.flam3\n"
-" env template=vidres.flam3 cross0=parent0.flam3 cross1=parent1.flam3 flam3-genome > crossover.flam3\n"
-" flam3-render < crossover.flam3\n"
-"\n"
-"flam3-genome has 3 ways to produce parameter files for animation in\n"
-"the style of electric sheep. the highest level and most useful from\n"
-"the command line is the sequence method. it takes a collection of\n"
-"control points and makes an animation that has each flame do fractal\n"
-"rotation for 360 degrees, then make a smooth transition to the next.\n"
-"for example:\n"
-"\n"
-" env sequence=test.flam3 nframes=20 flam3-genome > seq.flam3\n"
-" flam3-animate < seq.flam3\n"
-"\n"
-"creates and renders a 60 frame animation. there are two flames in\n"
-"test.flam3, so the animation consists three stags: the first one\n"
-"rotating, then a transition, then the second one rotating. each stage\n"
-"has 20 frames as specified on the command line. if you want to\n"
-"render only some fraction of a whole animation file, specify the begin\n"
-"and end times:\n"
-"\n"
-" env begin=20 end=40 flam3-animate < seq.flam3\n"
-"\n"
-"the other two methods are harder to use becaues they produce files that\n"
-"are only good for one frame of animation. the output consists of 3\n"
-"control points, one for the time requested, one before and one after.\n"
-"that allows proper motion blur. for example:\n"
-"\n"
-" env template=vidres.flam3 flam3-genome > rotme.flam3\n"
-" env rotate=rotme.flam3 frame=10 nframes=20 flam3-genome > rot10.flam3\n"
-" env frame=10 flam3-animate < rot10.flam3\n"
-"\n"
-"the file rot10.flam3 specifies the animation for just one frame, in\n"
-"this case 10 out of 20 frames in the complete animation. C1\n"
-"continuous electric sheep genetic crossfades are created like this:\n"
-"\n"
-" env inter=test.flam3 frame=10 nframes=20 flam3-genome > inter10.flam3\n"
-" env frame=10 flam3-animate < inter10.flam3\n"
-"\n"
-"see http://flam3.com/flame.pdf for descriptions & formulas, and\n"
-"see http://electricsheep.wikispaces.com/Variations for updates.\n"
-"\n"
-"The complete list of variations:\n"
-;
-
-void docstring() {
- int i;
- fputs(the_docstring0, stdout);
- fputs(flam3_version(), stdout);
- fputs(the_docstring1, stdout);
- for (i = 0; i < flam3_nvariations; i++)
- printf(" %2d. %s\n", i, flam3_variation_names[i]);
-}
diff --git a/flam3-animate.c b/flam3-animate.c
deleted file mode 100644
index bdd5dfd..0000000
--- a/flam3-animate.c
+++ /dev/null
@@ -1,297 +0,0 @@
-/*
- FLAM3 - cosmic recursive fractal flames
- Copyright (C) 1992-2009 Spotworks LLC
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-
-#include "private.h"
-#include "img.h"
-
-int main(int argc, char **argv) {
- char *ai, *fname;
- char flamename[256];
- char *prefix = args("prefix", "");
- int first_frame = argi("begin", 0);
- int last_frame = argi("end", 0);
- int frame_time = argi("time", 0);
- int dtime = argi("dtime", 1);
- int do_fields = argi("fields", 0);
- int write_genome = argi("write_genome",0);
- double qs = argf("qs", 1.0);
- double ss = argf("ss", 1.0);
- const char *format = "png";
- int verbose = argi("verbose", 1);
- int transparency = argi("transparency", 0);
- int bits = argi("bits", 33);
- int sub_batch_size = argi("sub_batch_size", 10000);
- int bpc = argi("bpc",8);
- int earlyclip = argi("earlyclip",0);
- int ftime, channels;
- unsigned char *image;
- flam3_genome *cps,center_cp;
- int i, ncps = 0;
- char *inf = getenv("in");
- double pixel_aspect = argf("pixel_aspect", 1.0);
- int num_threads = argi("nthreads",0);
- FILE *in,*fp,*genfp;
- flam3_frame f;
- flam3_img_comments fpc;
- stat_struct stats,stats2;
- randctx rc;
-
- char badval_string[64];
- char numiter_string[64];
- char rtime_string[64];
-
- memset(&center_cp,0, sizeof(flam3_genome));
-
- if (1 != argc) {
- docstring();
- exit(0);
- }
-
- rand_seed(&rc);
-
- /* Set the number of threads */
- if (num_threads==0) {
- num_threads = flam3_count_nthreads();
- if (verbose > 1)
- fprintf(stderr,"Automatically detected %d core(s)...\n",num_threads);
- } else{
- if (verbose)
- fprintf(stderr,"Manually specified %d thread(s)...\n",num_threads);
- }
-
- if (getenv("frame")) {
- if (getenv("time")) {
- fprintf(stderr, "cannot specify both time and frame.\n");
- exit(1);
- }
- if (getenv("begin") || getenv("end")) {
- fprintf(stderr, "cannot specify both frame and begin or end.\n");
- exit(1);
- }
- first_frame = last_frame = atoi(getenv("frame"));
- }
-
- if (getenv("time")) {
- if (getenv("begin") || getenv("end")) {
- fprintf(stderr, "cannot specify both time and begin or end.\n");
- exit(1);
- }
- first_frame = last_frame = frame_time;
- }
-
- if (pixel_aspect <= 0.0) {
- fprintf(stderr, "pixel aspect ratio must be positive, not %g.\n",
- pixel_aspect);
- exit(1);
- }
-
- if (inf)
- in = fopen(inf, "rb");
- else
- in = stdin;
- if (NULL == in) {
- perror(inf);
- exit(1);
- }
-
- cps = flam3_parse_from_file(in, inf, flam3_defaults_on, &ncps, &rc);
- if (inf)
- fclose(in);
- if (NULL == cps) {
- fprintf(stderr," error reading genomes.\n");
- exit(1);
- }
- if (0 == ncps) {
- fprintf(stderr, "error: no genomes.\n");
- exit(1);
- }
- for (i = 0; i < ncps; i++) {
- cps[i].sample_density *= qs;
- cps[i].height = (int)(cps[i].height * ss);
- cps[i].width = (int)(cps[i].width * ss);
- cps[i].pixels_per_unit *= ss;
- if (cps[i].height<=0 || cps[i].width<=0) {
- fprintf(stderr,"output image has dimension <=0, aborting.\n");
- exit(1);
- }
- if (i > 0 && cps[i].time <= cps[i-1].time) {
- fprintf(stderr, "error: control points must be sorted by time, but %g <= %g, index %d.\n",
- cps[i].time, cps[i-1].time, i);
- exit(1);
- }
- if ((cps[i].width != cps[0].width) ||
- (cps[i].height != cps[0].height)) {
- fprintf(stderr, "warning: flame %d at time %g size mismatch. "
- "(%d,%d) should be (%d,%d).\n",
- i, cps[i].time,
- cps[i].width, cps[i].height,
- cps[0].width, cps[0].height);
- cps[i].width = cps[0].width;
- cps[i].height = cps[0].height;
- }
- }
- if (!getenv("time") && !getenv("frame")) {
- if (!getenv("begin")) {
- first_frame = (int) cps[0].time;
- }
- if (!getenv("end")) {
- last_frame = (int) cps[ncps-1].time - 1;
- if (last_frame < first_frame) last_frame = first_frame;
- }
- }
- channels = strcmp(format, "png") ? 3 : 4;
-
- /* Check for 16-bit-per-channel processing */
- if ( (16 == bpc) && (strcmp(format,"png") != 0)) {
- fprintf(stderr,"Support for 16 bpc images is only present for the png format.\n");
- exit(1);
- } else if (bpc != 8 && bpc != 16) {
- fprintf(stderr,"Unexpected bpc specified (%d)\n",bpc);
- exit(1);
- }
-
-// f.temporal_filter_radius = argf("blur", 0.5);
- f.pixel_aspect_ratio = pixel_aspect;
- f.genomes = cps;
- f.ngenomes = ncps;
- f.verbose = verbose;
- f.bits = bits;
- f.progress = 0;
- f.earlyclip = earlyclip;
- f.nthreads = num_threads;
- f.sub_batch_size = sub_batch_size;
-
- if (16==bpc)
- f.bytes_per_channel = 2;
- else
- f.bytes_per_channel = 1;
-
-
- image = (void *) calloc((size_t)channels *
- (size_t)cps[0].width *
- (size_t)cps[0].height * f.bytes_per_channel, sizeof(char));
-
- if (dtime < 1) {
- fprintf(stderr, "dtime must be positive, not %d.\n", dtime);
- exit(1);
- }
-
- for (ftime = first_frame; ftime <= last_frame; ftime += dtime) {
- f.time = (double) ftime;
-
- if (verbose && ((last_frame-first_frame)/dtime) >= 1) {
- fprintf(stderr, "time = %d/%d/%d\n", ftime, last_frame, dtime);
- }
-
- if (do_fields) {
-
- if (flam3_render(&f, image, flam3_field_even, channels, transparency,&stats)) {
- fprintf(stderr,"error rendering image: aborting.\n");
- exit(1);
- }
- f.time += 0.5;
- if (flam3_render(&f, image, flam3_field_odd, channels, transparency,&stats2)) {
- fprintf(stderr,"error rendering image: aborting.\n");
- exit(1);
- }
-
- stats.badvals+=stats2.badvals;
- stats.render_seconds+=stats2.render_seconds;
- stats.num_iters+=stats2.num_iters;
- } else {
- if (flam3_render(&f, image, flam3_field_both, channels, transparency,&stats)) {
- fprintf(stderr,"error rendering image: aborting.\n");
- exit(1);
- }
- }
-
- if (getenv("out"))
- fname = getenv("out");
- else {
- fname = malloc(strlen(prefix) + 20);
- sprintf(fname, "%s%05d.%s", prefix, ftime, format);
- }
-
- if (verbose)
- fprintf(stderr, "writing %s...", fname);
-
- if (write_genome) {
- sprintf(flamename,"%s.flam3",fname);
-
- /* get center genome */
- flam3_interpolate(f.genomes, f.ngenomes, f.time, 0, &center_cp);
-
- /* write it out */
- genfp = fopen(flamename,"w");
- if (NULL == genfp) {
- perror(flamename);
- exit(1);
- }
-
- flam3_print(genfp, &center_cp, NULL, flam3_print_edits);
-
- fclose(genfp);
- }
-
- fp = fopen(fname, "wb");
- if (NULL == fp) {
- perror(fname);
- exit(1);
- }
-
- /* Get center cp for embedding in png file */
- flam3_interpolate(f.genomes, f.ngenomes, f.time, 0, &center_cp);
-
- /* Convert to string */
- fpc.genome = flam3_print_to_string(&center_cp);
- sprintf(badval_string, "%g",stats.badvals/(double)stats.num_iters);
- fpc.badvals = badval_string;
- sprintf(numiter_string,"%g",(double)stats.num_iters);
- fpc.numiters = numiter_string;
- sprintf(rtime_string,"%d",stats.render_seconds);
- fpc.rtime = rtime_string;
-
- write_png(fp, image, cps[0].width, cps[0].height, &fpc, f.bytes_per_channel);
-
- /* Free string */
- free(fpc.genome);
-
- clear_cp(&center_cp,0);
-
- fclose(fp);
-
- if (!getenv("out"))
- free(fname);
-
- }
-
- for (i = 0; i < ncps; i++) {
- xmlFreeDoc(cps[i].edits);
- clear_cp(&cps[i],0);
- }
- free(cps);
-
- free(image);
-
- if (verbose)
- fprintf(stderr, "done.\n");
-
- fflush(stderr);
- return 0;
-}
diff --git a/flam3-animate.man b/flam3-animate.man
deleted file mode 100644
index b754356..0000000
--- a/flam3-animate.man
+++ /dev/null
@@ -1,36 +0,0 @@
-.TH flam3-animate 1 "" ""
-.SH NAME
-flam3-animate
-flam3-render
-flam3-genome
-flam3-convert - render and animate FLAM3s and manipulate their genomes
-.SH SYNOPSIS
-.B flam3-render < input
-
-.SH DESCRIPTION
-
-FLAM3 implements a visual language based on a recursive set equation.
-
-Flam3-genome creates and manipulates genomes (xml parameter sets) in
-this language. Flam3-render turns genomes into still images, and
-Flam3-animate renders motion-blurred frames of animation.
-
-Flam3-convert reads from stdin files in the old format used by the
-flame GIMP plugin, and writes the new format to stdout.
-
-.SH OPTIONS
-
-Any command line option will cause the program to write its
-documentation to standard out.
-
-.SH ENVIRONMENT
-
-The environment variables are in the documention written to standard
-out given any command line option.
-
-.SH SEE ALSO
-.BR WWW.FLAM3.COM,
-.BR electricsheep (1),
-
-.SH AUTHOR
-spot aka Scott Draves, Erik Reckase
diff --git a/flam3-genome.c b/flam3-genome.c
deleted file mode 100644
index a6a8611..0000000
--- a/flam3-genome.c
+++ /dev/null
@@ -1,1058 +0,0 @@
-/*
- FLAM3 - cosmic recursive fractal flames
- Copyright (C) 1992-2009 Spotworks LLC
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "private.h"
-#include "config.h"
-
-int verbose;
-
-char *get_extras() {
- char *e = getenv("extras");
- return e;
-}
-
-void gprint(flam3_genome *cp, int extras) {
- if (getenv("noedits"))
- flam3_print(stdout, cp, extras ? get_extras() : NULL, flam3_dont_print_edits);
- else
- flam3_print(stdout, cp, extras ? get_extras() : NULL, flam3_print_edits);
-}
-
-
-void test_cp(flam3_genome *cp) {
- cp->time = 0.0;
- cp->interpolation = flam3_interpolation_linear;
- cp->palette_interpolation = flam3_palette_interpolation_hsv;
- cp->background[0] = 0.0;
- cp->background[1] = 0.0;
- cp->background[2] = 0.0;
- cp->center[0] = 0.0;
- cp->center[1] = 0.0;
- cp->rotate = 0.0;
- cp->pixels_per_unit = 64;
- cp->width = 128;
- cp->height = 128;
- cp->spatial_oversample = 1;
- cp->spatial_filter_radius = 0.5;
- cp->spatial_filter_select = 0;
- cp->zoom = 0.0;
- cp->sample_density = 1;
- cp->nbatches = 1;
- cp->ntemporal_samples = 1;
-}
-
-flam3_genome *string_to_cp(char *s, int *n, randctx * const rc) {
- flam3_genome *cp;
- FILE *fp;
-
- fp = fopen(s, "rb");
- if (NULL == fp) {
- perror(s);
- exit(1);
- }
- cp = flam3_parse_from_file(fp, s, flam3_defaults_on, n, rc);
- if (NULL == cp) {
- fprintf(stderr, "could not read genome from %s.\n", s);
- exit(1);
- }
- return cp;
-}
-
-xmlDocPtr create_new_editdoc(char *action, flam3_genome *parent0, flam3_genome *parent1) {
-
- xmlDocPtr doc = NULL, comment_doc = NULL;
- xmlNodePtr root_node = NULL, node = NULL, nodecopy = NULL;
- xmlNodePtr root_comment = NULL;
- struct tm *localt;
- time_t mytime;
- char *ai;
- char timestring[100];
- char *nick = getenv("nick");
- char *url = getenv("url");
- char *id = getenv("id");
- char *comment = getenv("comment");
- int sheep_gen = argi("sheep_gen",-1);
- int sheep_id = argi("sheep_id",-1);
- char buffer[100];
- char comment_string[100];
-
- doc = xmlNewDoc( (const xmlChar *)"1.0");
-
- /* Create the root node, called "edit" */
- root_node = xmlNewNode(NULL, (const xmlChar *)"edit");
- xmlDocSetRootElement(doc,root_node);
- /* Add the edit attributes */
-
- /* date */
- mytime = time(NULL);
- localt = localtime(&mytime);
- /* XXX use standard time format including timezone */
- strftime(timestring, 100, "%a %b %e %H:%M:%S %z %Y", localt);
- xmlNewProp(root_node, (const xmlChar *)"date", (const xmlChar *)timestring);
-
- /* nick */
- if (nick) {
- xmlNewProp(root_node, (const xmlChar *)"nick", (const xmlChar *)nick);
- }
-
- /* url */
- if (url) {
- xmlNewProp(root_node, (const xmlChar *)"url", (const xmlChar *)url);
- }
-
- if (id) {
- xmlNewProp(root_node, (const xmlChar *)"id", (const xmlChar *)id);
- }
-
- /* action */
- xmlNewProp(root_node, (const xmlChar *)"action", (const xmlChar *)action);
-
- /* sheep info */
- if (sheep_gen > 0 && sheep_id > 0) {
- /* Create a child node of the root node called sheep */
- node = xmlNewChild(root_node, NULL, (const xmlChar *)"sheep", NULL);
-
- /* Create the sheep attributes */
- sprintf(buffer, "%d", sheep_gen);
- xmlNewProp(node, (const xmlChar *)"generation", (const xmlChar *)buffer);
-
- sprintf(buffer, "%d", sheep_id);
- xmlNewProp(node, (const xmlChar *)"id", (const xmlChar *)buffer);
- }
-
- /* Check for the parents */
- /* If Parent 0 not specified, this is a randomly generated genome. */
- if (parent0) {
- if (parent0->edits) {
- /* Copy the node from the parent */
- node = xmlDocGetRootElement(parent0->edits);
- nodecopy = xmlCopyNode(node, 1);
- xmlNewProp(nodecopy,(const xmlChar *)"filename", (const xmlChar *)parent0->parent_fname);
- sprintf(buffer,"%d",parent0->genome_index);
- xmlNewProp(nodecopy,(const xmlChar *)"index", (const xmlChar *)buffer);
- xmlAddChild(root_node, nodecopy);
- } else {
- /* Insert a (parent has no edit) message */
- nodecopy = xmlNewChild(root_node, NULL, (const xmlChar *)"edit",NULL);
- xmlNewProp(nodecopy,(const xmlChar *)"filename", (const xmlChar *)parent0->parent_fname);
- sprintf(buffer,"%d",parent0->genome_index);
- xmlNewProp(nodecopy,(const xmlChar *)"index", (const xmlChar *)buffer);
-
- }
- }
-
- if (parent1) {
-
- if (parent1->edits) {
- /* Copy the node from the parent */
- node = xmlDocGetRootElement(parent1->edits);
- nodecopy = xmlCopyNode(node, 1);
- xmlNewProp(nodecopy,(const xmlChar *)"filename", (const xmlChar *)parent1->parent_fname);
- sprintf(buffer,"%d",parent1->genome_index);
- xmlNewProp(nodecopy,(const xmlChar *)"index", (const xmlChar *)buffer);
- xmlAddChild(root_node, nodecopy);
- } else {
- /* Insert a (parent has no edit) message */
- nodecopy = xmlNewChild(root_node, NULL, (const xmlChar *)"edit",NULL);
- xmlNewProp(nodecopy,(const xmlChar *)"filename", (const xmlChar *)parent1->parent_fname);
- sprintf(buffer,"%d",parent1->genome_index);
- xmlNewProp(nodecopy,(const xmlChar *)"index", (const xmlChar *)buffer);
- }
- }
-
- /* Comment string */
- /* This one's hard, since we have to treat the comment string as */
- /* a valid XML document. Create a new document using the comment */
- /* string as the in-memory document, and then copy all children of */
- /* the root node into the edit structure */
- /* Parsing the comment string should be done once and then copied */
- /* for each call to create_new_editdoc, but that's for later. */
- if (comment) {
-
- sprintf(comment_string,"<comm>%s</comm>",comment);
-
- comment_doc = xmlReadMemory(comment_string, strlen(comment_string), "comment.env", NULL, XML_PARSE_NONET);
-
- /* Check for errors */
- if (comment_doc==NULL) {
- fprintf(stderr, "Failed to parse comment into XML!\n");
- exit(1);
- }
-
- /* Loop through the children of the new document and copy */
- /* them into the root_node */
- root_comment = xmlDocGetRootElement(comment_doc);
-
- for (node=root_comment->children; node; node = node->next) {
-
- nodecopy = xmlCopyNode(node,1);
- xmlAddChild(root_node, nodecopy);
- }
-
- /* Free the created document */
- xmlFreeDoc(comment_doc);
- }
-
-
- /* return the xml doc */
- return(doc);
-}
-
-void offset(flam3_genome *g) {
- char *os = getenv("offset");
- double ox, oy;
- if (NULL == os) return;
- sscanf(os, "%lf:%lf", &ox, &oy);
- g->center[0] += ox / (g->pixels_per_unit * g->spatial_oversample);
- g->center[1] += oy / (g->pixels_per_unit * g->spatial_oversample);
-}
-
-void spin(int frame, double blend, flam3_genome *parent, flam3_genome *templ)
-{
- flam3_genome *result;
- char action[50];
- xmlDocPtr doc;
-
- /* Spin the parent blend*360 degrees */
- result = sheep_loop(parent,blend);
-
- /* Apply the template if necessary */
- if (templ)
- flam3_apply_template(result, templ);
-
- /* Set genome parameters accordingly */
- result->time = (double)frame;
- result->interpolation = flam3_interpolation_linear;
- result->palette_interpolation = flam3_palette_interpolation_hsv;
-
- /* Force linear interpolation - unsure if this is still necessary */
- /* I believe we put this in so that older clients could render frames */
-// result->interpolation_type = flam3_inttype_linear;
-
- /* Create the edit doc xml */
- sprintf(action,"rotate %g",blend*360.0);
- doc = create_new_editdoc(action, parent, (flam3_genome *)NULL);
- result->edits = doc;
-
- /* Subpixel jitter */
- offset(result);
-
- /* Make the name of the flame the time */
- sprintf(result->flame_name,"%f",result->time);
-
- /* Print the resulting xml */
- gprint(result, 1);
-
- /* Clear out the xml doc */
- xmlFreeDoc(result->edits);
-
- /* Clear the result cp */
- clear_cp(result,flam3_defaults_on);
-
- /* Free the cp allocated in flam3_sheep_loop */
- free(result);
-}
-
-void spin_inter(int frame, double blend, int seqflag, flam3_genome *parents, flam3_genome *templ) {
-
- flam3_genome *result;
- char action[50];
- xmlDocPtr doc;
- char *ai;
- double stagger = argf("stagger", 0.0);
-
- /* Interpolate between spun parents */
- result = sheep_edge(parents, blend, seqflag, stagger);
-
- /* Unsure why we check for random palettes on both ends... */
- if ((parents[0].palette_index != flam3_palette_random) &&
- (parents[1].palette_index != flam3_palette_random)) {
-
- result->palette_index = flam3_palette_interpolated;
- result->palette_index0 = parents[0].palette_index;
- result->hue_rotation0 = parents[0].hue_rotation;
- result->palette_index1 = parents[1].palette_index;
- result->hue_rotation1 = parents[1].hue_rotation;
- result->palette_blend = blend;
- }
-
- /* Apply template if necessary */
- if (templ)
- flam3_apply_template(result, templ);
-
- /* Set genome attributes */
- result->time = (double)frame;
-// result->interpolation_type = flam3_inttype_linear;
-
- /* Create the edit doc xml */
- sprintf(action,"interpolate %g",blend*360.0);
- doc = create_new_editdoc(action, &parents[0], &parents[1]);
- result->edits = doc;
-
- /* Subpixel jitter */
- offset(result);
-
- /* Make the name of the flame the time */
- sprintf(result->flame_name,"%f",result->time);
-
- /* Print the genome */
- gprint(result, 1);
-
- /* Clean up */
- xmlFreeDoc(result->edits);
-
- /* Free genome storage */
- clear_cp(result,flam3_defaults_on);
- free(result);
-}
-
-void truncate_variations(flam3_genome *g, int max_vars, char *action) {
- int i, j, nvars, smallest;
- double sv=0;
- char trunc_note[30];
-
- for (i = 0; i < g->num_xforms; i++) {
- double d = g->xform[i].density;
-
-/* if (0.0 < d && d < 0.001) */
-
- if (d < 0.001 && (g->final_xform_index != i)) {
- sprintf(trunc_note," trunc_density %d",i);
- //strcat(action,trunc_note);
- add_to_action(action,trunc_note);
- flam3_delete_xform(g, i);
-
-/* g->xform[i].density = 0.0;
- } else if (d > 0.0) {
-*/
- } else {
- do {
- nvars = 0;
- smallest = -1;
- for (j = 0; j < flam3_nvariations; j++) {
- double v = g->xform[i].var[j];
- if (v != 0.0) {
- nvars++;
- if (-1 == smallest || fabs(v) < sv) {
- smallest = j;
- sv = fabs(v);
- }
- }
- }
- if (nvars > max_vars) {
- sprintf(trunc_note," trunc %d %d",i,smallest);
- //strcat(action,trunc_note);
- add_to_action(action,trunc_note);
- g->xform[i].var[smallest] = 0.0;
- }
- } while (nvars > max_vars);
- }
- }
-}
-
-static double golden_bit(randctx *rc) {
- return rand_bool(rc)?0.38196:0.61804;
-}
-
-int
-main(argc, argv)
- int argc;
- char **argv;
-{
- int debug = 0;
- int count;
- char *ai;
- unsigned char *image;
- flam3_genome *templ = NULL;
- flam3_genome cp_orig, cp_save;
- int i, j;
- double avg_pix, fraction_black, fraction_white;
- double avg_thresh = argf("avg", 20.0);
- double black_thresh = argf("black", 0.01);
- double white_limit = argf("white", 0.05);
- int nframes = argi("nframes", 100);
- int sym = argi("symmetry", 0);
- int enclosed = argi("enclosed", 1);
- char *clone = getenv("clone");
- char *clone_all = getenv("clone_all");
- char *animate = getenv("animate");
- char *mutate = getenv("mutate");
- char *cross0 = getenv("cross0");
- char *cross1 = getenv("cross1");
- char *method = getenv("method");
- char *inter = getenv("inter");
- char *rotate = getenv("rotate");
- char *strip = getenv("strip");
- char *sequence = getenv("sequence");
- int loops = argi("loops", 1);
- int frame = argi("frame", 0);
- int rep, repeat = argi("repeat", 1);
- double speed = argf("speed", 0.1);
- int bits = argi("bits", 33);
- int ntries = argi("tries", 10);
- char *use_vars = getenv("use_vars");
- char *dont_use_vars = getenv("dont_use_vars");
- flam3_genome *parent0=NULL, *parent1=NULL;
- flam3_genome selp0, selp1;
- flam3_genome *aselp0, *aselp1;
- int parent0_n, parent1_n;
- int num_threads = 1;
- flam3_genome *cp;
- int ncp;
- randctx rc;
-
- int ivars[max_specified_vars];
- int novars[max_specified_vars];
- int num_ivars = 0;
- int num_novars = 0;
- char *var_tok;
-
- flam3_frame f;
- char action[flam3_max_action_length];
-
- stat_struct stats;
-
- if (argc>1) {
- if (strcmp("--version",argv[1])==0) {
- printf("FLAM3-%s\n",flam3_version());
- exit(0);
- } else {
- printf("unrecognized option %s, aborting.\n",argv[1]);
- exit(-1);
- }
- }
-
- verbose = argi("verbose", 0);
-
- memset(&cp_orig, 0, sizeof(flam3_genome));
- memset(&cp_save, 0, sizeof(flam3_genome));
- memset(&selp0, 0, sizeof(flam3_genome));
- memset(&selp1, 0, sizeof(flam3_genome));
-
- if (1 != argc) {
- docstring();
- exit(0);
- }
-
- rand_seed(&rc);
-
- //f.temporal_filter_radius = 0.0;
- f.bits = bits;
- f.bytes_per_channel = 1;
- f.earlyclip = 1;
- f.verbose = 0;
- f.genomes = &cp_orig;
- f.ngenomes = 1;
- f.pixel_aspect_ratio = 1.0;
- f.progress = 0;
- f.nthreads = num_threads;
- f.sub_batch_size = 10000;
- test_cp(&cp_orig); // just for the width & height
-
- /* Are the variations to be used specified? */
- if (use_vars && dont_use_vars) {
- fprintf(stderr,"use_vars and dont_use_vars cannot both be specified. Terminating.\n");
- exit(-1);
- }
-
- /* Specify reasonable defaults if nothing is specified */
- if (!use_vars && !dont_use_vars) {
- novars[num_novars++] = VAR_NOISE;
- novars[num_novars++] = VAR_BLUR;
- novars[num_novars++] = VAR_GAUSSIAN_BLUR;
- novars[num_novars++] = VAR_RADIAL_BLUR;
- novars[num_novars++] = VAR_NGON;
- novars[num_novars++] = VAR_SQUARE;
- novars[num_novars++] = VAR_RAYS;
- novars[num_novars++] = VAR_CROSS;
- novars[num_novars++] = VAR_PRE_BLUR;
- novars[num_novars++] = VAR_SEPARATION;
- novars[num_novars++] = VAR_SPLIT;
- novars[num_novars++] = VAR_SPLITS;
-
-
-
- /* Loop over the novars and set ivars to the complement */
- for (i=0;i<flam3_nvariations;i++) {
- for (j=0;j<num_novars;j++) {
- if (novars[j] == i)
- break;
- }
- if (j==num_novars)
- ivars[num_ivars++] = i;
- }
-
- } else {
-
- if (use_vars) {
- /* Parse comma-separated list of variations to use */
- var_tok = strtok(use_vars,",");
- ivars[num_ivars++] = atoi(var_tok);
- while(1) {
- var_tok = strtok(NULL,",");
-
- if (var_tok==NULL)
- break;
-
- ivars[num_ivars++] = atoi(var_tok);
-
- if (num_ivars==max_specified_vars) {
- fprintf(stderr,"Maximum number of user-specified variations exceeded. Truncating.\n");
- break;
- }
- }
-
- /* Error checking */
- for (i=0;i<num_ivars;i++) {
- if (ivars[i]<0 || ivars[i]>=flam3_nvariations) {
- fprintf(stderr,"specified variation list includes bad value. (%d)\n",ivars[i]);
- exit(1);
- }
- }
- } else if (dont_use_vars) {
- /* Parse comma-separated list of variations NOT to use */
- var_tok = strtok(dont_use_vars,",");
- novars[num_novars++] = atoi(var_tok);
- while(1) {
- var_tok = strtok(NULL,",");
-
- if (var_tok==NULL)
- break;
-
- novars[num_novars++] = atoi(var_tok);
-
- if (num_novars==max_specified_vars) {
- fprintf(stderr,"Maximum number of user-specified variations exceeded. Truncating.\n");
- break;
- }
- }
-
- /* Loop over the novars and set ivars to the complement */
- for (i=0;i<flam3_nvariations;i++) {
- for (j=0;j<num_novars;j++) {
- if (novars[j] == i)
- break;
- }
- if (j==num_novars)
- ivars[num_ivars++] = i;
- }
- }
- }
-
- if (1 < (!!mutate + !!(cross0 || cross1) +
- !!inter + !!rotate + !!clone + !!strip )) {
- fprintf(stderr,
- "can only specify one of mutate, clone, cross, rotate, strip, or inter.\n");
- exit(1);
- }
-
- if ( (!cross0) ^ (!cross1) ) {
- fprintf(stderr, "must specify both crossover arguments.\n");
- exit(1);
- }
-
- if (method && (!cross0 && !mutate)) {
- fprintf(stderr, "cannot specify method unless doing crossover or mutate.\n");
- exit(1);
- }
-
- if (getenv("template")) {
- char *tf = getenv("template");
-
- templ = string_to_cp(tf, &ncp, &rc);
- if (1 < ncp) {
- fprintf(stderr, "more than one control point in template, "
- "ignoring all but first.\n");
- } else if (0 == ncp) {
- fprintf(stderr, "no control points in template.\n");
- exit(1);
- }
-
- }
-
- /* Methods for genetic manipulation begin here */
-
- if (clone_all) {
-
- cp = string_to_cp(clone_all, &ncp, &rc);
-
- printf("<clone_all version=\"FLAM3-%s\">\n", flam3_version());
- for (i = 0; i < ncp; i++) {
- if (templ) flam3_apply_template(&cp[i], templ);
- offset(&cp[i]);
- gprint(&cp[i], 1);
- }
- printf("</clone_all>\n");
-
- exit(0);
- }
-
- if (animate) {
- flam3_genome interpolated;
- int first_frame,last_frame;
- int ftime,iscp;
- double stagger = argf("stagger", 0.0);
- cp = string_to_cp(animate, &ncp, &rc);
-
-
- for (i = 0; i < ncp; i++) {
- if (i > 0 && cp[i].time <= cp[i-1].time) {
- fprintf(stderr, "error: control points must be sorted by time, but %g <= %g, index %d.\n",
- cp[i].time, cp[i-1].time, i);
- exit(1);
- }
- /* Strip out all motion elements here */
- for (j=0;j<cp[i].num_xforms;j++)
- flam3_delete_motion_elements(&cp[i].xform[j]);
-
- }
-
- if (!getenv("begin"))
- first_frame = (int) cp[0].time;
- else
- first_frame = argi("begin",0);
-
- if (!getenv("end"))
- last_frame = (int) cp[ncp-1].time;
- else
- last_frame = argi("end",0);
-
- if (last_frame < first_frame) last_frame = first_frame;
-
- printf("<animate version=\"FLAM3-%s\">\n", flam3_version());
-
- for (ftime = first_frame; ftime <= last_frame; ftime += 1) {
- iscp=0;
- for (i=0;i<ncp;i++) {
- if ( ftime==cp[i].time ) {
- flam3_copy(&interpolated, &(cp[i]) );
- iscp=1;
- }
- }
- if (iscp==0) {
- flam3_interpolate(cp, ncp, (double)ftime, stagger, &interpolated);
- for (i=0;i<ncp;i++) {
- if ( ftime==cp[i].time-1 ) {
- iscp=1;
- }
- }
- if (iscp==0)
- interpolated.interpolation_type = flam3_inttype_linear;
- }
-
- if (templ) flam3_apply_template(&interpolated, templ);
- gprint(&interpolated, 1);
- }
- printf("</animate>\n");
- exit(0);
- }
-
-
- if (sequence) {
- double blend;
- int seqflag;
- int framecount;
-
- if (nframes <= 0) {
- fprintf(stderr, "nframes must be positive, not %d.\n", nframes);
- exit(1);
- }
-
- cp = string_to_cp(sequence, &ncp, &rc);
-
- if (enclosed) printf("<sequence version=\"FLAM3-%s\">\n", flam3_version());
- framecount = 0;
-#if 1
- for (i = 0; i < ncp; i++) {
- if (loops) {
- for (frame = 0; frame < nframes; frame++) {
- blend = frame/(double)nframes;
- spin(framecount++, blend, &cp[i], templ);
- }
- }
- if (i < ncp-1)
- for (frame = 0; frame < nframes; frame++) {
- if (0==frame || nframes-1==frame)
- seqflag=1;
- else
- seqflag=0;
- blend = frame/(double)nframes;
- spin_inter(framecount++, blend, seqflag, &cp[i], templ);
- }
- }
- spin(framecount, 0.0, &cp[ncp-1], templ);
-#else
- if (1) {
- flam3_genome res;
- memset(&res, 0, sizeof(flam3_genome));
- res.final_xform_index = -1;
- flam3_add_xforms(&res, cp[0].num_xforms, 0);
-
- if (ncp < 4) {
- fprintf(stderr, "catmull-rom requires 4 or more control points.\n");
- exit(1);
- }
- for (i = 0; i < ncp - 3; i++) {
- for (frame = 0; frame < nframes; frame++) {
- blend = frame/(double)nframes;
- interpolate_catmull_rom(cp+i, blend, &res);
- res.time = frame + i * nframes;
- gprint(&res, 0);
- fflush(stdout);
- }
- }
- }
-#endif
- if (enclosed) printf("</sequence>\n");
- exit(0);
- }
-
- if (inter || rotate) {
-
- double blend, spread;
- char *fname = inter?inter:rotate;
- int ni;
-
- if (nframes <= 0) {
- fprintf(stderr, "nframes must be positive, not %d.\n", nframes);
- exit(1);
- }
-
- blend = frame/(double)nframes;
- spread = 1.0/nframes;
-
- cp = string_to_cp(fname, &ncp, &rc);
-
- if (enclosed) printf("<pick version=\"FLAM3-%s\">\n", flam3_version());
- if (rotate) {
- if (1 != ncp) {
- fprintf(stderr, "rotation requires one control point, not %d.\n", ncp);
- exit(1);
- }
- spin(frame - 1, blend - spread, cp, templ);
- spin(frame , blend , cp, templ);
- spin(frame + 1, blend + spread, cp, templ);
- } else {
- if (2 != ncp) {
- fprintf(stderr, "interpolation requires two control points, not %d.\n", ncp);
- exit(1);
- }
- spin_inter(frame - 1, blend - spread, 0, cp, templ);
- spin_inter(frame , blend , 0, cp, templ);
- spin_inter(frame + 1, blend + spread, 0, cp, templ);
- }
- if (enclosed) printf("</pick>\n");
-
- for (ni=0;ni<ncp;ni++) {
- xmlFreeDoc(cp[ni].edits);
- clear_cp(&cp[ni],flam3_defaults_on);
- }
- free(cp);
-
- exit(0);
- }
-
- if (strip) {
-
- cp = string_to_cp(strip, &ncp, &rc);
-
- if (enclosed) printf("<pick version=\"FLAM3-%s\">\n", flam3_version());
-
- for (i = 0; i < ncp; i++) {
- double old_center[2];
-
- /* Strip out motion elements */
- for (j=0;j<cp[i].num_xforms;j++)
- flam3_delete_motion_elements(&cp[i].xform[j]);
-
- old_center[0] = cp[i].center[0];
- old_center[1] = cp[i].center[1];
- cp[i].height /= nframes;
- cp[i].center[1] = cp[i].center[1] - ((nframes - 1) * cp[i].height) /
- (2 * cp[i].pixels_per_unit * pow(2.0, cp[i].zoom));
- cp[i].center[1] += cp[i].height * frame / ( cp[i].pixels_per_unit * pow(2.0,cp[i].zoom) );
- rotate_by(cp[i].center, old_center, cp[i].rotate);
-
- if (templ) flam3_apply_template(&cp[i], templ);
- offset(&cp[i]);
- gprint(&cp[i], 1);
- }
-
- if (enclosed) printf("</pick>\n");
- exit(0);
- }
-
- /* pick a control point until it looks good enough */
- if (repeat <= 0) {
- fprintf(stderr, "repeat must be positive, not %d.\n", repeat);
- exit(1);
- }
-
- if (enclosed) printf("<pick version=\"FLAM3-%s\">\n", flam3_version());
- image = (unsigned char *) malloc(3 * cp_orig.width * cp_orig.height);
-
- for (rep = 0; rep < repeat; rep++) {
-
- if (verbose)
- fprintf(stderr, "flame = %d/%d..", rep+1, repeat);
-
- count = 0;
-
- if (clone) {
-
- parent0 = string_to_cp(clone, &parent0_n, &rc);
- /* Action is 'clone' with trunc_vars concat */
- sprintf(action,"clone");
-
- if (getenv("clone_action"))
- sprintf(action,"clone %s", getenv("clone_action"));
-
- flam3_copy(&selp0, &(parent0[rand_mod(&rc,parent0_n)]));
- flam3_copy(&cp_save, &selp0);
- aselp0 = &selp0;
- aselp1 = NULL;
- truncate_variations(&cp_save, 5, action);
-
- cp_save.edits = create_new_editdoc(action, aselp0, aselp1);
-
- } else {
- int did_color;
-
- do {
-
- int random_mode=0;
-
- if (verbose) fprintf(stderr, ".");
- did_color = 0;
- f.time = (double) 0.0;
- action[0] = 0;
-
- if (mutate) {
- int mutmeth;
-
- parent0 = string_to_cp(mutate, &parent0_n, &rc);
- flam3_copy(&selp0, &(parent0[rand_mod(&rc, parent0_n)]));
- flam3_copy(&cp_orig, &selp0);
- aselp0 = &selp0;
- aselp1 = NULL;
-
- if (NULL == getenv("method"))
- mutmeth = MUTATE_NOT_SPECIFIED;
- else if (!strcmp(method,"all_vars"))
- mutmeth = MUTATE_ALL_VARIATIONS;
- else if (!strcmp(method,"one_xform"))
- mutmeth = MUTATE_ONE_XFORM_COEFS;
- else if (!strcmp(method,"add_symmetry"))
- mutmeth = MUTATE_ADD_SYMMETRY;
- else if (!strcmp(method,"post_xforms"))
- mutmeth = MUTATE_POST_XFORMS;
- else if (!strcmp(method,"color_palette"))
- mutmeth = MUTATE_COLOR_PALETTE;
- else if (!strcmp(method,"delete_xform"))
- mutmeth = MUTATE_DELETE_XFORM;
- else if (!strcmp(method,"all_coefs"))
- mutmeth = MUTATE_ALL_COEFS;
- else {
- fprintf(stderr,"method '%s' not defined for mutate. defaulting to random.\n",method);
- mutmeth = MUTATE_NOT_SPECIFIED;
- }
-
- flam3_mutate(&cp_orig, mutmeth, ivars, num_ivars, sym, speed, &rc, action);
-
- /* Scan string returned for 'mutate color' */
- if ( strstr(action,"mutate color") )
- did_color = 1;
-
- if (cp_orig.flame_name[0]) {
- char tm[flam3_name_len+1];
- strncpy(tm, cp_orig.flame_name, flam3_name_len);
- snprintf(cp_orig.flame_name, flam3_name_len, "mutation %d of %s", rep, tm);
- }
-
- } else if (cross0) {
- int i0, i1;
- int crossmeth;
-
- parent0 = string_to_cp(cross0, &parent0_n, &rc);
- parent1 = string_to_cp(cross1, &parent1_n, &rc);
-
- i0 = rand_mod(&rc, parent0_n);
- i1 = rand_mod(&rc, parent1_n);
-
- flam3_copy(&selp0, &(parent0[i0]));
- flam3_copy(&selp1, &(parent1[i1]));
-
- aselp0 = &selp0;
- aselp1 = &selp1;
-
- if (NULL == getenv("method"))
- crossmeth = CROSS_NOT_SPECIFIED;
- else if (!strcmp(method,"union"))
- crossmeth = CROSS_UNION;
- else if (!strcmp(method,"interpolate"))
- crossmeth = CROSS_INTERPOLATE;
- else if (!strcmp(method,"alternate"))
- crossmeth = CROSS_ALTERNATE;
- else {
- fprintf(stderr,"method '%s' not defined for cross. defaulting to random.\n",method);
- crossmeth = CROSS_NOT_SPECIFIED;
- }
-
- flam3_cross(&parent0[i0], &parent1[i1], &cp_orig, crossmeth, &rc, action);
-
- if (parent0[i0].flame_name[0] || parent1[i1].flame_name[0]) {
- snprintf(cp_orig.flame_name, flam3_name_len, "%d of %s x %s",
- rep, parent0[i0].flame_name, parent1[i1].flame_name);
- }
-
- } else {
- sprintf(action,"random");
- random_mode=1;
- flam3_random(&cp_orig, ivars, num_ivars, sym, 0, &rc);
-
-
- aselp0 = NULL;
- aselp1 = NULL;
- }
-
- /* Adjust bounding box half the time */
- if (rand_bool(&rc) || random_mode) {
- double bmin[2], bmax[2];
- flam3_estimate_bounding_box(&cp_orig, 0.01, 100000, bmin, bmax, &rc);
- if (rand_d01(&rc) < 0.3) {
- cp_orig.center[0] = (bmin[0] + bmax[0]) / 2.0;
- cp_orig.center[1] = (bmin[1] + bmax[1]) / 2.0;
- add_to_action(action," recentered");
- } else {
- double mix0, mix1;
- if (rand_bool(&rc)) {
- mix0 = golden_bit(&rc) + rand_d11(&rc)/5;
- mix1 = golden_bit(&rc);
- add_to_action(action," reframed0");
- } else if (rand_bool(&rc)) {
- mix0 = golden_bit(&rc);
- mix1 = golden_bit(&rc) + rand_d11(&rc)/5;
- add_to_action(action," reframed1");
- } else {
- mix0 = golden_bit(&rc) + rand_d11(&rc)/5;
- mix1 = golden_bit(&rc) + rand_d11(&rc)/5;
- add_to_action(action," reframed2");
- }
- cp_orig.center[0] = mix0 * bmin[0] + (1-mix0)*bmax[0];
- cp_orig.center[1] = mix1 * bmin[1] + (1-mix1)*bmax[1];
- }
- cp_orig.rot_center[0] = cp_orig.center[0];
- cp_orig.rot_center[1] = cp_orig.center[1];
- cp_orig.pixels_per_unit = cp_orig.width / (bmax[0] - bmin[0]);
- }
-
- truncate_variations(&cp_orig, 5, action);
-
- if (!did_color && rand_bool(&rc)) {
- if (debug)
- fprintf(stderr,"improving colors...\n");
-
- flam3_improve_colors(&cp_orig, 100, 0, 10, &rc);
- //strcat(action," improved colors");
- add_to_action(action," improved colors");
- }
-
- cp_orig.edits = create_new_editdoc(action, aselp0, aselp1);
- flam3_copy(&cp_save, &cp_orig);
- test_cp(&cp_orig);
- if (flam3_render(&f, image, flam3_field_both, 3, 0, &stats)) {
- fprintf(stderr,"error rendering test image: aborting.\n");
- exit(1);
- }
-
- if (1) {
- int n, tot, totb, totw;
- n = cp_orig.width * cp_orig.height;
- tot = 0;
- totb = 0;
- totw = 0;
- for (i = 0; i < 3*n; i+=3) {
-
- tot += (image[i]+image[i+1]+image[i+2]);
- if (0 == image[i] && 0 == image[i+1] && 0 == image[i+2]) totb++;
- if (255 == image[i] && 255 == image[i+1] && 255 == image[i+2]) totw++;
-
- // printf("%d ", image[i]);
- }
-
- avg_pix = (tot / (double)(3*n));
- fraction_black = totb / (double)n;
- fraction_white = totw / (double)n;
-
- if (debug)
- fprintf(stderr,
- "avg_pix=%g fraction_black=%g fraction_white=%g n=%g\n",
- avg_pix, fraction_black, fraction_white, (double)n);
-
- } else {
- avg_pix = avg_thresh + 1.0;
- fraction_black = black_thresh + 1.0;
- fraction_white = white_limit - 1.0;
- }
-
- clear_cp(&cp_orig,flam3_defaults_on);
-
- count++;
- } while ((avg_pix < avg_thresh ||
- fraction_black < black_thresh ||
- fraction_white > white_limit) &&
- count < ntries);
-
- if (ntries == count) {
- fprintf(stderr, "warning: reached maximum attempts, giving up.\n");
- }
-
- }
-
- if (templ)
- flam3_apply_template(&cp_save,templ);
-
- cp_save.time = (double)rep;
-
- if (1) {
- char *maxforms = getenv("maxforms");
- if (maxforms && atoi(maxforms)) {
- cp_save.symmetry = 0;
- while (cp_save.num_xforms > atoi(maxforms))
- flam3_delete_xform(&cp_save, cp_save.num_xforms - 1);
- }
- }
-
- gprint(&cp_save, 1);
- fflush(stdout);
-
- /* Free created documents */
- /* (Only free once, since the copy is a ptr to the original) */
- xmlFreeDoc(cp_save.edits);
- clear_cp(&cp_save,0);
-
- if (verbose) {
- fprintf(stderr, "\ndone. action = %s\n", action);
- }
-
- }
- if (enclosed) printf("</pick>\n");
- free(image);
-
- return 0;
-}
diff --git a/flam3-genome.man b/flam3-genome.man
deleted file mode 100644
index b754356..0000000
--- a/flam3-genome.man
+++ /dev/null
@@ -1,36 +0,0 @@
-.TH flam3-animate 1 "" ""
-.SH NAME
-flam3-animate
-flam3-render
-flam3-genome
-flam3-convert - render and animate FLAM3s and manipulate their genomes
-.SH SYNOPSIS
-.B flam3-render < input
-
-.SH DESCRIPTION
-
-FLAM3 implements a visual language based on a recursive set equation.
-
-Flam3-genome creates and manipulates genomes (xml parameter sets) in
-this language. Flam3-render turns genomes into still images, and
-Flam3-animate renders motion-blurred frames of animation.
-
-Flam3-convert reads from stdin files in the old format used by the
-flame GIMP plugin, and writes the new format to stdout.
-
-.SH OPTIONS
-
-Any command line option will cause the program to write its
-documentation to standard out.
-
-.SH ENVIRONMENT
-
-The environment variables are in the documention written to standard
-out given any command line option.
-
-.SH SEE ALSO
-.BR WWW.FLAM3.COM,
-.BR electricsheep (1),
-
-.SH AUTHOR
-spot aka Scott Draves, Erik Reckase
diff --git a/flam3-render.c b/flam3-render.c
deleted file mode 100644
index fccec1d..0000000
--- a/flam3-render.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- FLAM3 - cosmic recursive fractal flames
- Copyright (C) 1992-2009 Spotworks LLC
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <limits.h>
-
-
-#include "private.h"
-#include "img.h"
-
-int print_progress(void *foo, double fraction, int stage, double eta) {
- fprintf(stderr, "stage=%s progress=%g eta=%g\n", stage?"filtering":"chaos", fraction, eta);
- return 0;
-}
-
-int main(int argc, char **argv) {
- flam3_frame f;
- char *ai;
- flam3_genome *cps;
- int ncps;
- int i;
- void *image=NULL;
- FILE *fp;
- char fname[256];
- size_t this_size;
- char *prefix = args("prefix", "");
- char *out = args("out", NULL);
- const char *format = "png";
- int verbose = argi("verbose", 1);
- int bits = argi("bits", 33);
- int bpc = argi("bpc",8);
- int transparency = argi("transparency", 0);
- char *inf = getenv("in");
- double qs = argf("qs", 1.0);
- double ss = argf("ss", 1.0);
- double pixel_aspect = argf("pixel_aspect", 1.0);
- int sub_batch_size = argi("sub_batch_size",10000);
- int name_enable = argi("name_enable",0);
- int num_threads = argi("nthreads",0);
- int earlyclip = argi("earlyclip",0);
- FILE *in;
- unsigned int channels;
- long start_time = (long)time(0);
- flam3_img_comments fpc;
- stat_struct stats;
- char numiter_string[64];
- char badval_string[64];
- char rtime_string[64];
- randctx rc;
-
- if (1 != argc) {
- docstring();
- exit(0);
- }
-
- /* Init random number generators */
- rand_seed(&rc);
-
- /* Set the number of threads */
- if (num_threads==0) {
- num_threads = flam3_count_nthreads();
- if (verbose > 1)
- fprintf(stderr,"Automatically detected %d core(s)...\n",num_threads);
- } else{
- if (verbose)
- fprintf(stderr,"Manually specified %d thread(s)...\n",num_threads);
- }
-
-
- channels = strcmp(format, "png") ? 3 : 4;
-
- /* Check for 16-bit-per-channel processing */
- if ( (16 == bpc) && (strcmp(format,"png") != 0)) {
- fprintf(stderr,"Support for 16 bpc images is only present for the png format.\n");
- exit(1);
- } else if (bpc != 8 && bpc != 16) {
- fprintf(stderr,"Unexpected bpc specified (%d)\n",bpc);
- exit(1);
- }
-
- if (pixel_aspect <= 0.0) {
- fprintf(stderr, "pixel aspect ratio must be positive, not %g.\n",
- pixel_aspect);
- exit(1);
- }
-
- if (inf)
- in = fopen(inf, "rb");
- else
- in = stdin;
- if (NULL == in) {
- perror(inf);
- exit(1);
- }
-
- cps = flam3_parse_from_file(in, inf, flam3_defaults_on, &ncps, &rc);
- if (NULL == cps) {
- fprintf(stderr,"error reading genomes from file\n");
- exit(1);
- }
-
- if (inf)
- fclose(in);
-
- for (i = 0; i < ncps; i++) {
- /* Force ntemporal_samples to 1 for -render */
- cps[i].ntemporal_samples = 1;
- cps[i].sample_density *= qs;
- cps[i].height = (int)(cps[i].height * ss);
- cps[i].width = (int)(cps[i].width * ss);
- cps[i].pixels_per_unit *= ss;
- if (cps[i].height<=0 || cps[i].width<=0) {
- fprintf(stderr,"output image has dimension <=0, aborting.\n");
- exit(1);
- }
- }
-
- if (out && (ncps > 1)) {
- fprintf(stderr, "hqi-flame: warning: writing multiple images "
- "to one file. all but last will be lost.\n");
- }
-
-
- for (i = 0; i < ncps; i++) {
- if (verbose && ncps > 1) {
- fprintf(stderr, "flame = %d/%d ", i+1, ncps);
- }
-
-// f.temporal_filter_radius = 0.0;
- f.genomes = &cps[i];
- f.ngenomes = 1;
- f.verbose = verbose;
- f.bits = bits;
- f.time = 0.0;
- f.pixel_aspect_ratio = pixel_aspect;
- f.progress = 0;//print_progress;
- f.nthreads = num_threads;
- f.earlyclip = earlyclip;
- f.sub_batch_size = sub_batch_size;
-
- if (16==bpc)
- f.bytes_per_channel = 2;
- else
- f.bytes_per_channel = 1;
-
-
- this_size = (size_t)channels * (size_t)cps[i].width
- * (size_t)cps[i].height * f.bytes_per_channel;
- image = (void *) calloc(this_size, sizeof(char));
-
- if (verbose && ncps > 1) {
- fprintf(stderr, "\n");
- }
- cps[i].ntemporal_samples = 1;
- if (flam3_render(&f, image, flam3_field_both, channels, transparency, &stats)) {
- fprintf(stderr,"error rendering image: aborting.\n");
- exit(1);
- }
-
- if (NULL != out) {
- strcpy(fname,out);
- } else if (name_enable && cps[i].flame_name[0]>0) {
- sprintf(fname, "%s.%s",cps[i].flame_name,format);
- } else {
- sprintf(fname, "%s%05d.%s", prefix, i, format);
- }
- if (verbose) {
- fprintf(stderr, "writing %s...", fname);
- }
- fp = fopen(fname, "wb");
- if (NULL == fp) {
- perror(fname);
- exit(1);
- }
-
- /* Generate temp file with genome */
- fpc.genome = flam3_print_to_string(f.genomes);
-
- sprintf(badval_string,"%g",stats.badvals/(double)stats.num_iters);
- fpc.badvals = badval_string;
- sprintf(numiter_string,"%g",(double)stats.num_iters);
- fpc.numiters = numiter_string;
- sprintf(rtime_string,"%d",stats.render_seconds);
- fpc.rtime = rtime_string;
-
- write_png(fp, image, cps[i].width, cps[i].height, &fpc, f.bytes_per_channel);
- /* Free string */
- free(fpc.genome);
-
- fclose(fp);
-
- if (verbose) {
- fprintf(stderr, "done.\n");
- }
- }
- if (verbose && (ncps > 1)) {
- long total_time = (long)time(0) - start_time;
-
- if (total_time > 100)
- fprintf(stderr, "total time = %.1f minutes\n", total_time / 60.0);
- else
- fprintf(stderr, "total time = %ld seconds\n", total_time);
- }
-
- for (i=0;i<ncps;i++) {
-
- xmlFreeDoc(cps[i].edits);
- clear_cp(&cps[i],0);
-
- }
- free(cps);
-
- free(image);
- return 0;
-}
diff --git a/flam3-render.man b/flam3-render.man
deleted file mode 100644
index b754356..0000000
--- a/flam3-render.man
+++ /dev/null
@@ -1,36 +0,0 @@
-.TH flam3-animate 1 "" ""
-.SH NAME
-flam3-animate
-flam3-render
-flam3-genome
-flam3-convert - render and animate FLAM3s and manipulate their genomes
-.SH SYNOPSIS
-.B flam3-render < input
-
-.SH DESCRIPTION
-
-FLAM3 implements a visual language based on a recursive set equation.
-
-Flam3-genome creates and manipulates genomes (xml parameter sets) in
-this language. Flam3-render turns genomes into still images, and
-Flam3-animate renders motion-blurred frames of animation.
-
-Flam3-convert reads from stdin files in the old format used by the
-flame GIMP plugin, and writes the new format to stdout.
-
-.SH OPTIONS
-
-Any command line option will cause the program to write its
-documentation to standard out.
-
-.SH ENVIRONMENT
-
-The environment variables are in the documention written to standard
-out given any command line option.
-
-.SH SEE ALSO
-.BR WWW.FLAM3.COM,
-.BR electricsheep (1),
-
-.SH AUTHOR
-spot aka Scott Draves, Erik Reckase
diff --git a/flam3.c b/flam3.c
index c8f43ce..64d04c5 100644
--- a/flam3.c
+++ b/flam3.c
@@ -2361,7 +2361,7 @@ void add_to_action(char *action, char *addtoaction) {
}
-void flam3_cross(flam3_genome *cp0, flam3_genome *cp1, flam3_genome *out, int cross_mode, randctx *rc, char *action) {
+void flam3_cross(flam3_genome *cp0, flam3_genome *cp1, flam3_genome *out, int cross_mode, randctx *rc) {
int i,j, rb;
char ministr[10];
@@ -2409,7 +2409,6 @@ void flam3_cross(flam3_genome *cp0, flam3_genome *cp1, flam3_genome *out, int cr
out->final_xform_index = out->num_xforms-1;
}
- add_to_action(action,"cross union");
} else if (cross_mode == CROSS_INTERPOLATE) {
@@ -2434,8 +2433,6 @@ void flam3_cross(flam3_genome *cp0, flam3_genome *cp1, flam3_genome *out, int cr
sprintf(ministr,"%7.5g",t);
- add_to_action(action,"cross interpolate ");
- add_to_action(action,ministr);
} else {
@@ -2506,9 +2503,6 @@ void flam3_cross(flam3_genome *cp0, flam3_genome *cp1, flam3_genome *out, int cr
} while ((i > 1) && !(got0 && got1));
- add_to_action(action,"cross alternate ");
- add_to_action(action,trystr);
-
free(trystr);
}
@@ -2524,16 +2518,13 @@ void flam3_cross(flam3_genome *cp0, flam3_genome *cp1, flam3_genome *out, int cr
int startParent=rand_bool(rc);
int ci;
- add_to_action(action," cmap_cross");
sprintf(ministr," %d:",startParent);
- add_to_action(action,ministr);
/* Loop over the entries, switching to the other parent 1% of the time */
for (ci=0;ci<256;ci++) {
if (rand_d01(rc)<.01) {
startParent = 1-startParent;
sprintf(ministr," %d",ci);
- add_to_action(action,ministr);
}
out->palette[ci] = startParent ? cp1->palette[ci]: cp0->palette[ci];
@@ -2542,7 +2533,7 @@ void flam3_cross(flam3_genome *cp0, flam3_genome *cp1, flam3_genome *out, int cr
}
-void flam3_mutate(flam3_genome *cp, int mutate_mode, int *ivars, int ivars_n, int sym, double speed, randctx *rc, char *action) {
+void flam3_mutate(flam3_genome *cp, int mutate_mode, int *ivars, int ivars_n, int sym, double speed, randctx *rc) {
double randselect;
flam3_genome mutation;
@@ -2575,7 +2566,6 @@ void flam3_mutate(flam3_genome *cp, int mutate_mode, int *ivars, int ivars_n, in
if (mutate_mode == MUTATE_ALL_VARIATIONS) {
- add_to_action(action,"mutate all variations");
do {
/* Create a random flame, and use the variations */
@@ -2607,9 +2597,7 @@ void flam3_mutate(flam3_genome *cp, int mutate_mode, int *ivars, int ivars_n, in
/* Which xform do we mutate? */
modxf = rand_mod(rc, cp->num_xforms);
- add_to_action(action,"mutate xform ");
sprintf(ministr,"%d coefs",modxf);
- add_to_action(action,ministr);
/* if less than 3 xforms, then change only the translation part */
if (2 >= cp->num_xforms) {
@@ -2623,7 +2611,6 @@ void flam3_mutate(flam3_genome *cp, int mutate_mode, int *ivars, int ivars_n, in
} else if (mutate_mode == MUTATE_ADD_SYMMETRY) {
- add_to_action(action,"mutate symmetry");
flam3_add_symmetry(cp, 0, rc);
} else if (mutate_mode == MUTATE_POST_XFORMS) {
@@ -2632,8 +2619,6 @@ void flam3_mutate(flam3_genome *cp, int mutate_mode, int *ivars, int ivars_n, in
int same = rand_mod(rc, 4); /* 25% chance of using the same post for all of them */
sprintf(ministr,"(%d%s)",b,(same>0) ? " same" : "");
- add_to_action(action,"mutate post xforms ");
- add_to_action(action,ministr);
for (i = 0; i < cp->num_xforms; i++) {
int copy = (i > 0) && same;
@@ -2718,20 +2703,17 @@ void flam3_mutate(flam3_genome *cp, int mutate_mode, int *ivars, int ivars_n, in
if (s < 0.4) { /* randomize xform color coords */
flam3_improve_colors(cp, 100, 0, 10, rc);
- add_to_action(action,"mutate color coords");
} else if (s < 0.8) { /* randomize xform color coords and palette */
flam3_improve_colors(cp, 25, 1, 10, rc);
- add_to_action(action,"mutate color all");
} else { /* randomize palette only */
cp->palette_index = flam3_get_palette(flam3_palette_random, cp->palette, cp->hue_rotation, rc);
/* if our palette retrieval fails, skip the mutation */
- if (cp->palette_index >= 0)
- add_to_action(action,"mutate color palette");
- else
+ if (cp->palette_index >= 0) {
+ } else
fprintf(stderr,"failure getting random palette, palette set to white\n");
}
@@ -2739,8 +2721,6 @@ void flam3_mutate(flam3_genome *cp, int mutate_mode, int *ivars, int ivars_n, in
int nx = rand_mod(rc, cp->num_xforms);
sprintf(ministr,"%d",nx);
- add_to_action(action,"mutate delete xform ");
- add_to_action(action,ministr);
if (cp->num_xforms > 1)
flam3_delete_xform(cp,nx);
@@ -2748,7 +2728,6 @@ void flam3_mutate(flam3_genome *cp, int mutate_mode, int *ivars, int ivars_n, in
} else { /* MUTATE_ALL_COEFS */
int x;
- add_to_action(action,"mutate all coefs");
flam3_random(&mutation, ivars, ivars_n, sym, cp->num_xforms, rc);
/* change all the coefs by a fraction of the random */
diff --git a/flam3.h b/flam3.h
index a92c203..5fe28f9 100644
--- a/flam3.h
+++ b/flam3.h
@@ -559,8 +559,8 @@ void flam3_random(flam3_genome *cp, int *ivars, int ivars_n, int sym, int spec_x
void add_to_action(char *action, char *addtoaction);
-void flam3_mutate(flam3_genome *cp, int mutate_mode, int *ivars, int ivars_n, int sym, double speed, randctx *rc, char *action);
-void flam3_cross(flam3_genome *cp0, flam3_genome *cp1, flam3_genome *out, int cross_mode, randctx *rc, char *action);
+void flam3_mutate(flam3_genome *cp, int mutate_mode, int *ivars, int ivars_n, int sym, double speed, randctx *rc);
+void flam3_cross(flam3_genome *cp0, flam3_genome *cp1, flam3_genome *out, int cross_mode, randctx *rc);
/* return NULL in case of error */
flam3_genome *flam3_parse_xml2(char *s, char *fn, int default_flag, int *ncps, randctx * const);
@@ -587,7 +587,6 @@ typedef struct {
flam3_genome *genomes;
int ngenomes;
int verbose;
- int bits;
int bytes_per_channel;
int earlyclip;
double time;
diff --git a/main.c b/main.c
new file mode 100644
index 0000000..72c147b
--- /dev/null
+++ b/main.c
@@ -0,0 +1,434 @@
+/*
+ FLAM3 - cosmic recursive fractal flames
+ Copyright (C) 1992-2009 Spotworks LLC
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <assert.h>
+#include <string.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <argp.h>
+
+#include "random.h"
+#include "private.h"
+#include "img.h"
+
+#define streq(a,b) (strcmp (a, b) == 0)
+
+const char *argp_program_version =
+ "vlam3-pre";
+
+typedef struct {
+ bool verbose;
+ unsigned int threads, bpc, quality;
+ float scale;
+ bool transparent;
+} render_arguments;
+
+static error_t parse_render_opt (int key, char *arg,
+ struct argp_state * const state) {
+ render_arguments * const arguments = state->input;
+ switch (key) {
+ case 'b': {
+ int i = atoi (arg);
+ if (i == 8 || i == 16) {
+ arguments->bpc = i;
+ } else {
+ argp_error (state, "Bits per channel must be 8 or 16");
+ }
+ break;
+ }
+
+ case 'q': {
+ int i = atoi (arg);
+ if (i < 1) {
+ argp_error (state, "Quality must be >= 1");
+ } else {
+ arguments->quality = i;
+ }
+ break;
+ }
+
+ case 's':
+ arguments->scale = atof (arg);
+ if (arguments->scale <= 0.0) {
+ argp_error (state, "Scale must be >= 0");
+ }
+ break;
+
+ case 't': {
+ int i = atoi (arg);
+ if (i <= 0) {
+ argp_error (state, "Threads must be >= 0");
+ } else {
+ arguments->threads = i;
+ }
+ break;
+ }
+
+ case ARGP_KEY_ARG:
+ if (state->arg_num > 0) {
+ return ARGP_ERR_UNKNOWN;
+ }
+ break;
+
+ case ARGP_KEY_END:
+ break;
+
+ default:
+ return ARGP_ERR_UNKNOWN;
+ break;
+ }
+ return 0;
+}
+
+static void do_render (const render_arguments * const arguments) {
+ randctx rc;
+
+ rand_seed(&rc);
+
+ int ncps;
+ flam3_genome * const cps = flam3_parse_from_file (stdin, NULL,
+ flam3_defaults_on, &ncps, &rc);
+ if (cps == NULL) {
+ fprintf(stderr,"error reading genomes from file\n");
+ exit(1);
+ }
+ assert (ncps == 1);
+
+ flam3_genome * const genome = &cps[0];
+
+ /* Force ntemporal_samples to 1 for -render */
+ genome->ntemporal_samples = 1;
+ genome->sample_density = arguments->quality;
+ genome->height *= arguments->scale;
+ genome->width *= arguments->scale;
+ genome->pixels_per_unit *= arguments->scale;
+
+ flam3_frame f;
+ f.genomes = genome;
+ f.ngenomes = 1;
+ f.verbose = arguments->verbose;
+ f.time = 0.0;
+ f.pixel_aspect_ratio = 1.0;
+ f.progress = 0;
+ f.nthreads = arguments->threads;
+ f.earlyclip = 0;
+ f.sub_batch_size = 10000;
+ f.bytes_per_channel = arguments->bpc / 8;
+
+ const unsigned int channels = 4;
+ const size_t this_size = channels * genome->width * genome->height *
+ f.bytes_per_channel;
+ void *image = (void *) calloc(this_size, sizeof(char));
+
+ stat_struct stats;
+ if (flam3_render (&f, image, flam3_field_both, channels,
+ arguments->transparent, &stats)) {
+ fprintf(stderr,"error rendering image: aborting.\n");
+ exit(1);
+ }
+
+ flam3_img_comments fpc;
+ write_png (stdout, image, genome->width, genome->height, &fpc,
+ f.bytes_per_channel);
+}
+
+typedef struct {
+ int symmetry;
+ const char *palette;
+} random_arguments;
+
+static void do_random (const random_arguments * const arguments) {
+ randctx rc;
+ rand_seed(&rc);
+
+ flam3_genome genome = { .edits = NULL };
+ int ivars = flam3_variation_random;
+ flam3_random (&genome, &ivars, 1, arguments->symmetry, 0, &rc);
+
+ flam3_print (stdout, &genome, NULL, flam3_dont_print_edits);
+ fflush(stdout);
+}
+
+typedef struct {
+ int method;
+ unsigned int symmetry;
+} mutate_arguments;
+
+static error_t parse_mutate_opt (int key, char *arg,
+ struct argp_state * const state) {
+ mutate_arguments * const arguments = state->input;
+ switch (key) {
+ case 'm':
+ if (arg == NULL) {
+ arguments->method = MUTATE_NOT_SPECIFIED;
+ } else if (streq (arg, "all-vars")) {
+ arguments->method = MUTATE_ALL_VARIATIONS;
+ } else if (streq(arg,"one-xform")) {
+ arguments->method = MUTATE_ONE_XFORM_COEFS;
+ } else if (streq(arg,"add-symmetry")) {
+ arguments->method = MUTATE_ADD_SYMMETRY;
+ } else if (streq(arg,"post-xforms")) {
+ arguments->method = MUTATE_POST_XFORMS;
+ } else if (streq(arg,"color-palette")) {
+ arguments->method = MUTATE_COLOR_PALETTE;
+ } else if (streq(arg,"delete-xform")) {
+ arguments->method = MUTATE_DELETE_XFORM;
+ } else if (streq(arg,"all-coefs")) {
+ arguments->method = MUTATE_ALL_COEFS;
+ } else {
+ argp_error (state, "Unknown method %s", arg);
+ }
+ break;
+
+ case ARGP_KEY_ARG:
+ if (state->arg_num > 0) {
+ return ARGP_ERR_UNKNOWN;
+ }
+ break;
+
+ case ARGP_KEY_END:
+ break;
+
+ default:
+ return ARGP_ERR_UNKNOWN;
+ break;
+ }
+
+ return 0;
+}
+
+static void do_mutate (const mutate_arguments * const arguments) {
+ randctx rc;
+
+ rand_seed(&rc);
+
+ int ncps;
+ flam3_genome * const cps = flam3_parse_from_file (stdin, NULL,
+ flam3_defaults_on, &ncps, &rc);
+ if (cps == NULL) {
+ fprintf(stderr,"error reading genomes from file\n");
+ exit(1);
+ }
+ assert (ncps == 1);
+
+ flam3_genome * const genome = &cps[0];
+
+ int ivars = flam3_variation_random;
+ const double speed = 1.0;
+ flam3_mutate (genome, arguments->method, &ivars, 1, arguments->symmetry,
+ speed, &rc);
+
+ printf("<pick version=\"FLAM3-%s\">\n", flam3_version());
+ flam3_print (stdout, genome, NULL, flam3_dont_print_edits);
+ printf("</pick>\n");
+ fflush(stdout);
+}
+
+typedef struct {
+ int method;
+} cross_arguments;
+
+static error_t parse_cross_opt (int key, char *arg,
+ struct argp_state * const state) {
+ mutate_arguments * const arguments = state->input;
+ switch (key) {
+ case 'm':
+ if (arg == NULL) {
+ arguments->method = CROSS_NOT_SPECIFIED;
+ } else if (streq(arg,"union")) {
+ arguments->method = CROSS_UNION;
+ } else if (streq(arg,"interpolate")) {
+ arguments->method = CROSS_INTERPOLATE;
+ } else if (streq(arg,"alternate")) {
+ arguments->method = CROSS_ALTERNATE;
+ } else {
+ argp_error (state, "Unknown method %s", arg);
+ }
+ break;
+
+ case ARGP_KEY_ARG:
+ if (state->arg_num > 0) {
+ return ARGP_ERR_UNKNOWN;
+ }
+ break;
+
+ case ARGP_KEY_END:
+ break;
+
+ default:
+ return ARGP_ERR_UNKNOWN;
+ break;
+ }
+
+ return 0;
+}
+
+static void do_cross (const cross_arguments * const arguments) {
+ randctx rc;
+
+ rand_seed(&rc);
+
+ int ncps;
+ flam3_genome * const cps = flam3_parse_from_file (stdin, NULL,
+ flam3_defaults_on, &ncps, &rc);
+ if (cps == NULL) {
+ fprintf(stderr,"error reading genomes from file\n");
+ exit(1);
+ }
+ assert (ncps == 2);
+
+ flam3_genome * const genome_a = &cps[0], * const genome_b = &cps[1];
+ flam3_genome genome_out;
+
+ flam3_cross (genome_a, genome_b, &genome_out, arguments->method, &rc);
+
+ printf("<pick version=\"FLAM3-%s\">\n", flam3_version());
+ flam3_print (stdout, &genome_out, NULL, flam3_dont_print_edits);
+ printf("</pick>\n");
+ fflush(stdout);
+}
+
+#if 0
+static void do_improvecolors () {
+ flam3_improve_colors(&cp_orig, 100, 0, 10, &rc);
+}
+
+static void do_interpolate () {
+ for (ftime = first_frame; ftime <= last_frame; ftime += 1) {
+ iscp=0;
+ for (i=0;i<ncp;i++) {
+ if ( ftime==cp[i].time ) {
+ flam3_copy(&interpolated, &(cp[i]) );
+ iscp=1;
+ }
+ }
+ if (iscp==0) {
+ flam3_interpolate(cp, ncp, (double)ftime, stagger, &interpolated);
+ for (i=0;i<ncp;i++) {
+ if ( ftime==cp[i].time-1 ) {
+ iscp=1;
+ }
+ }
+ if (iscp==0)
+ interpolated.interpolation_type = flam3_inttype_linear;
+ }
+
+ if (templ) flam3_apply_template(&interpolated, templ);
+ gprint(&interpolated, 1);
+ }
+}
+#endif
+
+static void show_help (const char * const argv0) {
+ const char *progname = strrchr (argv0, (int) '/');
+ if (progname == NULL) {
+ progname = argv0;
+ } else {
+ ++progname;
+ }
+ fprintf (stderr,
+ "Usage: %s cross [OPTION...]\n"
+ " Or: %s mutate [OPTION...]\n"
+ " Or: %s random [OPTION...]\n"
+ " Or: %s render [OPTION...]\n",
+ progname, progname, progname, progname);
+}
+
+int main (int argc, char **argv) {
+ if (argc < 2) {
+ show_help (argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ const char * const command = argv[1];
+
+ if (streq (command, "cross")) {
+ const struct argp_option options[] = {
+ {"method", 'm', "XXX", OPTION_ARG_OPTIONAL, "Cross method" },
+ { 0 },
+ };
+ const char doc[] = "vlame3-cross -- a fractal flame renderer";
+ const struct argp argp = {
+ .options = options, .parser = parse_cross_opt,
+ .args_doc = NULL, .doc = doc, .children = NULL
+ };
+
+ cross_arguments arguments = {
+ .method = CROSS_NOT_SPECIFIED,
+ };
+
+ argp_parse (&argp, argc, argv, 0, NULL, &arguments);
+ do_cross (&arguments);
+ } else if (streq (command, "mutate")) {
+ const struct argp_option options[] = {
+ {"method", 'm', "XXX", OPTION_ARG_OPTIONAL, "Mutation method" },
+ { 0 },
+ };
+ const char doc[] = "vlame3-mutate -- a fractal flame renderer";
+ const struct argp argp = {
+ .options = options, .parser = parse_mutate_opt,
+ .args_doc = NULL, .doc = doc, .children = NULL
+ };
+
+ mutate_arguments arguments = {
+ .method = MUTATE_NOT_SPECIFIED,
+ .symmetry = 0,
+ };
+
+ argp_parse (&argp, argc, argv, 0, NULL, &arguments);
+ do_mutate (&arguments);
+ } else if (streq (command, "random")) {
+ /* generate random genome */
+ random_arguments arguments = {
+ .symmetry = 0,
+ .palette = "flam3-palettes.xml",
+ };
+ do_random (&arguments);
+ } else if (streq (command, "render")) {
+ /* render flame to image file */
+ const struct argp_option options[] = {
+ {"threads", 't', "num", 0, "Number of threads (auto)" },
+ {"scale", 's', "factor", 0, "Scale image dimensions by factor (1.0)" },
+ {"bpc", 'b', "8|16", 0, "Bits per channel of output image (8)" },
+ {"quality", 'q', "num", 0, "Average samples per pixel (100)" },
+ { 0 },
+ };
+ const char doc[] = "vlame3-render -- a fractal flame renderer";
+ const struct argp argp = {
+ .options = options, .parser = parse_render_opt,
+ .args_doc = NULL, .doc = doc, .children = NULL
+ };
+
+ render_arguments arguments = {
+ .threads = flam3_count_nthreads(),
+ .bpc = 8,
+ .scale = 1.0,
+ .transparent = false,
+ .quality = 100,
+ };
+
+ argp_parse (&argp, argc, argv, 0, NULL, &arguments);
+ do_render (&arguments);
+ } else {
+ show_help (argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ return EXIT_SUCCESS;
+}
+
diff --git a/palettes.c b/palettes.c
index 980a465..dd7f14a 100644
--- a/palettes.c
+++ b/palettes.c
@@ -376,7 +376,6 @@ static double try_colors(flam3_genome *g, int color_resolution) {
g->ntemporal_samples = 1;
// f.temporal_filter_radius = 0.0;
- f.bits = 33;
f.bytes_per_channel=1;
f.verbose = 0;
f.genomes = g;
diff --git a/png.c b/png.c
index ced86ad..99a80ef 100644
--- a/png.c
+++ b/png.c
@@ -95,8 +95,10 @@ void write_png(FILE *file, void *image, int width, int height, flam3_img_comment
PNG_COMPRESSION_TYPE_BASE,
PNG_FILTER_TYPE_BASE);
+#if 0
if (pngcom_enable==1)
png_set_text(png_ptr, info_ptr, text, FLAM3_PNG_COM);
+#endif
png_write_info(png_ptr, info_ptr);
diff --git a/private.h b/private.h
index ae026f5..3e5a9b3 100644
--- a/private.h
+++ b/private.h
@@ -49,8 +49,6 @@
#define argf(s,d) ((ai = getenv(s)) ? atof(ai) : (d))
#define args(s,d) ((ai = getenv(s)) ? ai : (d))
-void docstring();
-
/* Structures for passing parameters to iteration threads */
typedef struct {
unsigned short *xform_distrib; /* Distribution of xforms based on weights */
diff --git a/test.flam3 b/test.flam3
deleted file mode 100644
index 62dcc79..0000000
--- a/test.flam3
+++ /dev/null
@@ -1,14 +0,0 @@
-<test>
-<flame time="0" palette="15" size="640 480" center="0 0" scale="240" zoom="0" oversample="1" filter="1" quality="10" background="0 0 0" brightness="4" gamma="4" vibrancy="1" hue="0.22851">
- <xform weight="0.25" color="1" spherical="1" coefs="-0.681206 -0.0779465 0.20769 0.755065 -0.0416126 -0.262334"/>
- <xform weight="0.25" color="0.66" spherical="1" coefs="0.953766 0.48396 0.43268 -0.0542476 0.642503 -0.995898"/>
- <xform weight="0.25" color="0.33" spherical="1" coefs="0.840613 -0.816191 0.318971 -0.430402 0.905589 0.909402"/>
- <xform weight="0.25" color="0" spherical="1" coefs="0.960492 -0.466555 0.215383 -0.727377 -0.126074 0.253509"/>
-</flame>
-<flame time="100" palette="29" size="640 480" center="0 0" scale="240" zoom="0" oversample="1" filter="1" quality="10" background="0 0 0" brightness="4" gamma="4" vibrancy="1" hue="0.147038">
- <xform weight="0.25" color="1" spherical="1" coefs="-0.357523 0.774667 0.397446 0.674359 -0.730708 0.812876"/>
- <xform weight="0.25" color="0.66" spherical="1" coefs="-0.69942 0.141688 -0.743472 0.475451 -0.336206 0.0958816"/>
- <xform weight="0.25" color="0.33" spherical="1" coefs="0.0738451 -0.349212 -0.635205 0.262572 -0.398985 -0.736904"/>
- <xform weight="0.25" color="0" spherical="1" coefs="0.992697 0.433488 -0.427202 -0.339112 -0.507145 0.120765"/>
-</flame>
-</test>
diff --git a/vidres.flam3 b/vidres.flam3
deleted file mode 100644
index 285b1ce..0000000
--- a/vidres.flam3
+++ /dev/null
@@ -1,12 +0,0 @@
-<flame size="640 480"
- center="0 0"
- scale="240"
- zoom="0"
- oversample="1"
- filter="1"
- quality="10"
- background="0 0 0"
- brightness="4"
- gamma="4"
- vibrancy="1"
-/>
diff --git a/wscript b/wscript
index 8eb7748..40dc819 100644
--- a/wscript
+++ b/wscript
@@ -19,8 +19,5 @@ def configure(conf):
conf.write_config_header ('config.h')
def build(bld):
- bld.stlib (features='c cstlib', source='flam3.c filters.c parser.c variations.c interpolation.c palettes.c png.c random.c docstring.c rect.c', target='libflam3', use='xml2 png pthread', includes='.')
- bld.program (features='c cprogram', source='flam3-render.c', target='flam3-render', use='libflam3 xml2 png amdlibm pthread', includes='.')
- bld.program (features='c cprogram', source='flam3-genome.c', target='flam3-genome', use='libflam3 xml2 png amdlibm pthread', includes='.')
- bld.program (features='c cprogram', source='flam3-animate.c', target='flam3-animate', use='libflam3 xml2 png amdlibm pthread', includes='.')
+ bld.program (features='c cprogram', source='flam3.c filters.c parser.c variations.c interpolation.c palettes.c png.c random.c rect.c main.c', target='vlam3', use='xml2 png amdlibm pthread', includes='.')