Foldinator 2 – First Build

Development of Foldinator2 is off to a good start. You can see the first prototype here:

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

Admittedly it doesn’t do much yet. So far it’s mostly framework and boilerplate MVC code. Not so glamorous, but important, like pouring the concrete for the foundation of the house. The data model class is defined and has a few important properties, including a reference to an object paper, which is currently just a square drawn to the screen, but will be the heart and soul of the application. The app presents a starting UI, and all the buttons are mapped thru events to commands. There may be more views and interface elements later, but this is enough to get going; anything new will fit into the established structure. Also I put a text output console, to make debugging easier going forward.

I have one more milestone to go before I get into actual folding in simulation. First implement the guts of Load button, read in an XML file and parse it, and assign the info and the steps to the (data) model. Next is to step thru the model using the shuttle controls. At first this will be text–only. The app will display the step number and the annotation for the current step. Once this is done, then it will be time to apply the fold specifications to the paper for each step.

Meanwhile, my brother Martin has begun work on an origami application of his own, and post a demo here:

http://www.victoryhearts.com/origamagiro/

His working title for it is “origamagiro”, a nice palindrome, but then he looked up the meaning of “giro” in Japanese here:

http://jisho.org/words?jap=giro&eng=&dict=edict

Well “giro” could mean battle, argument, controversy, guillotine…. or brothel. Martin sez: “Interesting contextual possibilities! Maybe we need to find a person actually fluent in Japanese to ask!”

Martin’s approach is in many ways complimentary to mine. He’s developing in Silverlight, so the possibility of us sharing code is slim to none, but that’s ok cuz we can share ideas at a conceptual level, which may ultimately be far more fruitful. Second, while I’m working my way in and building the groundwork, he’s diving right in and confronting the hard conceptual problems of graphics, modeling an animation head on. So while my first demo has a bunch of nice looking buttons, his has a virtual piece of paper that the user can manipulate.

Watch this space for future developments.

Home Again

We were away last week on vacation, visiting family upstate and then spending a few days at home to rest and get caught up on things. Spent a whole week wearing no socks and shoes.  We visited Denis and Sara for Anna’s first birthday party. Everyone in Jeannie’s family made the trip of from NYC. All the grandkids together in one place, a rare event. We all went swimming in Denis’s pool, and Lizzy learned how to do a proper dive off the diving board, which was a big thrill. The next we shuffled off to visit my parents. One highlight was a family picnic for all the cousins on my mum’s side. Another was a trip to the zoo. One evening Jeannie and I took a visit to our old college for a walk around the campus. On the last day we caught up with Martin and Kathleen. Little Charlie is getting big!

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.

OUSA ’09 Pictures

Here are a bunch of pictures from the convention. Get ready, there are a lot of ‘em. First up, a few personal favorites among the many, many models on exhibit.

Seth Friedman’s Blue Bar Pigeon. Perhaps my favorite model this year. I think birds are the new bugs in origami. Over the past few years I’ve seen ever more detailed and more sculptural birds. This is one of the best yet. Pigeons are an animal I know intimately, and this one really captures the essence of the animal. Very moving.

Marc Kirshenbaum’s “Blue Sky”. Marc is known for complex models including insects and musicians, and for his whimsical sense of humor. This year he brought that all together in his “Original Beatle”, a beetle playing a guitar. But to me Blue Sky demonstrates such a simple and fresh approach, and ends up being very evocative, so here it is.

Joseph Wu always does such amazing work. He has just the right sculptural touch to bring a subject to life. Here are some of his pigs and an octopus.

Brian Chan is a virtuoso folder who loves to tackle supercomplex subjects. His work transcends mere technique. Here is the anime heroine Rei.

Michelle’s candy box was selected for this year’s Origami by children exhibit.

Here’s a bunch of photos of my exhibit. I hope you don’t find it too indulgent, but what the heck, it’s my blog.

Every year the girls like to fold Laura Kruskal’s Convention Crown.

Here’s T.J. Norville and I folding my U.F.O for the oversized folding competition. It was awesome fun.

My origami Sphere, inspired by Thelonious Monk. Not too battered after spending a whole day bouncing around my backpack. It’s made from a frog base in a way roughly analogous to the way a Waterbomb comes from its base. I’ve been carrying this idea around with me for a while, but had no idea if it would worked until I tried it, particularly the way the paper goes in around the equator. This also is a proof of concept for the tail and fins for my work-in-progress Zeppelin model. I’m now working on a second, rounder, version of the Sphere with 72 rather than 32 facets.

My Pyramid/Sphinx, spontaneously invented in response to a conversation with John Montroll and Won Park.

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.

Paper Jam, Part I

Another Origami USA annual convention has come on gone. This year was an especially productive weekend and fun time for me. I meant to write a post last week when I was preparing for the convention, but I was too busy and ran out of time. So I’ll rewind a bit.

I’ve been busy folding new models and diagramming the past few weeks. A week ago Friday I had planned to take the day off from work and finish folding a whole bunch of works-in-progress. But I had to go in to the office to manage a group of contractors who are taking over the codebase of a project from another group, a project which I will be overseeing going forward. And as it turns out the codebase is sort of a fixer-upper. So it goes.

I had some good origami time on Sunday, but I had to choose between finishing models and finishing diagrams. I already had completed several new models for my exhibit this year and went back and wet-folded a few others, so I decided to concentrate on the diagrams. (More on the uncompleted models soon, as the they will be completed.) I went thru all the diagrams I had made in the last year -– fourteen in all — and proofread them. A few were mistake-free, several had one or two minor mistakes, several more had a sequence of steps that needed to be redrawn for clarity and/or accuracy. And then the last few — the Moose, Adirondack Chair, and U.F.O. needed to be finished. The ending steps of each of these models are fully three-dimensional so every step requires a new, highly detailed drawing. So that took up all of my free time and late into the night the rest of the week.

Last Thursday there was a happy hour event after work for the people in my group. I was vacillating on whether to go, being tempted to skip it to go home and fold. But there has been alot of turmoil lately in my group, and people will speak the kind of truth after work with a beer in their hand that the won’t in the office in the daytime, so I went along to hang out and encourage my colleagues to have another drink and see if there was anything to learn. The place was way downtown in SoHo, a neighborhood that I haven’t been to in years.

The bar was right across the street from where I used to live way back in 1993-94 with my friend Levitt when the area was pretty sketchy. I was in a third story walk-up loft that have a living space in one half and a studio full of stage lighting equipment in the other, and we were (among other things) working on software to automate the control of the lights thru MIDI. The stairway always smelled like machine oil and your were always light headed when you reached the flat. We suspected poor ventilation and carbon monoxide. The neighborhood changed a lot in the time I was there. There used to be some crack bum sleeping up the block, in a doorway that became an Armani store. Guess he had to find another place. Sometimes there were movie shoots on the streets and was able to grab breakfast on my way to work from a catering cart.  Now the building that where my loft was is no longer there, but a new high-rent luxury apartment is standing in its place.

When I got home that night I was too tired mentally to do any folding, so I went to bed early, which turned out the be a good move. I was able to get all my weekend chores done by midday Friday and had some time to finish preparing my exhibit and tweak some of the models I had. Each year my exhibit gets better and this was the best one yet.

More on the conference itself in part 2…

TV Strikes Back

My television spontaneously stopped working one day last week. They finally stopped broadcasting analog TV. I knew this day was coming for over ten years now, because way back in the 90’s I worked in a place doing R&D into futuristic interactive digital media, and it was on the slate way back then. Still, it had already been delayed more than once, so I never thought they’d actually go thru with it. In fact Jeannie put on Conan just so we could see the Snow Crash at midnight, but it never came. “Ha! See?” I said, but they quietly went dark the next day when no one was watching.

So now if we want to watch real time TV we need a weird little box that doesn’t properly turn off, only goes on “standby” with a sinister red light like the Eye of Sauron. For the most part this doesn’t bother me and I usually just unplug the thing, as I’m not a big fan of TV news, talks shows or watching sports on the tube. In fact, it’s been about two years since I watched much of anything on TV.

But TV has been creeping back into my life in form of internet TV. We’ve been getting into watching streaming shows from Netflix and Hulu. I thought my kids didn’t watch alot of TV until he first time I tried streaming from Netflix and saw a whole stack of Hannah Montana in the recently watched bin. It turns out TV can still be pretty entertaining and a good way to turn off your mind when you don’t have to suffer thru all those ads, and you can watch it whenever you like, which for me means late at night.

First we were getting into the classic 60’s show Star Trek, and worked our way thru about half of season one since coming back from New Mexico in April. Also we were turned on to 30 Rock after seeing it on the flight from Hell on the way back from NM. It’s a smart and wickedly funny sitcom, and always has one Star Wars (or other geek show) reference per episode. We had borrowed The Godfather from Netflix, and because it’s such a long movie, it sat on top of our DVD deck for about six months before we finally had the time to watch it. So then we got The Godfather II, and now that’s been sitting there for four months. One Saturday night not too long ago, we decided we could watch 12 or 13 episodes of 30 Rock in the time it would take to watch the Godfather II, so now we’ve basically burned our way thru 30 Rock. We also watch The Daily Show on Hulu from time to time. Usually catch up on the whole week on a Thursday night. Two minutes of ads per half hour is alot more tolerable than ten or twelve.

So you heard it hear first. This is the golden age of Internet Television, a.k.a. a reasonable value proposition for the viewer. In a few years when it becomes popular in the mainstream it’ll become as loaded up with ads and filler as cable and broadcast TV, and they’ll start charging two or three times for the same thing (like I don’t already pay for an ISP, etc.). And then I’ll have to give up watching TV again or go underground. Ah well, might as well enjoy it while it lasts.

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.