generativepy versions

By Martin McBride, 2023-05-15

The latest released version on generative can be found on the Python Package Index (PyPI).

The version available on github will often have extra features that aren't yet in the release.

The documentation on this site will usually match the code on github. This means it should basically match what is on PyPI, but it might cover new features that haven't been released yet.

Version history

Latest on github

v24.4 - May 2024 - current PyPI version

  • Most shapes can now optionally accept FillParameters and StrokeParameters to control fill and stroke styles. This makes it easier to share styles amongst different objects.
  • Add scatter plots, including stalk and connected styles.
  • Add a basic Vector3 implementation to math module.
  • New Markers class to rationalise line markers (ticks, paraticks, parallel markers), adding new markers and allowing position to be controlled.
  • New overlay_nparrays function in nparray module allows two images to be overlaid, treating pure white as transparent.
  • Add 3D charts (z against xy) using povray. Also added complex module to genpygoodies to help with plotting complex graphs
  • Add povray module with capability of drawing 3D shapes using vapory module.
  • Plot now has a close parameter that creates a polygon area based on a section of the curve that can then be filled. This can be the area under the curve, or above the curve, or any area created be extending the curve with additional points.
  • Update docstrings of all modules to support autogenerated documentation on generativepy.com

V23.11 - 2 Dec 2023

  • Switched to date based versioning
  • Add parametric plots to the graph module
  • Allow The Turtle class to accept a list of colours, and cycle through the list as the turtle draws a path.
  • Update geometry.Transform class to use generativepy matrix order rather than PyCairo matrix order.
  • Add unit matrix to math module

v4.0 - 12 May 2023

3D drawing is likely to change in a future release. The rest of the library is reasonably stable.

  • Allow images to be preloaded for Image objects, to avoid frequent file reloads when creating animations.
  • Add shapes2d module representing abstract shapes.
  • Add math module with 2D vector and matrix classes.
  • Add ORANGE, CYAN to ArtisticColorScheme.
  • Add table module for table layouts.
  • MINOR BREAKING CHANGE - Extra warning if some scenes don't have audio (behaviour change if not all audio present).
  • BREAKING CHANGE - Tween use absolute time and a global frame rate. New methods wait_d and to_d for relative times.
  • BREAKING CHANGE - Remove count for Tween set method. This didn't work well with absolute times. Use set followed by wait or wait_d to set and hold a value.
  • BREAKING CHANGE - Improve geometry3d.
  • Fix colour depth problem in geometry3d (previously r, g, b values were forced to either 0% to 100%)
  • Allow special formatting of graph tick text labels
  • Allow tick label positions to be controlled in graph Axes.
  • Allow extra Latex packages to be specified in formulas module.
  • Fix bug in formulas module when function could hang if Latex formula was incorrect.

v3.2 - 05 Jun 2022

  • New Color properties light1, light2, light3, dark1, dark2, dark3, that creater lighter or darker versions of the base colour.
  • New RegularPolygon shape for drawing regular polygons.
  • New colour schemes for creating reusuable colour sets.

v3.1 - 27 Apr 2022

  • New formulas module converts latex formulas to bitmap that can be used with the Image class.
  • New MovieBuilder class allows movies to be created from multiple scenes, with option to add audio files.
  • MINOR BREAKING CHANGE - Plot no longer automatically clips to axes, requires explicit axes.clip().
  • Make right angle marker slightly bigger to match normal angle markers.
  • Change angle, tick and parallel markers to be implemented as Shapes.
  • Add text style (size and font) to Axes in the graph module.
  • Started updating/extending tutorials on github to match the PythonInformer generativepy tutorial. The current examples folder will be deprecated.
  • Clarify that default fill rule for Shape objects is WINDING (documentation change).
  • Add Transform class for transforming user space.

v3.0 - 6 Nov 2021

  • Text object has new get_size and get_metrics methods.
  • MINOR BREAKING CHANGE - color parameter renamed to pattern in geometry elements. Existing functionality still works, but parameter name has changed.
  • New Pattern and LinearGradientclasses to support gradients (and later, image fills etc).
  • New FillParameters, StrokeParameters, and FontParameters classes to unify handling of appearance across library.
  • Support bold and italic text styles.
  • BREAKING CHANGE - Axes class rewritten. Rationalised support for scaling.
  • BREAKING CHANGE - Graph plots now handled by a Plot object that is implemented as a Shape.
  • Axes now support subdivisions and allow control of stroke, fill, text parameters of all graph elements.

v2.5 - 5 Jun 2021

  • New analytics module to display histogram and stats for frames.
  • Extra nparray functions for creating data arrays.
  • Add a simple turtle implementation to geometry module.
  • Add simple shader and shapes to geometry3d module.
  • Add out parameter to nparray.make_nparray_frame function.
  • Support for segments, rays and full lines in Line objects.
  • Fix bug with greyscale nparray images.
  • Make background colour transparent by default for RGBA bitmaps.
  • Improve appearance of axes in graphing module.
  • Improve coverage of unit tests and image tests.

v2.4 - 7 Mar 2021

  • 3D drawing module using moderngl.
  • Additional graph styling methods.
  • Add text offset method.
  • Add Image class to render images in drawing module.
  • Add easing support to tween module.
  • Add pad function Tween class.
  • Colormap improvements
  • New nparray module allows bitmap images to be created using numpy arrays.
  • Added frame creation functions to drawing and bitmap modules.
  • New utils module.

v2.3 - 17 Nov 2020n

  • Add bitmap module.
  • Add gif module.
  • Add pixel scaling parameter for graph plots.
  • Add line and fill styles to Shape objects.
  • Implement subpath and extend for creating complex paths.
  • Add bezier curves.
  • Add path method to store a path for later use, and Path object to redraw a path.
  • Add clipping support.
  • Add Color nethods to convert colours to byte arrays.
  • Add colormap support.

v2.2 - 27 Aug 2020

  • Add line, polygon, circle, square, triangle, ellipse objects.
  • Add angle marker, tick, paratick, arrowhead decorators.
  • More code examples.
  • Additional documentation on this site.
  • Add offset method to Text class
  • Minor breaking change - rectangles now use a single tuple parameter (x, y) to set the corner position, rather than separate x, y parameters. This is for consistency with other drawing objects.

v2.1 - 1 Aug 2020

  • Fix a few naming inconsistencies, for example using camelCase rather than snake_case. These have been tidied up to improve things moving forward.
  • Add Geometry module for drawing shapes.
  • These break v2.0 code slightly.

v2.0 - 26 July 2020

  • Use native Pycairo calls to draw, which adds a lot of new capabilities compared to V1.x. This is a major change that will require changes to any code based on v1.x.
  • Color module also has new features for modifying colours.

V1.x

Older versions used a different drawing model, wrapping the underlying Pycairo calls to emulate Processing.

This seemed like a good idea at the time, but created a lot of extra work for relatively little benefit, and ultimately made the drawing model less capable that it could be. Use a later version if you can.

Join the GraphicMaths Newletter

Sign up using this form to receive an email when new content is added:

Popular tags