Написал 6е задание на вычислительную геометрию, задача наименьшего круга по алгоритму Велзля

This commit is contained in:
AZEN-SGG 2024-12-08 22:18:24 +03:00
parent 6e9934a2d8
commit b36187b77d
18 changed files with 264 additions and 1 deletions

View file

@ -0,0 +1,23 @@
#include "tools.h"
#include "SCP.h"
int main(void) {
points ps;
point N[3];
circle crcl;
FILE * file = getFile();
if (file == NULL) return -1;
ps = getPoints(file);
if (ps.array == NULL) return -2;
for (int i = 0; i < ps.length; ++i) printf("(%.2lf, %.2lf) ", ps.array[i].x, ps.array[i].y);
printf("\n");
crcl = MEC(ps.array, ps.length, N, 0);
printCircle(crcl);
free(ps.array);
return 0;
}