Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Animated Sine Wave Graph

$
0
0

@somaphonk wrote:

Hey Peeps,

I’m trying to draw a graph in which a Sine wave is moving up and down.
Something like the right part of the image just into the other direction

Do I use a Polyline for this and If so how do I use it?

My Code till now (i just drew two axis):

**void** ofApp::draw(){
    ofPushStyle();
    ofSetColor(255);
    ofDrawLine(0.25*ofGetWidth(), 0.5*ofGetHeight(), 0.25*ofGetWidth(), 0.75*ofGetHeight());
    ofDrawLine(0.25*ofGetWidth(), 0.75*ofGetHeight(), 0.5*ofGetWidth(), 0.75*ofGetHeight());
    ofPopStyle();
}

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles