I am trying to understand what is happening to this circle, and not having much luck.
This is part of a sample that draws and runs an analog clock. I deleted all the code that does not affect the problem. What is left of the code is pasted below, and here is a link to the resulting picture: https://picasaweb.google.com/lh/photo/5svsM8HLJ5h3CXTgPFcJ8aSH89-kaxz6dMebCPTVqB0?feat=directlink
Needless to say, I am new to openFrameworks, and would appreciate any comments/suggestions.
Thanks in advance
#include "ofApp.h"
int sec;
int mymin;
int hour;
//--------------------------------------------------------------
void ofApp::setup(){
//Make everything look nice and smooth.
ofSetCircleResolution(100);
ofEnableSmoothing();
//Set size & position of our clock
if( ofGetHeight() < ofGetWidth() )
radius = (ofGetHeight()/2)-80; //+++++++++
else
radius = (ofGetWidth()/2)-80; //+++++++++
top = (ofGetHeight()/2);
myleft = (ofGetWidth()/2);
ofBackground(0, 0, 0);
}
//--------------------------------------------------------------
void ofApp::update(){
}
//--------------------------------------------------------------
void ofApp::draw(){
//Set the coortinate system to the center of the clock.
ofPoint circle_center = ofPoint( myleft, top);
ofTranslate(circle_center);
ofRotateZ(-90);
//Draw Outline of the clock
ofSetLineWidth( (radius/100)*4 );
ofNoFill();
ofSetColor(0,79,223);
ofCircle( ofPoint(0,0), radius );
ofCircle( ofPoint(0,0), radius-40 );
}
#pragma once
#include "ofMain.h"
class ofApp : public ofBaseApp{
public:
void setup();
void update();
void draw();
int radius;
int top;
int myleft;
float secondsAngle;
float minutesAngle;
float hoursAngle;
};