libvisualid (0.3.0~prerelease) unstable; urgency=low * Changed license from GPL-3 to LGPL-3+. * Added liblevenshtein, a modular library for computing levenshtein distances. * src/line.c, src/line.h: - Renamed member `ec1' to `head', `c1_scale' to `head_scale', `ec2' to `tail', `c2_scale' to `tail_scale', `c3' to `rib', `c3_scale' to `rib_scale', `c3_taper' to `rib_taper', `c3_scale' to `rib_scale', `c3_increase' to `rib_increase', `c3_doublesided' to `rib_doublesided', `c3_angle' to `rib_angle', `n' to `rib_count', and `len' to `length'. - Removed gen_line(). - Split child-spawning from line_constructed() into line_extend(). * src/line.c (line_constructed): don't bother checking recursion_level against recursion_max, since visualid_glyph_spawn() does that; this leaves recursion_max unreferenced outside of visualid_glyph_spawn(). * src/random.c, src/random.h: - Moved to a new subordinate library, libvirand. - Removed rnd() and rndin(), replacing their invocations with calls to glib's g_random_double() and g_random_double_range(), respectively. (rndprob): - Inverted the meaning of the parameter so that it's actually a probability rather than a threshold, and so that the definition of rndprob_level() makes sense. The "greater than" wording in the essay was almost certainly a mistake. - Renamed to `virand_prob'. (rnd11): Dissolved, since it was both trivial and invoked in only one place. (rndin_level): Moved to metashape.c, as it is used nowhere else. (rndprob_level): - Restructured for clarity. - Renamed to `virand_prob_reduced'. (rndin_lowbias): - Reframed in terms of `base', `limit', and `bias_expt' (rather than `low', `high', and `rnd_power'). - Renamed to `virand_range_biased'. (rational): Renamed to `virand_rational'. * src/main.c: - Removed genconf.bottom; we know that a value is >= the bottom of a range if it's not <= the top end of any lower range. - Simplified genconf range-membership checks, using "<" rather than "<=". - Removed genconf.top, because we can track that as a running total. - If user-specified constraints eliminate all possible glyph-types, just fail instead of reverting to default constraints. - Removed generator_config struct-type, array, and associated loops; just reconfigure the active VisualID_Generator and defer to it. * src/main.c, src/graphics.c: Rather than casting g_random_double_range() to int, just use g_random_int_range(). * src/virand/generator.c, src/virand/generator.h: - New VirandGenerator GObject-class, a generic weighted pseudorandom generator of discrete values. * src/generator.c, src/generator.h: - Added new VisualID_Generator class to libvisualid. - visualid_glyph_new() now takes a VisualID_Generator object in argument; visualid_glyph_new() is no longer the same as visualid_glyph_spawn(NULL, NULL). * Split libvisualid, virand, and levenshtein into separate top-level directories/modules: - src/virand/ => virand/ - src/levenshtein/ => levenshtein/ - src/ => libvisualid/ * Install libvisualid's headers into ${prefix}/libvisualid rather than ${prefix}/VisualIDs, and install headers specific to glyph-classes into ${prefix}/libvisualid/glyphs rather than ${prefix}/VisualIDs/generators. * Removed the 0.1.x-compatible `struct generator' aliases for glyph-classes; it would be especially confusing now where that word is being used for something else. * Propagate recursion-level from parent- to child-glyph by default rather than *requiring* it to be passed-in as a construction-parameter. * libvisualid/figure.c, libvisualid/figure.h: removed gen_figure(). - Added figure_extend(). * libvisualid/path.c, libvisualid/path.h: removed gen_path(). * libvisualid/shape.c, libvisualid/shape.h: - Removed gen_shape(). - Split child-spawning from shape_constructed() into shape_extend(). * libvisualid/radial.c, libvisualid/radial.h: - Removed gen_radial(). - Split child-spawning from radial_constructed() into radial_extend(). * libvisualid/spiral.c, libvisualid/spiral.h: - Removed gen_spiral(). - Split child-spawning from spiral_constructed() into spiral_extend(). * libvisualid/symmetry.c, libvisualid/symmetry.h: - Removed gen_symmetry(). - Added symmetry_extend(). * libvisualid/metashape.c: Added metashape_extend(). * libvisualid/graphics.c, libvisualid/graphics.h, libvisualid/main.c: Removed the old-style `generator_fn' type, in favour of just using the newer GTypes. * virand/random.c, virand/random.h: Added a GLib `GRand' argument to all functions, making them re-entrant. * libvisualid/text.c, libvisualid/text.h: Removed; hash_filename() is no longer necessary, now that we can seed with filename directly via virand_set_seed_string(). And hash_filename() had portability issues, anyway. * libvisualid/graphics.c: use generator-local recursion_max and complexity_max values instead of global values. Removed the absolute upper bound on the VisualID_Glyph's "recursion-level" property, so that it is actually tunable via generators. * libvisualid/constants.c, libvisualid/constants.h: Removed; we no longer need a global recursion_max or complexity_max. * libvisualid/graphics.c: (visualid_glyph_new, visualid_glyph_spawn): Just use generators to select glyph-types rather than using type-arrays in rnd_pick_child() and rnd_pick_terminal(). (rnd_pick_child, rnd_pick_terminal): Removed. * graphics.c: Added visualid_glyph_extend(), called incrementally from visualid_new() to implement breath-first recursion. * graphics.h (VisualID_Glyph): added `extend' method. * Renamed function-types with safer names: - Renamed complexity_fn to visualid_complexity_fn. - Renamed producer_fn to visualid_render_fn; renamed VisualID_Glyph.produce to VisualID_Glyph.render. - Renamed mutator_fn to visualid_mutation_fn. * Removed superfluous assignment of NULL and 0 as default struct member-values: GObject initialises everything to 0/0.0/NULL by default. * main.c (main), editor.c (main): Don't filter input strings through a `basename' function at all, enabling use of non-filepath strings that happen to include path-separator characters; the onus of trimming paths to only the relevant part is now born by the caller, whether using the libvisualid API or shelling out to mkvisualid. -- Joshua Judson Rosen Wed, 15 Dec 2010 23:37:56 -0500 libvisualid (0.2.2~prerelease) unstable; urgency=low * src/symmetry.c (exec_symmetry): return immediately, without doing anything, if no child. -- Joshua Judson Rosen Tue, 09 Mar 2010 00:43:07 -0500 libvisualid (0.2.1) unstable; urgency=low * Prevent divide-by-zero when plotting the rib for line->n=1. * Fixed underestimation of the complexity that multiple `ribs' add to a `line' glyph. * All classes' constructed() methods chain up to their parent-class' method if it's implemented. * Actually *use* complexity_max to limit glyph-complexity. * src/text.h, src/constants.h: added missing #include-guards. * src/paths.h: made #include-guard consistent with the other headers'. * src/paths.c (visualid_base_for_file): - Remember to free intermediate strings. - Don't bother tracking the `best substring' in best_substr, because we ultimately do nothing with it. - Don't bother doing superfluous strdups and frees when we can just use the original string. - *Unconditionally* reset `line' and `linelen' at the end of each pass through the loop. (best_common_substr): - Correctly allocate and use the zero-column in the search-progress table, so we never wrap matches across rows. * src/editor.c (refresh_window): use new `glyph_width' and `glyph_height' variables to render glyphs with a fixed 1:1 aspect-ratio, scaled to fit the drawable region rather than stretched to fit. -- Joshua Judson Rosen Sun, 07 Feb 2010 14:16:46 -0500 libvisualid (0.2.0) unstable; urgency=low * Refactored generators using GObject: - configure.in: require GObject >= 2.0. - src/Makefile.am: include GOBJET_CFLAGS and GOBJECT_LIBS when building mkvisualid and libvisualid, and bump libtool version-info since this release breaks binary compatibility. - Renamed libvisualid0.1.1 debian package to libvisualid0.2, to allow co-existence with previous ABIs. - Defined VisualID_Glyph base-class (derived from GObject), and classes derived from VisualID_Glyph for each generator-function. Included GObject properties where most obviously appropriate. - Moved `produce' member from the instance-struct to the class-struct (now that there is a class-struct). - Moved logic from the generator (`gen_*') routines into GObject `constructed' methods; the generators now simply call g_object_new with appropriate object-class and constructor-parameters; added a `recursion_level' member to the base instance-struct (and a corresponding "recursion-level" GObject property to the base class), used to communicate recursion-level to the `constructed' methods. - src/main.c, src/graphics.c, src/graphics.h: renamed `gen' and `generator' variables to `glyph'. - src/graphics.c, src/graphics.h: added visualid_glyph_take_child() and visualid_glyph_unparent(). - Record a reference to the parent-glyph in the VisualID_Glyph structure. * src/main.c: - When disabling a generator with a probability-weight of zero, *don't* allow it to affect the range of randint-bins covered by successively-initialised gen_conf items. - Added an "--autocache-dir" option to mkvisualid, allowing the autocache-directory to be specified. - Allow simultaneous use of "--output" and "--autocache" options in mkvisualid by using a `glyph_file' variable in addition to `output_file', and a goto past the renderer (instead of premature exit()) to allow a pre-existing autocache-file to be linked into a new `output' location. - If the path specified via the "--output" option exists and is a directory, create a file in that directory named according to the input name. - Added a "--base-weight" option, to set the default weight for generators in the probability-set. * Added src/editor.c, src/editor.glade: a graphical editor/explorer application in GTK+ (rough draft); - src/Makefile.am: added `edit-visualid' program. - configure.ac: require GTK+ and libglade. - debian/control: Build-Depend on libglade2-dev. * src/Makefile.am: pass `-DPACKAGE_DATADIR' in CPPFLAGS. * src/paths.c, src/paths.h: - Added `VISUALID_DATADIR' string-constant, based on PACKAGE_DATADIR. - Added visualid_set_cachedir() to the API. * Added missing Build-Dependency on libpopt-dev (and a mention Popt in the README): src/main.c (mkvisualid) uses popt for option-parsing. * src/graphics.c, src/graphics.h: - Renamed generate_child() to visualid_glyph_new(). - Renamed exec_generator() to visualid_draw_path(). - Added visualid_glyph_complexity() for calculating glyph-complexity; along with a supporting `complexity_fn' typedef, a `complexity_fn' class-member in VisualID_GlyphClass, and a type-specific complexity-calculator function for every derived glyph-class. - Separated generation of root- and child-glyphs into visualid_glyph_new() and visualid_glyph_spawn(), respectively. - Include a "parent-attachment" property to VisualID_Glyph, that performs an appropriate g_object_set() on the parent-glyph. This fosters easy development of an automatic complexity-limiter. * Added an `attachment' parameter to all generator-functions, specifying the attribute on the parent-glyph where the child-glyph is being attached. * Pass recursion-level to glyph-generators/-constructors indirectly via a pointer to the parent-glyph. * src/constants.c, src/constants.h: Added automatic complexity-limiter; `complexity_max' defined as 5000 `strokes' in src/constants.c. * src/metashape.c (exec_metashape): - Corrected a bug stemming from incorrect expectations about how modulo should work with negative operands: the initial inside-child is now placed correctly. - Maintain a consistent number of segments, regardless of whether the shape is open (`Along a Path') or closed (`Around-a-Shape and Relaxed Inside'). - Renamed `exec_metashape()' to `visualid_metashape_exec()' and exposed it via src/metashape.h for consumption by src/shape.c and src/path.c. - (metashape_constructed): renamed `g' to `shape'. * src/spiral.c: - Actually include spiral->len segments in the spiral, - Install missing "centre-child" and "centre-scale" properties. rather than stopping one segment short of the end. - (spiral_constructed): renamed `g' to `spiral'. * src/line.c (line_constructed): renamed `g' to `line'. (line_set_property): missing case-break that made setting of rib-child fail. * src/figure.c (figure_constructed): renamed `g' to `figure'. * src/symmetry.c (symmetry_constructed): renamed `g' to `symmetry'. * src/radial.c (gen_radial), src/spiral.c (gen_spiral): renamed `recursion_level' to `level' for consistency with the rest of the codebase. -- Joshua Judson Rosen Sat, 07 Nov 2009 15:44:48 -0500 libvisualid (0.1.2) unstable; urgency=low * Fixed accidental coupling of symmetry- and spiral-generator weights in mkvisualid: "--symmetry" set weights for *both* symmetry *and* spiral generators, and "--spiral" effectively did nothing. * Decreased probability of child-glyphs being used in the along-a-path generator from 1 to .8, in accord with the table on page 10 of the VisualIDs essay. * Corrected #ifndef/#define double-#include guards in radial.h, figure.h, line.h, symmetry.h, and spiral.h. * Added missing "static" qualifier to exec_radial. * Made libvisualid-dev package require an exect version-match on the shlib package. * src/graphics.c (generate_child): enforce recursion_max by returning NULL if we're somehow already over the limit, which can happen as a result of generators specifically calling other non-terminal generators to produce child-glyphs (as in the case of Figure). -- Joshua Judson Rosen Sun, 28 Dec 2008 01:53:54 -0500 libvisualid (0.1.1) unstable; urgency=low * Build-Depend specifically on Cairo >= 1.4, dropped debhelper requirements from 6 to 5. * Removed duplicate "-s" short option from mkvisualid: keep "-s" for "--shape", use "-y" for "--symmetry". * Enabled spiral-generator in mkvisualid, and include a "--spiral" ("-i") option so that said generator's weight can be set from the command-line like all of the others. * Ensured that, by default, mkvisualid and the library routines both use identical algorithms for generating glyphs. * Since `Relaxed Inside' and `Shape' generators are functionally /identical/, removed Relaxed Inside (this seems to be a legitimate interpretation of what the essay is saying). * Removed `metashape_type' enum, and `type' member from metashape struct, because we can determine whether we're looking at a `shape' or a `path' just by the arclength. * Corrected (and simplified) implementation of vertex-child angle-cutoff in radial-generator. * Correctly use archlength of .7 radians for all `along-a-path' instances, in accord with the essay, rather than a random angle between 0 and .7. * Consistently use g_new rather than a combination of g_new and malloc. * Redefined "--linewidth" option as specifying only the inner line-width; added an "--outline-width" ("-O"), allowing line- and outline-width to be specified independently. * Improved `perfect fit' logic in visualid_draw() such that it actually makes glyphs fit perfectly onto the canvas, regardless of line-join/-cap styles. -- Joshua Judson Rosen Sat, 13 Dec 2008 00:22:54 -0500 libvisualid (0.1) unstable; urgency=low * Initial (alpha) release. -- Joshua Judson Rosen Mon, 30 Jun 2008 21:37:35 -0400