Sunday, November 24, 2013

Un-doing M.C.Escher in graduate school

Alec Regulinski '13 wrote to me recently.  Alec never did anything half-heartedly, and so in his letter he (appropriately) took me to task for missing him at the fall homecoming football game (drat on me).  This is a lesson to all of you:  if you're coming back to F&M, let me know so I find you!

He then went on to describe his first semester in graduate school in computer engineering at Cornell.  You can see by the first sentence that he's just as enthusiastic as ever.
Why did Alec draw these lines on this particular picture?  Read on to find out . . . 



************
In any case I feel compelled to tell you that, indisputably, the class I took at F&M which has been the most helpful to me since I got to Cornell, has easily been Projective Geometry. I'm taking courses in Computer Graphics and in Computer Vision in which Projective Geometry is absolutely essential, but in different complimentary ways. Graphics, like the art aspect of our class, is hugely dependent on being able to render a 3D scene on to a 2D plane (the computer screen), as you might expect. The way this is implemented, sometimes, is that you shoot a ray from the eye through each pixel in the picture plane, into the scene and show the object which the ray intersects. Pretty much identical to all of our mathematical representations throughout last year.

Problems in Computer Vision deal with almost the "inverse" of this. Now we are trying to reason about the 3D scene presented in a 2D image. Specifically one of our most recent projects had to do with Single View Modeling, or basically constructing a 3D model of the scene depicted in a single picture. This project, specifically, reminded me so much of our class last year. Two of the main functions we implemented dealt with assigning points in the image 3D coordinates based off of other points (using cross ratio! Yay perspective invariants!). So if we knew a point was directly above another point we had the x and y coordinates for that point and could deduce the z, or if we knew that two points were at the same height then their z coordinates were the same and we could deduce the x and y

With those two functions the last part of the project was creating a 3D model of both a real world picture and painting or drawing. So I thought it would be really cool to sort of "resolve" the impossible geometry of one of M.C. Escher's drawings, specifically one of his endless staircases. I attached a couple of screenshots I took throughout the process in hope that you might find this as cool as I did. 

The first one is the original drawing. 

Then there's an image of the 3D model I created from the perspective close to the one in the original, so that the illusion is still preserved. 



Then I attached two images where the camera has been rotated in my model, so that you can see how the impossible staircase would truly look if it were created in real life. The back flight must be much further back (and larger) that it would appear, and obviously wouldn't actually connect around. In addition the building on the back left must have a "hole" in it so that you could see through to that back flight. 



And then I attached a couple pictures showing the process, where I would have to use lines from vanishing points to find the location of all the points of which I was trying to assess the 3D location.




Sorry for the incredibly long novel of an email, but I thought you'd be as excited to see some projective geometry in action. Maybe if you run out of things to talk to one class, you could show your students this as a semi practical application of the stuff we learned. Also if you want me to go into more detail about any of it feel free to ask!

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.