Premiers graphiques avec Jupyter

#include "primitives_jupyter.h"
RenderWindow window(VideoMode(900, 480), "Ma super fenêtre");
window.clear(Color::Green);
// Dessine un point noir de coordonnées (418, 143)
draw_point(window, {418, 143}, Color::Black );
window.display();
// Dessine un segment blanc entre les points (100,200) et (200,200)
/// BEGIN SOLUTION
for(int x = 100; x <= 200; x++)
    draw_point(window, {x, 200}, Color::White );
/// END SOLUTION
window.display();
// Dessine un segment rouge entre les points (200,300) et (200,400)
/// BEGIN SOLUTION
for(int y = 300; y <= 400; y++)
    draw_point(window, {200, y}, Color::Red );         
/// END SOLUTION
window.display();
// Dessine un rectangle horizontal vide de sommets diagonaux (200,200) et (400,300) et de contour rouge
/// BEGIN SOLUTION
for ( int x = 200; x <= 400; x++ ) {
    draw_point(window, {x, 200}, Color::Red);
    draw_point(window, {x, 300}, Color::Red);
}
for ( int y = 200; y <= 300; y++ ) {
    draw_point(window, {200, y}, Color::Red);
    draw_point(window, {400, y}, Color::Red);
}                                                       
/// END SOLUTION
window.display()
// Dessine un rectangle horizontal plein noir de sommets diagonaux (400,150) et (500,200)
/// BEGIN SOLUTION
for ( int x = 400; x <= 500; x++ )
    for ( int y = 150; y <= 200; y++ )
        draw_point(window, {x, y}, Color::Black);       
/// END SOLUTION
window.display()
// Dessine un segment rouge entre les points (400,300) et (500,400)
/// BEGIN SOLUTION
for ( int t = 0; t <= 100; t++ )
    draw_point(window, {400 + t, 300 + t}, Color::Red); 
/// END SOLUTION
window.display()
// Dessine un cercle noir de centre (415,145) et de rayon 10
/// BEGIN SOLUTION
double pi = 3.14159;
int rayon = 10;
double dt = .5 / rayon;
for ( double t = 0; t <= 2*pi; t += dt )
    draw_point(window, {415 + rayon * cos(t),
                         145 + rayon * sin(t)},
                         Color::Black);                 
/// END SOLUTION
window.display()
// Dessine un disque jaune de centre (700, 100) et de rayon 50
/// BEGIN SOLUTION
int rayon = 50;
for ( int x = -rayon; x <= rayon; x++ )
    for ( int y = -rayon; y <= rayon; y++ )
        if ( x*x + y*y <= rayon * rayon )
            draw_point(window, {700 + x, 100 + y}, Color::Yellow); 
/// END SOLUTION
window.display()