This is a set of Python scripts for various transformations (flows) of 2D and 3D objects in Rhinoceros 5, a popular 3D modeler.
- code/: The actual Rhino Python scripts.
- curves/: Flow implementations for 2D curves.
- meshes/: Flow implementations for 3D meshes.
- utils/: Various helper methods.
- shapes/: Simple shapes that can be used for testing.
- curves/: 2D curves: a basic polyline, a rectangle etc.
- meshes/: 3D meshes: a cube, a dipyramid, a sphere etc.
The code to be executed in Rhinoceros should go to code/launcher.py. To launch it:
- Load the shape you want to transform (curve/mesh) to Rhinoceros
- Type "EditPythonScript" in the command prompt of Rhinoceros
- Load & run the Python module code/launcher.py
- Click on the shape loaded to the Rhinoceros editor to apply the corresponding transformation to it.
Here is how harmonic flows and face flows of a cube, a dipyramid, and a sphere look like. The harmonic flows are presented on the left while face flows are on the right:
Harmonic flow | Face flow |
---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
- Pillow (PIL): required for the flow animation export to GIF in the flow_utils.iterate() function. In case this package is missing, the code will not fail but no GIF files will be produced.
This repository has been inspired by the course "Discrete Differential Geometry", taught by Pascal Romon at Université Paris-Est Marne-la-Vallée in the Fall 2015.
The scripts have been developed and tested on Rhinoceros 5 for Windows, so there may be some issues with running the same code on Rhinoceros 5 for Mac. You are welcome to report any of them here.