Generative L-system

Hi,

I’m working on an L-system and so far I have the tree but I’m working on now making each line grow slowly. I’m new to working with vectors so any help would be appreciated.

I started with creating two vectors, then was thinking something like,

  
  
//if the string has an "a" then add vectors and multiply by an angle   
  
for (int i = 0; i < current_iteration.length(); i++) {  
        if(current_iteration[i] == 'a') {  
            v2+v1*angle;  
}  
  
  

Thank you

Attempting to generate a straight line.

  
  
  
void testApp::setup(){  
   angle=180;    
  x=cos(angle);  
  y=sin(angle);   
    ofVec2f start(0,0);  
    ofVec2f end(0,0);  
    ofVec2f dir(x, y);  
    length=5;  
    
  
      
}  
void testApp::draw(){  
//      
   ofTranslate(ofGetWidth()/2, ofGetHeight());  
     
     
     
 // ofVec2f result = start + dist;  
end=dir+start;  
  
  
  
  

Sorry just realized it was very stupid to put 180 but even with 90 it does not work.