pointsB[0] = createDirectPosition(0.0, 0.0);
pointsB[1] = createDirectPosition(1.0, 0.0);
pointsB[2] = createDirectPosition(1.0, 1.0);
pointsB[3] = createDirectPosition(0.0, 0.0);
Surface sA = createSurface(pointsA);
assertEquals(0.5, sA.getArea(), 1.0e-8);
assertEquals(1.0 + 1.0 + Math.sqrt(2.0), sA.getPerimeter(), 0.0);
Surface sB = createSurface(pointsB);
assertEquals(0.5, sB.getArea(), 1.0e-8);
assertEquals(1.0 + 1.0 + Math.sqrt(2.0), sB.getPerimeter(), 0.0);
TransfiniteSet result = sA.intersection(sB);
assertTrue(result instanceof Surface);
Surface surfaceResult = (Surface)result;
assertEquals(1.0 + Math.sqrt(2.0), surfaceResult.getPerimeter(), 0.0);
}