¡Esta es una revisión vieja del documento!
In openframeworks:
path.clear(); auto dx = (TWO_PI / 500.0) * 16; float x = ofGetElapsedTimef(); auto space = 50.0, amplitud = 78.0; auto y = sin(x) * amplitud; x+=dx; path.moveTo(0, ofGetHeight() / 2 + y); for (int i = 1; i < 25; i++) { y = sin(x) * amplitud; x+=dx; path.curveTo(i * space, ofGetHeight() / 2 + y); }
auto angle = .0; auto x = 0, y = 0; while (angle < 360 * PI) { // calculate x, y from a vector with known length and angle x = 300 * cos (angle); y = 300 * sin (angle); ofCircle(x + ofGetWidth() / 2, y + ofGetHeight() / 2, 3); angle += 10; }