#include <math.h>
#include <SFML/Graphics.hpp>
int main(){
sf::RenderWindow window(sf::VideoMode(800, 600), "Rolling rolling rolling rolling rolling...");
sf::CircleShape shape(50);
sf::Vector2i center(window.getSize().x/2, window.getSize().y/2);
const float pi = 3.1415;
int theta = 0;
const int radius = 100;
shape.setFillColor(sf::Color::Green);
while (window.isOpen()){
sf::Event event;
while (window.pollEvent(event)){
if (event.type == sf::Event::Closed)
window.close();
}
shape.setPosition(std::cos(theta*pi/180.0) * radius + center.x, std::sin(theta*pi/180.0) * radius + center.y);
theta++;
window.clear();
window.draw(shape);
window.display();
sf::sleep(sf::milliseconds(10));
}
return 0;
}