         guard self.curves.count > 0 else {
             return []
         }
+        assert(self.curves.first!.startingPoint == self.curves.last!.endingPoint, "this method assumes component is closed!")
         var elements: [Vertex] = [] // elements[i] is the first vertex of curves[i]
         let firstPoint: CGPoint = self.curves.first!.startingPoint
-        let firstVertex = Vertex(location: firstPoint, vertexType: .regular)
+        let firstVertex = Vertex(location: firstPoint, isIntersection: false)
         elements.append(firstVertex)
         var lastVertex = firstVertex
         for i in 1..<self.curves.count {
-            let v = Vertex(location: self.curves[i].startingPoint, vertexType: .regular)
+            let v = Vertex(location: self.curves[i].startingPoint, isIntersection: false)
             elements[i] = v
             let curveForTransition = self.curves[i-1]
             // set the forwards reference for starting vertex of curve i-1

    }
}

class Vertex {
    enum VertextType {
        case regular // ie, not a crossing
        case crossing(entryExit: Bool, neighbor: UnsafePointer<Vertex>, alpha: CGFloat)
    }
    let location: CGPoint
    let vertexType: VertextType
    // pointers must be set after initialization
    
    private(set) var next: Vertex! = nil
    private(set) weak var previous: Vertex! = nil

        self.previousTransition = transition
    }

    init(location: CGPoint, isIntersection: Bool) {
        self.location = location
        self.isIntersection = isIntersection
    }
}

