Thursday, July 16, 2009

orthogonal basis transform

basis_transform
Here's a trick I learnt from Strang - to convert (rotation/translation) between two arbitrary frames:
  1. convert both to orthonormal bases (A,B above), ignoring the translation component for now.
  2. use the inverse == transpose trick to find the inverse of the first transform (AT), then apply (multiply by) the second transform(B)
  3. (...fudge the translation component (not shown)...)
It's even better if you want to axis-align something, you just need the transposed matrix. This got a post of it's own because I've been told by several professors over the years to move it to the origin, calculate the x and y rotational components and multiply together - this takes lots of multiplication, and you end up with a hideous zombie-like matrix.

The transpose is equal to the inverse only if it's an orthonormal matrix - to project vector line onto another, it's a simple dot product. What's more each axis in an orthogonal frame is independent, so that's all we need - 9 dot products, or one matrix multiplication.

Monday, July 06, 2009

a couple of procedural facades

A few weeks back I put together these two as examples of how to create a procedural facades from a static facade image.


This image is from the fantastic project from Washington. They had a project to stitch images, and were good enough to publish some hi res street fronts. Charleston, South Carolina:





The second image is of the willard hotel - around the corner from the White House (image by dbking):


The Willard Hotel




Some of the issues that came up:
  • There is a limit to how far you procedural-ize. For example, windows in the above were atomic units. Tricks like content aware image resizing (seam carving et al) might help do this automatically.
  • How do we tell if an element should scale or repeat with size? should some elements keep the same size and others be scaled relative to each other?
  • In the vanishing case (as the facade become small) which elements disappear first?
  • Negative space often plays a part (first met this concept in latex)
  • Many different schemes for layouts (see Java's Swing for lots of examples) - only one data point (the input image) which do we use?
  • Conflict between top-down (layout downwards - space subdivision at each step) and bottom up (components know how big they should be, eg a window, rather than a side of a house, knows how big it should be). Similar in principle to top down vs bottom up design arguments
  • Many features to balance, and everyone's goals are different - feels a lot like software engineering.

phd insanities


Every house I see has me trying to model it procedurally in my head. This is really driving me insane. Perhaps it's time for a holiday. How about the roof windows on the family guy house? Why doesn't it have any guttering? Why do some windows have shutters and others don't?

then ASU has buildings like this - did the tree come first and they built the house around it? Did the tree grow through the gap?


integrated architecture