December 10, 2013
For reasons which need not concern you dear reader, I’ve been thinking about numbers as of late. There’s a common trope out there which states that since π is infinite and never repeats, every finite string of numbers you care to come up with occurs somewhere in π, simply because it is infinite and never repeats itself. I should point out right at the start that this is believed to be true by the majority of mathematicians, but it hasn’t been proven. It is certainly possible to create an irrational number which lacks this property. A favourite example is:
which is written in base-10, yet only uses zeroes and ones. Every subsequent group of zeroes and ones is one digit longer than the previous group, hence it never repeats and it is infinitely long. But no matter how far you search, you’ll never be able to find the string ’492′ in this number. Similarly, we could take π and replace all the nines with zeroes:
Actual π: 3.1415926535897932384626433832795028841971693993751058209... Modified π: 3.1415026535807032384626433832705028841071603003751058200...
No matter how far you search this new irrational, the string ’492′ will never occur, yet the number is still just as infinite now as it was before we started dicking around with it.
I don’t think this logic is a shocking revelation, this stuff has been dealt with and is reasonably well understood in a post-Cantor world. The reason I bring it up is because —to me— it sounds like this argument is often trotted out by the multi-verse or infinite-universe crowd as proof of our non-uniqueness. If the universe goes on forever, then there must be infinitely many exact duplicates of Earth (where I am right now writing this exact same blog post) out there because you can only arrange a bunch of particles in so many ways. Is that really true, or is it only as inevitable as being able to find any finite string of symbols in an irrational number?
November 10, 2013
After a 4 week stint in Seattle at Robert McNeel & Associates headquarters I’m finally back home. A lot of things were decided regarding the future of Grasshopper 1.0 and 2.0, however since I haven’t even started writing 2.0 I don’t want to list a bunch of features that may or may not make it in lest it be misunderstood for a list of promises. Instead allow me to list all the areas in Grasshopper where everyone is agreed problems exist that we need to attempt to solve for GH2. As a result of this reformulation I cannot mention any totally new features we are planning. I guess they will remain a secret for the time being…
- Documentation is woefully inadequate
- VB/C#/Python scripting tools are woefully inadequate
- Canvas UI doesn’t scale well to large files
- Grasshopper is probably only using a small part of your computer’s processing prowess
- It is too difficult to find out which plugins exist for Grasshopper
- It is too difficult to find out which plugins you need to open a GH file
- It is too difficult to use Grasshopper
- Grasshopper SDK is cumbersome to use in many places
- Grasshopper doesn’t scale well to high resolution displays
- Grasshopper UI doesn’t scale well to many custom tabs
- It is difficult to work with multiple users on the same project
- It is difficult to debug a GH file, especially if it was made by someone else
- It takes too long to start Grasshopper, especially if many plugins are installed
- It is often too difficult to edit data quickly
- It is difficult to associate custom information with Grasshopper data items
- It is difficult to maintain version control over large Grasshopper projects (i.e. who made what changes when, which plugins were used and do all the features today work in the same way as they did when this file was last edited?)
- Grasshopper has badly suffered from feature-creep and bloat and is in need of a thorough spring cleaning
- It has also been decided that Grasshopper will become part of the standard Rhino toolset, meaning that Grasshopper 1.0 will be available in Rhino 6.0
Once the Remote Control Panel is available again, development for GH1 will stop (apart from bug fixes) and I can start typing on GH2. I’m very much looking forward to this as there is some really exciting stuff that might not even take that long to code up. Running on Rhino6 means that I can switch to .NET 4.0 or even 4.5 and those have some really cool async and threading features. But most of all I want to be able to rewrite a lot of core classes because GH1 is a total mess under the hood.
All in all it’s pretty good news me thinks. I was a bit surprised that we ended up deciding to merge GH and Rhino and that I shall be developing GH2 beta as part of Rhino6/7 beta. It does mean I no longer have to worry about installers but it also means I’m tied to the Rhino release cycle. Luckily our new updating system means we actually tend to push out beta’s every week now so it will hopefully not be a big problem.
If you have specific wishes (especially regarding the SDK if you’re a GHA developer!) feel free to post them on our forums or send them to me directly.
ps. Simon Singh was on my SeaTac → Heathrow flight, 10 rows in front. It was an overnight flight so I didn’t want to disturb him but I managed to make a fool out of myself in a record 3 seconds by thanking him for Big Bang while deboarding. In case you haven’t read it yet, do so now. Seriously. Now. Shared first place with The Selfish Gene and Chaos in the category popular science.
November 3, 2013
My last week in Seattle at McNeel headquarters and I ran out of stuff to read. I found ‘The Hydrogen Sonata’ by Iain M. Banks in the local Barnes & Noble and decided to give Mr. Banks one more chance. I’ve read two of his books (Transition and Stonemouth) before and although he is clearly a gifted author it’s not the sort of (science) fiction I enjoy reading.
I haven’t gotten very far into The Hydrogen Sonata yet and I realise I may be missing large parts of the story as it is the tenth book in something called ‘The Culture Series’, but so far it’s —again— not my kind of story. Too many humanoid aliens, intragalactic travel far too easy, and lots of silly names like Gzilt, Eshri, Briper Drodj and Banstegeyn. I understand things need to have a name and you cannot really get around this when writing a story set in a galaxy densely populated with alien civilisations, but it adds a thin patina of ridiculousness to the whole endeavour in my opinion.
I did come across a scene that struck a chord with me, especially in light of the discussions sparked by one of my recent posts ‘Worrisome trends in architecture education‘. In this scene we learn something about the composer of a famous piece of music (long pauses represented by ellipses removed by me):
“I have no idea,” the old man said, smiling. “But the point is the Hydrogen Sonata is an elaborate, contrived attack on the sort of composition it represents. He [...] hated clashing, atonal music. He was basically taking the piss, showing how easy it was to write … how difficult to listen to. Now the piece he’s most remembered for.” He shrugged again. “‘Such is fate,’ as they say.” He gazed out to sea for a moment, then added, “One should never mistake pattern for meaning.”
Iain M. Banks, The Hydrogen Sonata
Sound advice I’d say.
October 20, 2013
Today part 2 of my 2 part series on religious music. Yesterday I listed my six favourite religiously inspired musical compositions, today it’s all about holding up a critical mirror to that very same religion. To qualify for this listing, a piece has to be musically up to snuff, funny or ironic rather than serious or angry and focus on either religious dogma or religious practice.
From funniest to somewhat less funniest:
2. The Spanish Inquisition composed by Mel Brooks. “Torquemada; do not implore him for compassion. Torquemada; do not beg him for forgiveness. Torquemada; do not ask him for mercy. Let’s face it, you can’t torquemada anything!” (I linked a high quality version of the video which unfortunately lacks the non-musical introduction).
3. The Vatican Rag composed by Tom Lehrer. Mathematician and musician and satirist, what more can you ask for?
4. Creation Science 101 composed by Roy Zimmerman, modern master of the clever rhyme.. “… and you are just beginning to, educate yourself when you, shun, evolution.” Definitely check out his other stuff too.
6. Herod’s Song composed by Tim Rice and Andrew Lloyd Webber. The sceptics anthem… “Prove to me that you’re divine, turn my water into wine. That’s all you need do, then I’ll know it’s all true.” I’ve long since had a soft spot for Jesus Christ Super Star, it seems to me to be a very human scale version of the Biblical accounts, where nobody is totally good or totally evil, but rather everyone has decent motivations which lead them to immoral acts in the face of an imperfect world. Plus the music and the dancing in the 1973 version is totally awesome.
 Again, I’m going to limit myself to Christianity.
October 19, 2013
I’m in Seattle at RMA headquarters for three weeks discussing the future of Grasshopper (don’t worry, not whether there is a future, but what it might look like). Although there is a great apartment for me to stay in, I’m separated from my books and my music. I don’t hold with Kindle or some such nonsense —paper for me thank you very much— and my laptop speakers can theoretically play my music but what they mostly do is repeatedly stab it in the kidneys until it’s lying as a bleeding and broken corpse on the floor.
However it did get me thinking about music categorization and I thought it would be fun to put up two blog posts with the best humanity has to offer from two opposing groups. Today, my six favourite religiously inspired masterpieces, tomorrow my six favourite pieces making light of religion.
October 10, 2013
Nearly four-and-a-half months after moving to Austria it seems we’re finally all settled. Well, legally settled, we’re still lacking a lot of lamps and storage space in the house itself. Car import tax, car validation, car registration, ÖAMTC membership, finding an insurance advisor, getting car insurance and license plates, electric/water registration, house insurance, recycle-centre card, private bank account, finding an accountant/tax-advisor, finding a vet, getting a work-license, getting a VAT/tax id number, opening a business bank account, health-care insurance, social insurance, retirement payments, Austrian ID card and pet-cat registration in the national database. All done as of noon today.
It seems a lot more complex here than in Slovakia…
Still, all the legal hassle aside, this is an absolutely beautiful place to live. We can cycle to and swim in Plansee in about 20 minutes. Walk to Heiterwanger See in 30. There is a fantastic bike route along the Lech river. Füssen and Alpsee in Germany are only about an hour cycling from here. Garmisch-Partenkirchen and back is a lovely bike-ride that’ll take less than half a day. There’s four castle ruins within walking distance of the house in various stages of (dis)repair and it’s wonderfully, exquisitely, magnificently, sensationally quiet here.
For about two weeks we had a herd of sheep and goats in the fields next to the house. They got into the garden a few times so we’ll need to build a better fence next year. Still, they are rather cute.
There have been some buck fights around the house this month, it appears to be deer mating season. Usually they do their stuff at night but we’ve seen a few deer and bucks up close (20 meters from the house and I once nearly biked into one on the road to Rieden).
Edit: Suddenly snow!
Edit 2: Yup…
September 30, 2013
Space ship, somewhere well on its way to Jupiter and they’re having a real-time discussion with Mission Control on Earth. WTF Hollywood? Who the hell makes a Sci-Fi film and then doesn’t hire someone with at least a high-school level understanding of physics to check the script for nonsense? There’s a 3 second delay just talking to someone on the Moon for Pete’s sake.
According to Rotten Tomatoes this film is:
Claustrophobic and stylish, Europa Report is a slow-burning thriller that puts the science back into science fiction.
Except for that thing about the speed of light I suppose… Why is it so difficult to make a decent Science Fiction movie when there are so many good Science Fiction books out there?
September 28, 2013
While trying to explain curve parameters to my girlfriend (she was proofreading my previous blog post) we hit upon an apt analogy. Imagine you’re taking a car-trip from home to the nearest
Hooters book-shop. It’s a good half-hour drive which takes you over two local roads and a motorway.
If the shape of the road you travel along equals the shape of a curve, then the curve parameters are analogous to the travel times. If you take this trip once every week, then you travel along the same roads every time. Thus the shape of the curve never changes. However some weeks you run into roadworks or thick fog or a traffic jam and then your travel times start to differ. Some parts of the trip may go faster than usual, others may go slower.
The point is that once you have the entire trip data (i.e. the entire curve data, not just the shape) you can then work out your location at 12:15. And you can work out in what direction you were travelling at 12:15. And you can work out your acceleration at 12:15. And you can work out the centrifugal force you were experiencing due to turning at 12:15. All of these properties can be computed as long as you have the curve (the route) and the correct curve parameter (the time).
It’s now also easy to see that parameters can have different densities in different portions of a curve, and how parameter density can be thought of as the ‘speed’ of a curve.
It even allows us to get a feeling for curve derivatives and why parameterization matters. Derivatives are used to compute the tangency and curvature and torsion of curves. A parallel can be drawn between those properties and the forces that push you into your car-seat due to acceleration. Or the forces that pull you out of your seat sideways because you’re turning too sharply. These forces don’t just depend on the shape of the road, they also depend on your travelling speed.
September 27, 2013
One of the more common misconceptions people have regarding computational geometry has to do with curve parameters. Since the mathematics of Nurbs curves are rather involved —much of it is certainly beyond high-school level— it is quite difficult to explain how control-point coordinates, control-point weights, curve degrees and knot-vectors all conspire to complicate the parameterization of a nurbs curve. My own grip on Nurbs maths is slippery at best so I think it’s better for everyone involved if I start this discussion using much simpler types of curves.
But before we can start talking about the problem, we should first lay down some ground rules for what sort of shapes qualify as ‘curves’:
- A curve is a finite, one-dimensional object, existing in some space with an arbitrary number of dimensions. In this blog post I’ll only concern myself with two-dimensional and three-dimensional spaces as we are all familiar with them.
- Every curve must have exactly two endpoints. No more, no less.
- If the endpoints coincide, the curve is considered to be closed.
- There may be no gaps on the interior of a curve, as that would result in more than two endpoints.
- There may be no branching points on the curve, except where an endpoint is coincident with some interior point of the curve.
Basically, think of all possible curves as liquorice laces, you can stretch, bend, twist and kink them, but ultimately it’s nothing more than a bunch of deformations applied to a straight piece of chewy goop. Note that the definition above differs from the common mathematical definition of curves. Mathematicians tend to be far more inclusive and rigorous.
September 17, 2013
I’ve been thinking about Grasshopper 2.0 for a while now and there are a lot of facets to the project where I’d like to see improvement. One of the things I’m looking into is incorporating 3rd party code libraries that would provide advanced statistical and algorithmic functionality. One of the libraries I’ve been browsing is the Microsoft Solver Foundation whose main purpose is to solve optimization problems.
Looking for examples on how to use MSF I came across this blog post which poses a hypothetical (but not unrealistic) problem which can be cracked using an algorithmic solver. The post itself has some inconsistencies in the numbers it uses to describe the problem, so I’ll outline it briefly here as well:
- You own a trading company and you’re looking to import some cheap-ass furniture from China and sell it to gullible Europeans for cut-throat prices. So the goal here is profit maximization.
- We hire individual containers from a shipping company, and these containers have limits on how much weight you can put in. We’ll use a 500 kilogram limit in this tutorial. We are not concerned with volume limitations.
- There are three types of furniture we can import; chairs, tables and bookcases (the original article uses cupboards instead of bookcases, but I wanted three items that start with different letters). Each has its own specific purchasing cost, profit margin and weight.
- There is one additional constraint concerning purchasing cost; your company can only afford to spend 5000 Euros per container.
That’s it, simple enough. A profit function with three variables (amount of chairs, tables and bookcases respectively) and two hard constraints limiting the weight and purchasing costs.
Because of the weight and purchasing constraints this problem becomes non-trivial and an algorithmic approach would be good to have, if only to check your intuitions in case you’re doing the purchasing by hand.
This is a three-variable problem which means the phase space of all possible states is three-dimensional and the fitness landcape is a four-dimensional surface (if you don’t know what a fitness function/landscape is, please see this blog post or buy the Architectural Design publication with my article). I cannot draw a four-dimensional surface on a two-dimensional screen so instead I decided to just make sh*t up and hope it gets the point across regardless of being utter humbug:
Here you see a two-dimensional phase-space (let’s ignore bookcases for the time being and assume we only have to pick chairs and tables) with the resulting three-dimensional fitness landscape. From left to right we go from zero chairs to some arbitrary upper limit. From front to back we go from zero tables to some arbitrary upper limit. Every two-dimensional point is some combination (i.e. state) of chairs and tables. For every combination we can compute the profit that combination would generate, and this has been represented by the height of the landscape. The higher the surface, the more money we’re going to make. Find the highest point on the landscape and you know how many chairs and tables hit the sweet spot.
So far so good. But what about our constraints? Some combinations of chairs and tables are impossible either because they weigh too much or because they cost too much. So our landscape shouldn’t in fact exist at all when this is the case. This is known as a hard constraint and unfortunately in Galapagos it is impossible to add a hard constraint (at least for now).
Luckily we can mimic this effect with penalty clauses. We’re looking to maximize our profit, so what we’ll do is subtract a large amount of money if any of these constraints are overstepped. As long as we subtract enough, the solver will automatically avoid those areas. Enough theorizing, lets hook up some wires!