Get the dimension of the returned feature. This equals the number
           of elements in the returned list of numbers.

def get_dimension(self):
        """Get the dimension of the returned feature. This equals the number
           of elements in the returned list of numbers."""
        if self.strokes > 0:
            if self.pixel_env > 0:
                return (2 + (1 + 2*self.pixel_env)**2) \
                    * self.strokes * self.points_per_stroke
            else:
                return 2*self.strokes * self.points_per_stroke
        else:
            if self.pen_down:
                return 3*self.points_per_stroke
            else:
                return 2*self.points_per_stroke