#include <stdio.h>#include <stdlib.h>#include <math.h>#include <X11/Xlib.h>#include <assert.h>#include <unistd.h>Display *dpy;Window w;GC gc;#define gyok sqrtvoid pont(int x,int y,int szin){ XSetForeground(dpy,gc,szin); XDrawPoint(dpy, w, gc, x,y);}void…