News
6/22/08 - Knitter 0.2.5 Release
This release includes many graphical improvements, including support for yarn colors and guages, and setting the background color of the rendering. The yarn edges are now rendered as lines rather than cylinders, which simplifies the rendering somewhat. The simplecable.pat pattern included in the examples directory uses the new yarn definition keywords and illustrates a simple cable with two different yarn colors. The rendering is also anti-aliased now which, along with yarn guage, eliminates the problem where pieces of yarn seemed to disappear when zoomed out.
Exporting the pattern does not work correctly when using different types of yarn. For now, the user will have to manually fix the pattern exported and add in the correct yarn definitions. This will be fixed in the next release. The next release will also hopefully support more KnitML features now that support for multiple yarn types exists.
In other news, I'm looking for someone to help with documentation for this project. The language needs to be documented in a way that new users can understand, and the code needs to be better documented. Screenshots have fallen by the wayside; I'd really like to have a better set of screenshots across multiple OSes. This is especially relevant as the GUI continues to grow and the rendering system gets better. The example patterns also need to be updated and documented; many are out of date and may produce errors (hopefully not crash the program since the 0.2.2 audit). If anyone is interested in some easy (and rewarding!) maintenance work, please let me know!
5/27/08 - Knitter 0.2.2 Release
A new release is out that includes a lot of bugfixes, mainly thanks to splint giving me a reason to audit the entire codebase and make sure all return values are checked. I've also updated the GUI. Previously, hitting the "knit" button would cause what was in the pattern entry field to be added to the current pattern and for the entire pattern to be "executed". The new behavior reveals this explicitly, so behavior should be much more intuitive. The stitch model has also been updated; the stitches will now repel each other, helping to prevent the "folding up" behavior seen in cables in previous versions.
5/6/08 - Knitter 0.2.1 Bugfix Release
A bugfix release is out. This came out so quickly because there were some pretty big bugs on OSX. In particular, the error message dialog was causing the program to crash, which means that every time there was an error, even if it was handled internally, the entire program crashed. This was also occuring on any system with a Unicode build, so several varieties of Unix were also affected. If you were experiencing lots of crashes with older releases, please try the new one! Also changing the gravity field under the Simulation tab actually changes the model's gravity, and a few memory leaks have been plugged.
I wanted to note that if anybody is having trouble with stability, Knitter now produces a logfile called knitter.log in its working directory. It should contain some pretty detailed information about anything that's gone wrong, and it could help explain why Knitter isn't working the way you expect. If you encounter any problems, please make a bug report on Sourceforge, and include this file if it's at all possible, along with information about what OS you're using.
Introduction
Knitter is a program for producing and visualizing three-dimensional models of knitting patterns. It uses wxWidgets for a GUI and has been tested on Linux, Windows, and Mac OSX. It should run on any platform that has a wxWidgets port.
The program takes in a knitting pattern (expressed very similarly to traditional patterns, but without ambiguities) and produces a three-dimensional model. You can't tell from the screenshots below, but you can actually rotate that model around and zoom in and out using the mouse. Also, those little red spheres are stitches. The red lines going between stitches represent yarn, or at least "connectedness" of stitches. For lines going left and right, the lines would actually be yarn connecting the previous and next stitches. Lines up and down represent loops in the yarn that connect stitches in different rows. We aren't actually drawing the stitches quite yet (we will in a future version), but this lattice structure should accurately represent the structure of a real project using the same instructions.
One of the goals of this project is to support KnitML as an upcoming standard for exchanging knitting patterns. The current version of Knitter does not support all aspects of KnitML, but it is capable of basic functionality, with support for more complex contructs coming later.
The official SF page is here. It will probably be more up-to-date than this site, so check the official SF downloads for the most up-to-date release.
A Quick Example
The native language for Knitter is closer to a typical knitting pattern. For example, a swatch that's 10 stitches wide and 10 rows tall would look something like:
# Simple 10x10 swatch
sk co 9 turn # make a loop, cast on 9, turn fabric
{ k 10 turn } 9
Notice the braces instead of the * typically used. The reason I used the braces was so that repeated blocks could be nested. Note that if you ran this pattern as is, the stitches would fall off the screen immediately due to gravity. You'll need to fix some of the stitches in space for them to stick around.
# Simple 10x10 swatch, fixed in space
sk fix(-4,0,0) co 9 fix(4,0,0) turn
{ k 10 turn } 9
Here the first slipknot has been fixed in space a little to the left, and the last stitch on the first row has been fixed a little to the right. When the simulation is run, the fabric will be generated and will flop down and be anchored at these two points, as if you were holding them there. See the documentation for more specifics on the language.