Hello there!
A beginner here experimenting with star-shaped polygons. I just made them rotate on top of each other. They are now spinning around on a certain angle - however, the bigger the star, the slower it seems to rotate.
Any ideas on how to fix the ofRotate -command to make the stars look like they spin at the same pace? I have a hunch that I should translate the angle to respond to the length of the radius, but I don’t know how.
Big thanks for any help and guidance!
Here’s what I got now:
**void** ofApp::draw(){
ofSetColor(0);
**float** resolution = ofMap(mouseX, 0, ofGetWidth(), 3, 20, **true** );
**float** radius1 = 200;
**float** radius2 = ofMap(mouseY, 0, ofGetHeight(), 50, 400, **true** );
**float** noOfStars;
noOfStars = 20;
for (float noOfStars= 0; noOfStars < 20; noOfStars++) {
ofPushMatrix();
ofSetColor(ofMap(noOfStars, 0, 20, 0, 255, true));
ofTranslate(ofGetWidth()/2,ofGetHeight()/2, true);
ofRotateRad(noOfStars*rotAngle);
ofScale(1/noOfStars, 1/noOfStars);
star(0, 0, radius1, radius2, resolution);
ofPopMatrix();}