# Drawing and rotating and then drawing

Hi again!

One of the things I have been trying to do and banging my head against the wall is to draw an imobius strip that then rotates and draws another… I am hoping to get like a flower or clovered look ultimately.

Because I am inarticulate, I drew a picture of what I’m thinking (the seconds are just an approximation of time passing) -

This is my code so far, but I can’t figure out how to make this happen exactly.

``````

#include "testApp.h"

//--------------------------------------------------------------
void testApp::setup(){

ofSetVerticalSync(true);
ofBackground(0,0,0);
ofSetCircleResolution(100);

halfWidth  = 0 ;
halfHeight = 0 ;

}

//--------------------------------------------------------------
void testApp::update(){

}

//--------------------------------------------------------------
void testApp::draw(){

halfWidth  == int(ofGetWidth())/2 ;
halfHeight == int(ofGetHeight())/2 ;

float xorig = 0;
float yorig = 0;
float angle = ofGetElapsedTimef()*1;
float x = xorig + radius * cos(angle * 2 + PI/2);
float y = yorig + radius * -sin(angle * 1);

ofPoint temp;
temp.x = x;
temp.y = y;
points.push_back(temp);
if (points.size() > 400){
points.erase(points.begin());
}

//rect that travels on path
ofSetRectMode(OF_RECTMODE_CENTER);
ofSetColor(255,0,127);
ofFill();
ofCircle(x,y,10);

ofSetColor(255,255,255);

for(int n = 0; n < 5; n++){
ofPushMatrix();
ofNoFill();
ofTranslate(500,300);
ofBeginShape();
for (int i = 0; i < points.size(); i++){
ofVertex(points[i].x, points[i].y);
}
ofEndShape();

ofPopMatrix();
//ofRotateY(15);
}

}

``````