def segments(self, generation, time=None):
if not time:<EOL><INDENT>time = maxint<EOL><DEDENT>_ctx.push()<EOL>self._reset()<EOL>self._grow(generation, self.root, self.angle, self.d, time, draw=False)<EOL>_ctx.pop()<EOL>return self._segments<EOL>
Returns the number of segments drawn for a number of generations.

        The number of segments that are drawn to the screen
        depends of the number of generations and the amount of time.
        Each F command has a cost that depletes time.
        Segments will stop being drawn if generation reaches 0,
        when there is no time left 
        or when the segment length falls below LSystem.threshold.