Foldinator 2 Build 2

Development of Foldinator2 continues. You can see the second prototype here:

http://zingman.com/foldinator2/foldinator2.html

Meanwhile the first prototype is archived here:

http://zingman.com/foldinator2/old_versions/foldinator2_build01/foldinator2.html

It still doesn’t fold paper, but it’s starting to do some interesting things. You can click on the “Load” button and see a list of models, encoded as OrigamiXML files. Select one and open it. You can see the UI update display the model name and author, and the text annotation for the first step. You can use the shuttle controls in the lower right to move forward and backward thru the steps, and jump to the beginning or end of the model.

A bunch of stuff is going on behind the scenes in support of this. I’ve implemented a file loader for the xml file that contains the list of models and their file names, as well as for the models themselves. I’ve create a hierarchy of classes to represent the data. The first of these is OrigamiModel, which contains metadata about the model, such as the title and author, and holds references to two other objects, OrigamiPaper and an ArrayCollection of steps. OrigamiPaper has properties for the papers proportions, color and starting orientation. The steps are of type OrigamiStep. This class contains properties for the steps action, annotation, and an ArrayCollection of creases. OrigamiCrease encapsulates the data to represent a crease, including properties such as the end coordinates, angle, parity swing, layers, etc. These last two classes will likely develop more properties and functionality as I build the folding engine.

I need to do a bit of bulletproofing around the initialization, and then it’s on to the main event, namely drawing and animating the folding paper. To begin with I’ll just be drawing a square procedurally and in accordance with the initial state specified in origamiPaper. Then I’ll be analyzing the geometry of the crease in the first step and breaking the square into appropriate polygons with a common edge, and rendering that. At first I’m going to concentrate on non-folding operations, namely Flip and Rotate the paper. Then it’s on to simple folds: Valley Fold, Mountain Fold, and Fold/Unfold. It’ll be a fair amount of work to get this far. Hopefully I’ll be able to apply this recursively for the second and subsequent steps, but more than likely there’ll be some gotcha.

New Song: Touch The Ceiling

I’ve been working on a new recording of a song called Touch The Ceiling. This is the last song for my current forthcoming album, whose working title is Face The Heat. Like the last number Making Miles, this one is a cover of sorts, a blast from my own past. Way back in the 1980’s I was in the prog rock group Infinigon. We did mainly covers by bands like Rush, Yes, Genesis, and ELP, but we aspired to write our own original songs.

Touch the Ceiling was one of the best. It was written by our drummer Mark Colicchia, crafted by contributions from the whole group. The song is a good expression of Mark’s philosophy as well as a really good song with a strong melody and groove, some interesting twists, an atmospheric middle section and a jamming ending. I recall contributing a few ideas to the arrangement.

I’m doing this new arrangement in collaboration with John Neumann, the original Infinigon bassist, who is now a fellow recording studio artist and the driving force behind Tea With Warriors. He’s playing the bass and guitar, singing the second parts, and contributing some cool synthesizer textures. Meanwhile on my side, I’m doing most of the keyboard parts, and this song involves more drum programming that usual, as there are a few different rhythms, a couple of drum breaks and a good handful of fills.

My friend Erik came by last night and I ran him though my mixes, and we worked out a strategy for bringing them over to his studio. The main thing is he doesn’t use SampleTank, which is my main onboard software synthesizer, so I’m going to have to take all my drums and keyboard tracks and render them out as audio. So I’ll be getting going on that as I finish this song.

Things have been hectic for me this week with work, the car and all, so it may be a couple weeks still until I have the rough mix up. Have to finish up the drums and the synth solo at the end, and drop in John’s parts. Meanwhile, you can enjoy Mark’s lyrics.

Touch The Ceiling
by Mark Colicchia

Light side of summer ready to roll vivid perfect day
Song playing over the radio with nothing to day
Land upon the lunar surface streets and I’m on my way
Going out to spend tomorrow’s half of next week’s pay

You gotta go with the feeling
Avoid disbelieving
If you can’t touch the ceiling
Reach as high as you can

Waiting for the weekend takes so long then it’s gone too soon
Young night lit by ancient stars and pie-graph moon
Strange invitation you go it alone and the evening seems to loom
Searchlight eyes meet a similar gaze from across the room

You gotta go with the feeling
The moment revealing
If you can’t touch the ceiling
Reach as high as you can

Work live for paper pagan reward it’s the modern way
Stress cynicism all from the game what a price to pay
Plan for tomorrow but don’t forget to enjoy today
Do what you know is right in your mind it’s the winning play

Making the scene what does it mean what does it say?
Too many flaws plaguing the laws that we obey
Don’t let the sights of golden lights lead you astray
Life can be hard sometimes the cards fall where they may

And go with the feeling
Avoid disbelieving
If you can’t touch the ceiling
Reach as high as you can

Zingman Site Upgrade

Now that fears over the Y2K bug have pretty much calmed down I figured it would be a good time to upgrade my web site to use some good ol’ fashion 21st century web technology. I’ve begun adding dynamic elements to my pages using PHP. The high-level goal is to make the site more template driven so I can update content easily and have configurable views. For example, I’d like to be able generate pages in my origami section that display the models in a particular subject or from a particular year on-the-fly. Toward that end, as a proof-of-concept I designed a drop-in header and footer that can be passed args for Title and Section. Many thanks to Jeannie for helping with creating these templates.

So far I’ve implemented the templates in the “back half” of my site – the less visited sections Multimedia, Movies, Art, and Spew. Now that I know it’s working, I’ll be getting around to the rest of the site in the next few days. In the meanwhile, please alert me if you come across any broken links while the transition is on. The payoff is, going forward, if I want to for example add a new section, I can just update the footer file with the new link rather than having to go in and edit every single page. Now the real fun begins. Soon I will begin going thru my sub-pages to create more sophisticated reusable content blocks and begin serving more and more parts of the site dynamically.

Rollercoaster of Cheese

A while back I thought it would be a fun idea to teach the girls how to make their own cartoons using Flash. It was a cool little project. It’s been sitting around almost done for a long while, and we finally got the motivation to finish it off. I had introduced the girls to the drawing tools before. This time once they’d made a bunch of drawings, we brainstormed a story line. We did a little voice recoding session and edited together a soundtrack to serve as the backbone of the cartoon. I taught the girls how to do motion tween animation synched to the sound. Although Michelle got bored with this part Lizzy did just fine. Here is final movie, and an alternate take.

I had a bit of trouble with the movie once I uploaded it and viewed in the browser. On some computers it the animation and the sound were getting out of sync, spoiling the effect. It appears to play correctly in the browser with the Flash Player 10 plugin, so if you don’t have it, I wrote a check into the page to prompt you to upgrade.

Origami XML

As I mentioned last week, I feel inspired to dust off my origami software, the Foldinator, and try and move its development along towards a release version. I brief recap: I first conceptualized Foldinator as an application to author origami diagrams, since there is no such purpose-built software out there. As I thought about it I realized it would in fact have to be something of an origami simulation, with the steps of the diagrams working an actual animated simulation of the paper.

I started with the application design, concentrating particularly on the user interface and authoring tools. I wrote a paper on the subject with I delivered at 3OSME a few years back. I was writing it in Flash, which in those days meant ActionScript 1, which is a bit of a kludgey language without proper objects or data types. Around this time I was out of work for a while after the dotcom crash and made a good start on a prototype since I was able to give it some serious focus for a few months. The prototype could record and playback steps, and execute several operations including Rotate, Turn Over, (Valley) Fold and Fold, and Valley Fold.

When I got to the point where I had to grok a sequence of valley folds, I knew I had gotten to the heart of the problem. I had to figure out how to model this algorithmically to proceed, how to break the paper into a bunch of inter-related parts with hinged and/or joined edges. This made harder by the limitations of ActionScript as a language, which was not really designed for serious application development. I considered rewriting the whole thing in Java, but that would have meant a completely new approach and implementation of the drawing engine. A related problem was how to represent the data that comprised a sequence of steps. At the time I was using generic objects with properties, again due to AS1 limitations.

Around this time I got a new job and the amount of time and energy I was able to put into the project waned. After long days of writing software, it was hard to come home and work on a whole ‘nuther project at night, and besides, I wanted to put more of my origami time into actually designing and folding models.

Well things have changed since then and I figure it’s time to give it another shot. For a while I was trying to get some kind of R&D funding so I could work on this full time. But that does not look like it’s likely to happen, so I might as well get on with it.

One thing that that’s changed is ActionScript has grown up into a full-fledged Java-style object oriented language, and Flex into a professional grade authoring platform for web applications, built on Eclipse. Flex is a superset of Flash and includes the Flash vector drawing and animation engine. So the platform for Foldinator 2.0 is Flex.

Another thing that’s changed is I’ve figured out over the years how to be productive in small focused efforts that accumulate over time. (Having kids kind of forces you to get good at using your time wisely.) The key is to have a discreet and achievable goal every for every session that you sit down to work at something, whether it’s a few hours of even just an hour or less. Sometimes the goal can be just to think about it or come up with a plan for something, but I try and do my thinking offline, so when I sit down to work there’s a short-term goal. The first thing I did was create a new Flex project and set up the basic framework, and import my old Flash code to pick over and see what can be ported and what should be scrapped.

The other thing I did was to start to work out the data representation side. The first prototype focused on the authoring and interface side of things. This comes at it from the opposite end. Naturally, the logical choice is to use XML, so I thought coming up with an XML schema to represent an origami model would be an important step. Having googled “Origami XML” it does not appear that anyone has done any work on this. I told my idea to Brian Webb and he said “That sounds like a trip to Singapore right there,” referring to the upcoming 5OSME. I’m not sure I want to this, but I’m thinking of going to this year’s PCOC, because it’s in San Francisco and I used to live there and it’d probably be a lot of fun. Maybe there will be an opportunity to present a paper there, like the Monday sessions at the OUSA convention in New York.

In any event, the design goal of OrigamiXML is to represent a model by its folding sequence, in a way that’s application agnostic, in other words independent of Foldinator. I’d like to make OrigamiXML a standard that can be shared with the origami and software communities, so that Foldinator can share documents with other applications. I ran this idea by my brother Martin, who is thinking of developing an origami themed computer game in SilverLight.

I have started with a few examples of traditional and simple models expressed in Origami XML. They are: Picture Frame, a pureland model invented by my daughter Elizabeth a few years back (for those of you who are not folders, pureland means the model has only mountain and valley folds), the traditional Swan, the Waterbomb Base, and the Preliminary Fold. These bring up the issue of reverse folds, which it looks like I’ll have to get to sooner rather than later.

In the offing I have a few more models partially specified: The bird base and traditional crane, which will necessitate working out how to specify and execute a petal fold, the frog base, which will do the same for a squash fold, and a funny little thing I made up and call the bird-dog base, which is half a bird base on one side and half of Montroll’s dog base on the other.

If you look at the XML, there is some meta data at the top, including things like the title of the model, the author, and copyright info. Then there’s information about the paper: it’s proportions, whether it ought to be two-color and so on. Although I am mainly focused on single-sheet models, it supports specifications for multiple sheets. How to put multiple sheets together into a model is a bride to cross when we get there.

The heart of the document is the sequence of steps. Each step includes an action, which indicates the kind of step usually “fold”. It also has an annotation, which is a human readable description of the step, like those that typically appear in published diagrams.

Then there is room for any number of creases. At first I thought I would have just one crease per step, but then I realized it is necessary to have multiple crease to support reverse folds, squash folds, petal folds, and sinks. This means too that the OrigamiXML can support arbitrarily complex compound folds that collapse all at once, that are common in box-pleated models and other advanced modern styles.

A crease is specified by several parameters. First is the location, which can be either an end point and an angle or two end points. I’m not sure yet whether these coordinates are relative to the unfolded sheet as in a crease pattern, or to the current view of the folded model as in conventional diagramming. I’d prefer that latter, but have not yet worked out if this is possible, or if it will introduces too many cases of unsolvable ambiguities.

Other parameters include Swing, which specifies which way the folded paper moves (Left, Right), as well as Parity (“Mountain” or “Valley”), Type (Inside Reverse, Outside Reverse, etc., although I’m not sure if this belongs with the step of the crease), and an optional value for the number of layers to fold thru, which defaults to “all”.

Another feature is that steps can be nested, so a step can contain multiple sub-steps. The intent of this is to handle common diagramming situations such as “Repeat steps 19 -24 on the left side” or “Petal fold, repeat behind.” In the second case, this simple instruction actually breaks down into four steps. First the petal fold (which itself involves three creases). The next step is to turn the model over. Third is another petal fold, and last is to turn it over again. Having to make this into four steps in a diagram would be tedious to the diagrammer and bothersome to the folder, so I’m hoping to be able to automate this out.

That’s as far as I’ve gotten so far. I’d like to figure out a way to vet this to the origami community and get some feedback. Probably a simple post to the O-list ought to do it. Meanwhile I’ll start development on Foldinator 2.0 and by having it read in these XML files and parse them, and build the logic in the engine ones action at a time until it can execute these models. I fully expect there will be some back’n’forth between the XML and the engine to get the kinks ironed out. We’ll see how it goes. Wish me luck.

Summer At Last

Had a nice long weekend over the fourth of July. It seems the rain has finally stopped and it’s been nice and sunny, although not very hot. Got caught up on rest and finished off some projects, and started some new ones. Finished making a seat cushion for a toy box bench for Lizzy’s room. Made a start on organizing my origami studio. Made a start on Foldinator 2.0. Saw some fireworks, listened to some tunes, had a few good barbecues and spent a day at the beach.

The key to going to the beach around here is go early, like going skiing. Or at least like a regular work/school day. We were up at 7 out of the house by 8 and had our toes in the ocean by 9. We went to Jones Beach on Long Island, which is a fantastic, world-class beach, but tends to get crowded. Parked in the near lot and the place was practically empty when we arrived. The water was cold but we got some good swimming in and built some enormous sand castles. By the time we were heading home around 2 in the afternoon, the parking lots were full and there were traffic jams. We were going the opposite way, so we just laughed.

The flowers in our yard are doing really well this year. Blooming a few weeks later than usual, but they seem to be making up for it by being extra beautiful. Lizzy took a few pictures. I took a few more.

Paper Jam, Part II

I had a great time at this year’s origami convention. Jeannie and the girls went and had a great time too. A lot of my origami friends were there: John, Brian, T.J., Brian, Kenny, and the list goes on. (You know who you are!) Met a few new friends too, (Hi Susan!) and a few from the west coast and beyond who only make it every few years (Hi Won and Joseph).

As I mentioned before, I put a good amount of effort into my exhibit this year, so it was really gratifying to have folders I admire and respect complement on particular models. I think someone had something to say about every single piece. Michael Lafosse like my reptiles, and Joseph Wu and Brian Chan liked my Oliphaunt.

I taught my first class on Saturday morning, first session. Everyone in the family went on Saturday and we were all in good shape to turn up early. This class was the set of diagrams I had completed, 14 in all. It was a very full class, so I’m glad I made a second set of printouts. Overall they were well received and the class did quite well. A few models had a few specific sequences that seemed to need clarification, so that was valuable feedback.

My second class was Sunday afternoon. I taught my Luv Bug. I only had one period, and I ran out of time. I was a bit surprised because I can fold it by myself in 20 minutes, so I thought an hour would be enough. It was graded as intermediate, although it probably should have been high intermediate, and the class was very full and I had to walk around a lot showing people a couple of particular tricky steps. But people liked it well enough that I taught the conclusion (about 10 minutes more) to a few groups and individuals in the hospitality area later that evening.

There were a few unique things year. On Saturday night there was a screening of the movie “Between the Folds” a documentary about origami that profiles about a dozen top folders today, with an emphasis on the mathematical side of things. It was very well made, if (like origami itself) a bit idiosyncratic as per the choice of subjects. I really enjoyed seeing the interviews with Eric Joisel, whom I’ve never met, and Yoshizawa Sensei, whom I will never meet. Very nice soundtrack too.

Sunday night there was a giant fold completion. June Sokimoto, who owns a paper store in San Francisco, donated a few rolls of nine foot paper typically used for theatrical backdrops. It was a total blast, with everyone folding like mad. We worked in teams. Lizzy and her friend Michael made a swan. T. J. Norville and I got together and folded one of my U.F.O.s. He had asked me to teach him that model the day before, so he knew what he was doing and we were able to finish it in the allotted hour. When we started we didn’t know if it would work at all, but it came out awesome. I’m going to burn it for the 4th of July, or maybe when we go camping.

Sunday was also the first, last and only day in the month of June without rain this year.

Monday was a day seminars or origami related topics. The highlight for me was Toshi Tohiro from Tokyo talking about his origami software. It’s pretty specific to meshes, but it’s still pretty mind blowing. In fact it inspired me to dust off the Foldinator (my own origami software) and work on developing it again toward a releasable product. That’s a big topic, so more on that in a future post. For now I’ll say I’m staring with defining and XML schema.

I also folded a few new original models over the weekend. One is a sphere (yes that’s right, out of a square of paper), which worked out surprisingly well on the first try. Also, riffing on a theme, an orb UFO (maybe I can turn it into a Sputnik. For that matter, using my polar folding technique, I could make Mercury, Gemini and Apollo capsule. Jeannie suggested should fold a Space shuttle, complete with external tank and solid rocket boosters. I probably could, but that might be carrying things a bit to far.)

At the Monday night dinner I was sitting with John Montroll and Won Park, and they were discussing dollar folds, because John is coming out with a new dollar book and dollar folds are Won’s specialty. I came up with a neat little dollar fold of my own. It’s a pyramid, where the pyramid on the great seal on the bill lines of with the folded pyramid. This only took up half the paper, so out of the other half I made a Sphinx.

So it was a great convention on many levels. As always, now I’m really jazzed up about folding and wish I had more time to fold. One last thing — John has a fan site on the internet:

johnmontrollcandividebyzero.info.

Up next: pictures.

Origami Castle Complete

Weather update: it’s now been eight days in a row of rain, although the sun came out for a few hours yesterday afternoon, just in time for us to have a nice barbecue. And it looks like we get some sunshine again this afternoon.

I completed an exhibit quality origami castle based on my Armory configuration. It’s made from a 19″ square of Wyndstone, the same as my War Elephant. I tweaked the proportions to make the main square larger in proportion to the towers. In my prototype I started by dividing the paper into eighths, but for this one I divided it into ninths.

In other news I updated my main music page and the page for my work-in-progress album, Face The Heat, as well as the lyrics page. At this point I have seven songs done, and want to take a break from recording to concentrate on origami before I start in on a new song. Of the three or four songs I might start in on next, all are only semi-written, and in particular the lyrics and melody need to be finished and fitted to the music. This process can take a while, so I think rather than try and power thru it, I’ll sit back and see if inspiration comes to me to propel the process forward. Meanwhile I’ll take a step back from the songs I have and just listen a while and see how the mixes sit.

Fair Weather

Blue sky sunshine
Clear head free time
Tune in your mind
The whole world loves you
And the universe too
It’s gonna be a beautiful day

Love this time of year. The long days and pleasant weather just make me feel good and give me energy. We’ve been enjoying a really nice spell as spring rounds the corner into summer. A few weeks ago we had a lot of rain, which was great for the lawn. Now it’s been sunny an in the 70’s pretty much very day. Last month we had another giant ancient maple tree taken out of our yard because it had a large dead limb way up there. Since the one last summer went so well I didn’t even bother to work at home that day to keep an eye on things. Apart from our mailbox getting bumped it was just fine. One happy side effect was that there is a rhododendron bush in our yard that was always under the maple’s shade is now coming into its own, looking positively glorious.