⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 geowin_circles.c

📁 A Library of Efficient Data Types and Algorithms,封装了常用的ADT及其相关算法的软件包
💻 C
字号:
#include <LEDA/geowin.h>#include <LEDA/rat_geo_alg.h>#include <LEDA/bitmaps/button21.h>geowin_update<list<rat_point>,list<rat_polygon> > CHULL(CONVEX_HULL_POLY);geowin_update<list<rat_point>,list<rat_circle> >  AEC(ALL_EMPTY_CIRCLES);geowin_update<list<rat_point>,list<rat_circle> >  SMEC(SMALLEST_ENCLOSING_CIRCLE);geowin_update<list<rat_point>,list<rat_circle> >  LEC(LARGEST_EMPTY_CIRCLE); int main(){  GeoWin GW("Circle Demo");    list<rat_point> L;  geo_scene sc_input =  geowin_new_scene(GW,L);   GW.set_color(sc_input,black);    geo_scene sc_hull= geowin_new_scene(GW,CHULL, sc_input, "Convex Hull");  GW.set_fill_color(sc_hull,invisible);  GW.set_line_width(sc_hull,2);  GW.set_color(sc_hull,black);   GW.set_description(sc_hull, "This scene holds the convex hull of the input points.\n");  GW.set_visible(sc_hull,true);  geo_scene sc_sec = geowin_new_scene(GW, SMEC,  sc_input, "Smallest enclosing circle");  GW.set_color(sc_sec,blue );  GW.set_fill_color(sc_sec, invisible);  GW.set_description(sc_sec, "This scene holds the smallest circle\ncontaining all points of the input.\n");  GW.set_visible(sc_sec,true);  geo_scene sc_lec = geowin_new_scene(GW, LEC,  sc_input, "Largest empty circle");  GW.set_color(sc_lec,red);  GW.set_fill_color(sc_lec, invisible);  GW.set_description(sc_lec, "This scene holds the largest circle\nwhose center lies inside the convex\nhull of the input that contains\nno point of the input in its interior.\n");  GW.set_visible(sc_lec,true);  geo_scene sc_aec = geowin_new_scene(GW, AEC,  sc_input, "All empty circles");   GW.set_color(sc_aec,grey1);  GW.set_description(sc_aec, "This scene contains all empty circles\npassing through three or more points\nof the input.\n");  GW.set_fill_color(sc_aec, invisible);   //buttons  GW.set_button_width(21); GW.set_button_height(21);     GW.set_bitmap(sc_hull, hull_21_bits);  GW.set_bitmap(sc_sec, encl_circle_21_bits);  GW.set_bitmap(sc_lec, empty_circle_21_bits);    GW.edit(sc_input);  //GW.edit();    return 0;  }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -