1.angle Դ?osip 源码?
angle Դ??
#i nclude "graphics.h"
#i nclude "math.h"
#i nclude "dos.h"
#i nclude "conio.h"
#i nclude "stdlib.h"
#i nclude "stdio.h"
#i nclude "stdarg.h"
#define MAXPTS
#define PI 3.
struct PTS {
int x,y;
};
double AspectRatio=0.;
void LineToDemo(void)
{
struct viewporttype vp;
struct PTS points[MAXPTS];
int i, j, h, w, xcenter, ycenter;
int radius, angle, step;
double rads;
printf(" MoveTo / LineTo Demonstration" );
getviewsettings( &vp );
h = vp.bottom - vp.top;
w = vp.right - vp.left;
xcenter = w / 2; /* Determine the center of circle */ ycenter = h / 2;
radius = (h - ) / (AspectRatio * 2);
step = / MAXPTS; /* Determine # of increments */ angle = 0; /* Begin at zero degrees */ for( i=0 ; i<MAXPTS ; ++i ){ /* Determine circle intercepts */ rads = (double)angle * PI / .0; /* Convert angle to radians */ points[i].x = xcenter + (int)( cos(rads) * radius );
points[i].y = ycenter - (int)( sin(rads) * radius * AspectRatio );
angle += step; /* Move to next increment */ }
circle( xcenter, ycenter, radius ); /* Draw bounding circle */ for( i=0 ; i<MAXPTS ; ++i ){ /* Draw the cords to the circle */ for( j=i ; j<MAXPTS ; ++j ){ /* For each remaining intersect */ moveto(points[i].x, points[i].y); /* Move to beginning of cord */ lineto(points[j].x, points[j].y); /* Draw the cord */ } } }
main()
{ int driver,mode;
driver=CGA;mode=CGAC0;
initgraph(&driver,&mode,"");
setcolor(3);
setbkcolor(GREEN);
LineToDemo();}
2024-11-19 07:292943人浏览
2024-11-19 06:452934人浏览
2024-11-19 06:331325人浏览
2024-11-19 06:23605人浏览
2024-11-19 06:122997人浏览
2024-11-19 06:00239人浏览
1.BKM • 57期 — 分享常用的办公学习小工具六)2.详解|天猫搜索前端技术历代记BKM • 57期 — 分享常用的办公学习小工具六) 欢迎来到我的分享空间,我是凉拌谢耳朵。今天,我将为大家
1.上兴远程控制 请问是谁编写的?上兴远程控制 请问是谁编写的? 具体是谁 不太清楚 我记得上兴是根据灰鸽子的源代码改写的吧 灰鸽子的作者是葛军 用delphi编写的 当时用户有万
1.江湖外卖-外卖SaaS平台测评 | 大神智选江湖外卖-外卖SaaS平台测评 | 大神智选 随着外卖行业的成熟,各大平台的用户活跃度保持稳定。在市场空白的三四线城市,利用本地优势建立独立品牌,能