1. # -*- coding: utf-8 -*-
  2. function triangleStrip(points, width):
  3. leftPoints =
  4. for each point, width cm. along angle_to(point-1) + angle_to(point+1) /2, //top edge points
  5. -width cm. along angle_to(point-1) + angle_to(point+1) /2 //bottom edge points
  6.  
  7. triangles = points[n:n+3] where n = each int in range(size(points)-3)
  8. //add, for each vertex, the triangle to the right (http://wesnoth.org/jetrel/triangle-strip.png).
  9.  
  10. drawTriangleStrip(triangles)