首页 > 编程知识 正文

计算机图形学画圆代码,工程制图画圆

时间:2023-05-06 06:32:13 阅读:168355 作者:472

用计算机图形学画圆的程序

#i

nclude

#pragma hdrstop

#include 'Unit1.h '

请参见-------------------------------------------------

#pragmapackage(smart_init ) )。

#pragma resource '*.dfm '

TForm1 *Form1;

请参见-------------------------------------------------

_ _ fastcall tform 1:3360 tform1(t component * owner ) )。

3360表单(所有者)

{

}

请参见-------------------------------------------------

void _ _ fastcall tform 1:3360 button1click (tobject * sender ) ) ) ) ) ) ) ) ) ) ) ) 652 )

{

int r,x,y;

float d;

x=0;

y=r;

d=5.0/4-r;

image1-canvas-pixels [ 250 ] [ 175 ]=clblack;

while(yx ) )。

{if(D0 ) )

{d=2.0*x 3;

x; }

else

{d=(x-y ) *2.0 5) 5;

x;

y----; }

image1-canvas-pixels [ 250 x ] [ 175-y ]=clblack;

}

x=r;

y=0;

d=5.0/4-r;

while(y

{if(D0 ) )

{d=2.0*y 3;

y; }

else

{d=(y-x ) *2.0 5) 5;

y;

x----; }

image1-canvas-pixels [ 250 x ] [ 175-y ]=clblack;

}

x=0;

y=r;

d=5.0/4-r;

while(y(-x ) )

{if(D0 ) )

{d=2.0*(-x ) 3;

x----; }

else

{d=(-x-y ) ) *2.0 5;

(x---- );

y----; }

image1-canvas-pixels [ 250 x ] [ 175-y ]=clblack;

}

x=-r;

y=0;

d=5.0/4-r;

while(y

{if(D0 ) )

{d=2.0*y 3;

y; }

else

{d=(yx ) *2.0 5) 5;

y;

x; }

image1-canvas-pixels [ 250 x ] [ 175-y ]=clblack;

}

x=0;

y=-r;

d=5.0/4-r;

wile(-yx ) )。

{if(D0 ) )

{d=2.0*x 3;

x; }

else

{d=(xy ) *2.0 5) 5;

x;

y; }

image1-canvas-pixels [ 250 x ] [ 175-y ]=clblack;

}

x=r;

y=0;

d=5.0/4-r;

while(-y

{if(D0 ) )

{d=2.0*(-y ) 3;

y----; }

else

{d=(-y-x ) ) *2.0 5;

y----;

x----; }

image1-canvas-pixels [ 250 x ] [ 175-y ]=clblack;

}

x=0;

y=-r;

d=5.0/4-r;

while(-y-x ) )。

{if(D0 ) )

{d=2.0*(-x ) 3;

x----; }

else

{d=(-xy ) ) 2.0 ) 5;

x----;

y; }

image1-canvas-pixels [ 250 x ] [ 175-y ]=clblack;

}

x=-r;

y=0;

d=5.0/4-r;

while(-y

{if(D0 ) )

{d=2.0*(-y ) 3;

y----; }

else

{d=(-yx ) *2.0 5) 5;

y----;

x; }

image1-canvas-pixels [ 250 x ] [ 175-y ]=clblack;

}

}

请参见-------------------------------------------------

void _ _ fastcall tform 1:3360 button2click (tobject * sender ) ) ) ) ) ) ) ) ) ) ) ) 652

{

image1-canvas-brush-color=clwhite;

image1-canvas-fillrect (rect (0,0,500,350 );

}

----------------

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。