#include "ofApp.h" #include "glew.h" //-------------------------------------------------------------- void ofApp::setup(){ } //-------------------------------------------------------------- void ofApp::update(){ } ofPolyline ofApp::polyLineTransform(const ofPolyline& poly, ofMatrix4x4 xform){ ofPolyline tempPoly; for (auto& p:poly){ tempPoly.addVertex(ofVec3f(p)*xform); } return tempPoly; } ofPolyline makePolygon(int num,float diam){ ofPolyline poly; float step=PI*2/num; for (int i=0;i<=num;i++){ poly.addVertex(cos(step*i)*diam,sin(step*i)*diam); } return poly; } void drawPoly(ofPolyline poly,float x,float y){ glPushMatrix(); ofTranslate(x,y); poly.draw(); for (int i=0;i