describe('.observe', function(){

	before(function(){
		jumbotron.observe(detections.a)
	})

	it('stored the response of detect in .observations', function(){
		jumbotron.observations.should.containEql(detections.a)
	})

})

describe('.construct', function(){

	before(function(){
		jumbotron.construct()
	})

	it('transformed clients appropriately')
	it('gave a width and height in the correct ratio')

	describe('with more observations', function(){

		it('returned markers obscured by some observations');
		it('corrected erronous observations');

	})

})

describe('recognition', function(){

	// given several images

	it('identified markers')
	it('positioned markers')

})

describe('utils', function(){

	describe('mapToUnit', function(){
		var transform,
			corners = detections.a[0].corners,
			cornerVs = corners.map(function(c){return $V([c.x,c.y,1])});

		before(function(){
			transform = jumbotron.util.mapToUnit(corners)
		});

		it('returned a matrix', function(){
			transform.should.be.an.instanceOf(Matrix);
		})
		it('maps corner 0 to 0,0', function(){
			match_point(transform.x(cornerVs[0]), [0,0], .5)
		})

		it('maps corner 1 to 1,0', function(){
			match_point(transform.x(cornerVs[1]), [1,0], .5)
		})

		it('maps corner 2 to 1,1', function(){
			match_point(transform.x(cornerVs[2]), [1,1], .5)
		})

		it('maps corner 3 to 0,1', function(){
			match_point(transform.x(cornerVs[3]), [0,1], .5)
		})

	})

})


function match_point(vector, array, accuracy){
	vector.elements[0].should.be.approximately(array[0],accuracy)
	vector.elements[1].should.be.approximately(array[1],accuracy)
}
@@ -749,22 +749,8 @@
 var 
-transform,%0A%09%09%09
 corn
@@ -787,138 +787,391 @@
 %0A%09%09%09
-cornerVs = corners.map(function(c)%7Breturn $V(%5Bc.x,c.y,1%5D)%7D);%0A%0A%09%09before(function()%7B%0A%09%09%09transform = jumbotron.util.mapToUnit(corners
+transform,   // the matrix transform that will be generated%0A%09%09%09transformed; // the corners transformed by the matrix%0A%0A%09%09before(function()%7B%0A%09%09%09transform = jumbotron.util.mapToUnit(corners);%0A%0A%09%09%09// use the computed tranform matrix to re-transform the corners%0A%09%09%09transformed = corners.map(function(corner)%7B%0A%09%09%09%09var vector = $V(%5Bcorner.x,corner.y,1%5D);%0A%09%09%09%09return transform.x(vector)%0A%09%09%09%7D
 )%0A%09%09
@@ -1333,23 +1333,13 @@
 form
-.x(cornerVs
+ed
 %5B0%5D
-)
 , %5B0
@@ -1422,23 +1422,13 @@
 form
-.x(cornerVs
+ed
 %5B1%5D
-)
 , %5B1
@@ -1511,23 +1511,13 @@
 form
-.x(cornerVs
+ed
 %5B2%5D
-)
 , %5B1
@@ -1600,23 +1600,13 @@
 form
-.x(cornerVs
+ed
 %5B3%5D
-)
 , %5B0

remove corner vectors from test