Computergraphics Project
Computergraphics Project
#include <cmath>
#include <SFML/Graphics.hpp>
// Function to calculate the distance between two points (x1, y1) and (x2, y2)
window.draw(umbra);
window.draw(penumbra);
int main() {
while (window.isOpen()) {
Event event;
while (window.pollEvent(event)) {
if (event.type == Event::Closed)
window.close(); // Close the window if the user clicks the close button
window.clear(Color::Cyan);
window.draw(sun);
window.draw(earth);
window.draw(moon);
window.display();
}
https://github.com/JoreKut/SNAKE/blob/master/MAAAZE/Source.cpp