As part of an experimental game project I’ve been trying to use the Functy rendering routines to visualise network structures. At the moment it’s at a very early stage, but has - I think - already generated some interesting results.
The screenshot below shows a network of 60 nodes, each one rendered as a spherical co-ordinate function, joined together using links rendered as curves. I just plucked some simple functions out of the air to see what the results would be like but am hoping to extend it with more interesting shapes as things progress.
The various parts of the network are a little hard to discern with a static image, but when I tried to capture a video the result was a mess of fuzzy artefacts (I think there must be something going wrong with my screen capture software), so I gave up on that.
The next step, after neatening up the code, is to arrange better animation of the nodes and links, with dynamic movement based on things like the forces between the nodes. I’m hoping this will produce some really nice effects, and if anything comes of it I’ll put a bit more effort into getting a successful video capture.
In an earlier post I talked about Sederberg et al.’s paper that uses Elimination Theory to demonstrate how parametric curves can be represented in implicit form. Reading through the literature it quickly becomes clear that this is important work if you’re interested in rendering parametric curves or surfaces. Unfortunately it can be difficult to get to grips with the theory without also being able to play around with the functions themselves. Consequently I’d expected to spend much of my summer writing software to render the different types of curves for exploring them and play around with their different representations.
That was, until I realised Functy was quite capable of doing it already. Functy’s parametric curves are already perfectly suited to the rendering of parametric equations. This part might be obvious. Less obvious for me was that the colouring of a flat Cartesian surface is perfect for the rendering of the implicit form.
Above are a couple of screenshots showing the two types of function. These are both taken from the example in another paper by Sederberg, Anderson and Goldman about “Implicitization, Inversion, and Intersection of Planar Rational Cubic Curves” (available from ScienceDirect). The curve is a quartic monoid which can be expressed parametrically and implicitly as follows.
(x4 - 2x3y + 3x2y2 - xy3 +y4) + (2x3 - x2y + xy2 + 3y3) = 0
x = - (3t3 + t2 - t + 2) / (t4 - t3 + 3t2 - 2t + 1)
y = - (3t4 + t3 - t2 + 2t) / (t4 - t3 + 3t2 - 2t + 1)
In the screenshots the red line is the parametric version of the curve for t in the interval (0, 1). The other colours on the surface represent the values of the implicit function. Note that the implicit function actually lies at the boundary of the yellow and blue areas. You can see this slightly better in the 3D version, where the height represents the value of the implicit function. The actual curve occurs only where this is zero - in other words where the surface cuts through the plane z = 0.
It was reassuring to see that the parametric curve matches the implicit version. It’s also interesting to note that the implicit version is rendered entirely using the shaders in a resolution-independent way. It’s possible to zoom in as much as you like without getting pixelisation. This is exciting for me since, although it’s not what I’m really trying to achieve (that would be too easy!), it hints at the possibility.
I received my monthly copy of Linux Format today and was excited to see Functy featuring in this month’s LXF Hot Picks section. The section covers the latest new Linux software releases, and has a really great description of Functy which, I think, captures the goals of the software perfectly (even if it’s not always able to deliver as I’d like).
The section also lists a bundle of other great open source software to check out, including MusE (music sequencer), Revelation (password manager) and Pax Britannica (game). I’m not sure Functy holds up against this company, but it’s nice to have it featured!
If you’re in the UK I’d recommend Linux Format as a great Linux magazine, even if it didn’t feature Functy in it! If you’ve come here as a new Functy user as a result of reading the article, it’s great to have you here, and please let me know what you think of the software, and how it can be improved.
A parcel arrived from Shapeways recently containing some of the 3D printed ring prototypes I generated using Functy. The models were exported directly from Functy and converted into STY format before being directly uploaded to Shapeways for printing. All based on sine/cosine curves, there’s a flat version, a slightly bulging version and an irregular version. Since Shapeways did such a brilliant job printing the prototypes, the next step is to get them to print them in silver. Click on the links if you fancy having your own printed!
The Functy function files for all of these rings are up in the repository and will be included as example files in the next full release.
I’m very pleased to announce the release of Functy 0.25. This new version includes a number of new features, improvements and bug fixes, including the following.
- Functy can now export models in Stanford Triangle Format (PLY) for use with modelling applications such as Blender and MeshLab.
- A bundle of new example files have been added to show off the curve rendering.
- The animation can now be paused using the space bar.
- The button bar can now be hidden by pressing ‘b’; especially useful when running in fullscreen mode.
- Shader compatibility has been improved (particularly if a function or its derivative uses exponents).
- The colour handling of the shader has been improved, so that similar colours are rendered by both CPU and GPU.
- Various performance improvements, for example when rendering the axes.
- Various bugfixes, including reversing the orientation of exported spherical functions for better consistency.
- The Symbolic library has also been updated to a new version.
Functy is available to download via the downloads page for Windows, Linux (x86, x64, ARM) and as a source archive. Functy is licensed under the MIT open source licence.
Although I’m hoping these improvements will make it even easier to use and more stable, there will inevitably be bugs, so please let me know if you find any.
Binary packages of Functy 0.22 are now available in .deb and .rpm format. I threw these together this weekend without having a great deal of understanding of what I was doing, so it’s possible they’re just a mess and won’t work at all.
As I use Ubuntu I’m not able to properly test the rpm package. What’s more some corrupt files on my system are preventing apt from working properly, so I’m not even able to fully test the deb package either. It’s all a bit rubbish really, but they’re available anyway as I’m sure they’ll be a better place to start for many people. Fingers crossed they’ll work as expected, but if not I assume I’ll find out soon enough!
You can get the new packages from the SourceForge projects page page, or click on the downloads link in the sidebar.
Functy is an open source 3D graph drawing package. The emphasis for the application is to allow Cartesian, spherical and parametric curve functions to be plotted and altered quickly and easily. This immediacy and the vivid results are intended to promote fun exploration of 3D functions.