   generateTriangles: =>
     return unless @renderer
 
-    getVector = (x, y) =>
-      key = "#{ x },#{ y }"
-      @vectors[key] ?= new Vector x, y
+    getVector = (args...) =>
+      key = args.join ','
+      @vectors[key] ?= new Vector args...
       @vectors[key]
+
+    getTriangle = (args...) =>
+      key = args.join ','
+      [x1, y1, x2, y2, x3, y3] = args
+      @triangles[key] ?= new Triangle @, getVector(x1, y1), getVector(x2, y2), getVector(x3, y3)
+      @triangles[key]
 
     originX = -200
     originY = -200

    @ratio = window.devicePixelRatio or 1

    @stage = null
    @triangles = []
    @vectors = {}

  destroy: =>


    # To make sure memory is released
    @stage = null
    @triangles = {}
    @vectors = {}

  render: =>
