public static void Main()
var coordinates = new [] {
new Coordinate(0, 12, 0),
new Coordinate(5, 12, 0),
new Coordinate(5, 12, 3.6),
new Coordinate(0, 12, 3.6)
for(int index = 0; index < coordinates.Length; index++) {
Coordinate current = coordinates[index];
Coordinate next = coordinates[(index + 1 == coordinates.Length ? 0 : index+1)];
Coordinate crossProduct = current.CrossProduct(next);
result += crossProduct.Size();
Area finalResult = Area.FromSquareMeters(result / 2);
Console.WriteLine($"Calculated area: {finalResult}");
public Coordinate(double x, double y, double z)
X = Length.FromMeters(x);
Y = Length.FromMeters(y);
Z = Length.FromMeters(z);
public Coordinate(Length x, Length y, Length z){
public Length X {get;set;}
public Length Y {get;set;}
public Length Z {get;set;}
public Coordinate CrossProduct(Coordinate other){
var x = (this.Y.Meters * other.Z.Meters) - (this.Z.Meters * other.Y.Meters);
var y = (this.Z.Meters * other.X.Meters) - (this.X.Meters * other.Z.Meters);
var z = (this.X.Meters * other.Y.Meters) - (this.Y.Meters * other.X.Meters);
return new Coordinate(x,y,z);
return Math.Sqrt(Math.Pow(this.X.Meters, 2) + Math.Pow(this.Y.Meters, 2) + Math.Pow(this.Z.Meters, 2));