New py5 Release: 0.10.8a4

One final release before the year's end! The py5 version 0.10.8a4 is now live.

New Features

While at Python Brasil I taught a tutorial on 2D and 3D geometries with py5 with Alexandre Villares. While preparing for this tutorial I developed prototypes of new features for py5's Python Ecosystem Integrations with Trimesh and matplotlib. These features are now included in this release.

Trimesh Primitives

The new Trimesh feature is an improvement to how primitives are converted to Py5Shape objects. Previously every triangle in the mesh would have the edge lines drawn, much like how Processing renders 3D meshes. Now, when converting a Trimesh object to a Py5Shape object, the default will be to only draw the facet edges of the mesh. This results in a much cleaner look for 3D models that are intended to be rendered as wireframes. See the Trimesh integration documentation for details.

Matplotlib TextPath

The new matplotlib feature is a new supported object type for conversion to Py5Shape objects: TextPath. This allows you to leverage matplotlib's text rendering capabilities, including support for equations and LaTeX typography. See the matplotlib integration documentation for more information.

Version Updates

This py5 release includes the core jars from the latest Processing release, 4.4.10.

Bug Fixes and Small Improvements

There were also some bug fixes in this release:

  • One of the newer releases of Processing (4.4.10?) changed the default pixel density on high density displays to 2 but would issue a warning to notify you of the change. The warning perhaps is reasonable for PDE users but is super annoying when using py5 in a terminal or a Jupyter notebook. In py5, the warning will no longer appear.

  • #711 - The 2X scaling problem for the %%py5draw Jupyter magic on OSX has been fixed

  • The println() method now has a flush parameter that works like the flush parameter in Python's built-in print() function. When set to True, the output buffer is flushed immediately. This is useful when your print stream is writing to a file (enable this with the set_print_stream() method).

  • Users with Java 24 or 25 installed experience a weird warning message about enabling native access. Processing has the same issue - this is because of JVM changes in Java 24. This version of py5 enables native access so the warning message won't appear anymore. In addition, the JavaFX renderer needed an additional fix to avoid a similar warning message. However, note that right now py5 plus JavaFX seems to have some other strange and fatal problem on my Linux machine when using Java 25. If use JavaFX and Java 25, please let me know either way if it works for you.

  • There were also some small improvements to the documentation, particularly the documentation about color

What's Ahead

I'm on vacation to New Zealand for most of January. During this time I will be mostly offline and not working on py5. I'll take lots of photos and return refreshed and ready to continue working on py5 in February.

Happy coding!

Comments