大学英语四级CET4真题.docx

上传人:b****1 文档编号:14353874 上传时间:2023-06-22 格式:DOCX 页数:16 大小:246.85KB
下载 相关 举报
大学英语四级CET4真题.docx_第1页
第1页 / 共16页
大学英语四级CET4真题.docx_第2页
第2页 / 共16页
大学英语四级CET4真题.docx_第3页
第3页 / 共16页
大学英语四级CET4真题.docx_第4页
第4页 / 共16页
大学英语四级CET4真题.docx_第5页
第5页 / 共16页
大学英语四级CET4真题.docx_第6页
第6页 / 共16页
大学英语四级CET4真题.docx_第7页
第7页 / 共16页
大学英语四级CET4真题.docx_第8页
第8页 / 共16页
大学英语四级CET4真题.docx_第9页
第9页 / 共16页
大学英语四级CET4真题.docx_第10页
第10页 / 共16页
大学英语四级CET4真题.docx_第11页
第11页 / 共16页
大学英语四级CET4真题.docx_第12页
第12页 / 共16页
大学英语四级CET4真题.docx_第13页
第13页 / 共16页
大学英语四级CET4真题.docx_第14页
第14页 / 共16页
大学英语四级CET4真题.docx_第15页
第15页 / 共16页
大学英语四级CET4真题.docx_第16页
第16页 / 共16页
亲,该文档总共16页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

大学英语四级CET4真题.docx

《大学英语四级CET4真题.docx》由会员分享,可在线阅读,更多相关《大学英语四级CET4真题.docx(16页珍藏版)》请在冰点文库上搜索。

大学英语四级CET4真题.docx

大学英语四级CET4真题

VC++编程绘图作业

 

 

老师:

班级:

姓名:

学号:

日期:

第一题

//CMy091625Viewdrawing

voidCMy091625View:

:

OnDraw(CDC*pDC)

{CMy091625Doc*pDoc=GetDocument();

ASSERT_VALID(pDoc);

//TODO:

adddrawcodefornativedatahere

pDC->SetMapMode(7);

//pDC->SetWindowOrg(0,0);

pDC->SetViewportOrg(300,250);

pDC->SetWindowExt(50,100);

pDC->SetViewportExt(100,-100);

intpp[14][2]={0,0,0,120,-240,0,240,0,0,120,-160,0,

-160,40,-80,0,-80,80,0,0,80,80,80,0,160,40,160,0};

pDC->MoveTo(pp[0][0],pp[0][1]);

for(inti=1;i<=4;i++){pDC->LineTo(pp[i][0],pp[i][1]);}

pDC->MoveTo(pp[5][0],pp[5][1]);

for(i=6;i<=13;i++){pDC->LineTo(pp[i][0],pp[i][1]);}}

第二题

//CMy091625Viewdrawing

voidCMy091625View:

:

OnDraw(CDC*pDC)

{CMy091625Doc*pDoc=GetDocument();

ASSERT_VALID(pDoc);

//TODO:

adddrawcodefornativedatahere

CRectrc;

GetClientRect(rc);

pDC->SetMapMode(7);

pDC->SetViewportOrg(rc.right/2,rc.bottom/2);

pDC->SetWindowExt(100,100);

pDC->SetViewportExt(100,-100);

CPen*pPen,*pOldPen;

pPen=newCPen(PS_SOLID,3,RGB(0,0,0));

pOldPen=(CPen*)pDC->SelectObject(pPen);

inti;

doublex[10]={0},y[10]={0},r1=100,r2=38.2;

for(i=0;i<10;i++)

{if(i%2==0)

{x[i]=(int)r1*cos(1.5707963+i*3.1415926/5);

y[i]=(int)r1*sin(1.5707963+i*3.1415926/5);}

else

{x[i]=(int)r2*cos(1.5707963+0.6283185+(i-1)*3.1415/5);

y[i]=(int)r2*sin(1.5707963+0.6283185+(i-1)*3.1415/5);}}

pDC->MoveTo((int)x[0],(int)y[0]);

for(i=1;i<10;i++)

pDC->LineTo((int)x[i],(int)y[i]);

pDC->LineTo((int)x[0],(int)y[0]);

for(i=0;i<5;i++)

{pDC->MoveTo((int)x[i],(int)y[i]);

pDC->LineTo((int)x[i+5],(int)y[i+5]);}

pDC->SelectObject(pOldPen);

deletepPen;}

第三题

//CMy09wangliViewdrawing

voidCMy09wangliView:

:

OnDraw(CDC*pDC)

{CMy09wangliDoc*pDoc=GetDocument();

ASSERT_VALID(pDoc);

//TODO:

adddrawcodefornativedatahere

CPen*pPen,*pOldPen;

intc[15]=

{RGB(255,0,0),RGB(128,0,0),RGB(0,255,0),

RGB(0,128,0),RGB(0,0,255),RGB(0,0,128),

RGB(255,255,0),RGB(128,255,80),RGB(0,255,255),

RGB(50,50,255),RGB(255,255,255),RGB(0,255,128),

RGB(0,128,128),RGB(128,128,0),RGB(0,0,0)};

inti;

for(i=0;i<15;i++)

{pPen=newCPen(PS_SOLID,2,c[i]);

pOldPen=(CPen*)pDC->SelectObject(pPen);

pDC->SelectStockObject(NULL_BRUSH);

pDC->Ellipse(300-i*10,100,300+i*10,100+20*i);}

pDC->SelectObject(pOldPen);

deletepPen;}

第四题

//CMy091625Viewdrawing

voidCMy091625View:

:

OnDraw(CDC*pDC)

{CMy091625Doc*pDoc=GetDocument();

ASSERT_VALID(pDoc);

//TODO:

adddrawcodefornativedatahere

CRectrc;GetClientRect(rc);

pDC->SetMapMode(7);pDC->SetWindowExt(200,200);

pDC->SetViewportExt(rc.right,-rc.bottom);pDC->SetViewportOrg(rc.right/2,rc.bottom*2/3);

pDC->MoveTo(-5,0);pDC->LineTo(-5,100);pDC->LineTo(5,100);

pDC->LineTo(5,0);pDC->MoveTo(-85,0);pDC->LineTo(85,0);pDC->MoveTo(-75,10);

pDC->LineTo(-15,10);pDC->LineTo(-15,70);pDC->MoveTo(75,10);pDC->LineTo(15,10);

pDC->LineTo(15,70);pDC->Arc(85,10,65,-10,85,0,75,10);pDC->Arc(-85,10,-65,-10,-75,10,-85,0);

pDC->Arc(15,80,-5,60,15,70,5,80);pDC->Arc(-15,80,5,60,-5,80,-15,70);}

第五题

voidCMy091625View:

:

OnDraw(CDC*pDC)

{CMy091625Doc*pDoc=GetDocument();

ASSERT_VALID(pDoc);

//TODO:

adddrawcodefornativedatahere

CPen*p01,*p02;

CRectrc;GetClientRect(&rc);

pDC->SetMapMode(7);

pDC->SetViewportOrg(rc.right/2,rc.bottom/2);

pDC->SetWindowExt(400,400);

pDC->SetViewportExt(400,-400);

intpp[6][2]={-82,125,-280,125,-280,-100,280,-100,280,125,83,125};

pDC->MoveTo(pp[0][0],pp[0][1]);

for(inti=1;i<=5;i++){pDC->LineTo(pp[i][0],pp[i][1]);}

CRectr(-150,-150,150,150);

CPointp1,p2;p1=CPoint(82,125);p2=CPoint(-82,125);

pDC->ArcTo(r,p1,p2);

CRectr2(-100,-100,100,100);

CPointp3,p4;

p3=CPoint(60,-80);

p4=CPoint(-60,-80);

pDC->MoveTo(-60,-80);

pDC->LineTo(-60,-100);

pDC->MoveTo(60,-100);

pDC->LineTo(60,-80);

pDC->ArcTo(r2,p3,p4);

CPen*b1,*b2;

b1=newCPen(PS_DASHDOT,1,RGB(0,0,0));

b2=(CPen*)pDC->SelectObject(b1);

pDC->MoveTo(-106,0);

pDC->LineTo(106,0);

pDC->MoveTo(0,156);

pDC->LineTo(0,-106);}

第六题

//CMy091625Viewdrawing

voidCMy091625View:

:

OnDraw(CDC*pDC)

{CMy091625Doc*pDoc=GetDocument();

ASSERT_VALID(pDoc);

//TODO:

adddrawcodefornativedatahere

CRectrc;GetClientRect(rc);

pDC->SetViewportExt(rc.right,-rc.bottom);pDC->SetViewportOrg(rc.right/2,rc.bottom/2);

pDC->SetMapMode(7);pDC->SetWindowExt(500,500);

CPenpen(PS_SOLID,3,RGB(0,0,0));pDC->SelectObject(pen);

pDC->Arc(70,70,-70,-70,70,0,-70,0);

pDC->Arc(140,50,-140,-50,(int)-50.4488,(int)48.527,(int)50.4488,(int)48.527);}

第七题

//CMy091625Viewdrawing

voidCMy091625View:

:

OnDraw(CDC*pDC)

{CMy091625Doc*pDoc=GetDocument();

ASSERT_VALID(pDoc);

//TODO:

adddrawcodefornativedatahere

CRectrc;GetClientRect(rc);pDC->SetMapMode(7);

pDC->SetWindowOrg(0,0);pDC->SetViewportOrg(rc.right/2,rc.bottom/2);

pDC->SetWindowExt(50,50);pDC->SetViewportExt(100,-100);

CPenpen(PS_SOLID,2,RGB(0,0,0));pDC->SelectObject(pen);

doublex,y,t=0.0;inti,r=100;

for(i=0;i<3;i++){x=r*cos(t+3.1415926*i/6);pDC->Ellipse(int(-x),r,int(x),-r);}

pDC->MoveTo(0,r);pDC->LineTo(0,-r);

for(i=1;i<6;i++){y=r-i*r/3;x=sqrt(r*r-y*y);pDC->MoveTo(x,y);pDC->LineTo(-x,y);}

}

第八题

//CMy091625Viewdrawing

voidCMy091625View:

:

OnDraw(CDC*pDC)

{CMy091625Doc*pDoc=GetDocument();

ASSERT_VALID(pDoc);

//TODO:

adddrawcodefornativedatahere

CRectrc;GetClientRect(rc);

pDC->SetViewportExt(rc.right,-rc.bottom);

pDC->SetViewportOrg(rc.right/2,rc.bottom/2);

pDC->SetMapMode(7);pDC->SetWindowExt(400,400);

CPenpen(PS_SOLID,0.5,RGB(0,128,0));pDC->SelectObject(pen);

doubler,t;intx,y;for(t=0;t<=20*3.1415926;t+=0.1)

{r=R(t);x=(int)(r*cos(t));y=(int)(r*sin(t));if(t==0)

pDC->MoveTo(x,y);

else{pDC->MoveTo(0,0);pDC->LineTo(x,y);}}}

第九题

//CMy091625Viewdrawing

voidCMy091625View:

:

OnDraw(CDC*pDC)

{CMy091625Doc*pDoc=GetDocument();

ASSERT_VALID(pDoc);

//TODO:

adddrawcodefornativedatahere

CRectrc;GetClientRect(rc);

pDC->SetViewportExt(rc.right,-rc.bottom);pDC->SetViewportOrg(rc.right/4,rc.bottom/2);

pDC->SetMapMode(7);pDC->SetWindowExt(1000,1000);

CPenpen(PS_SOLID,0.5,RGB(0,0,0));pDC->SelectObject(pen);

pDC->SelectStockObject(NULL_BRUSH);

pDC->Ellipse(-120,-120,120,120);

pDC->Ellipse(-100,-100,100,100);

for(doublei=-6;i<=6;i++)

{doublea=sqrt(1-i*i/49);

pDC->MoveTo(-100*a,-100*i/7);pDC->LineTo(100*a,-100*i/7);}

pDC->SetViewportOrg(rc.right*3/4,rc.bottom/2);

pDC->Ellipse(-120,-120,120,120);pDC->Ellipse(-100,-100,100,100);

for(i=-6;i<=6;i++)

{doublea=sqrt(1-i*i/49);

pDC->MoveTo(-100*a*cos(3.1415926/4)+100*i/7*sin(3.1415926/4),-100*a*sin(3.1415926/4)-100*i/7*cos(3.1415926/4));

pDC->LineTo(100*a*cos(3.1415926/4)+100*i/7*sin(3.1415926/4),100*a*sin(3.1415926/4)-100*i/7*cos(3.1415926/4));}}

第十题

#include"math.h"

#definefnx(x)(int)(xo+x)

#definefny(x,y)(int)(yo+y-x*s1)

intxo,yo;

doubles1;inti;

//CMy09wangliView

IMPLEMENT_DYNCREATE(CMy09wangliView,CView)

BEGIN_MESSAGE_MAP(CMy09wangliView,CView)

//{{AFX_MSG_MAP(CMy09wangliView)

//NOTE-theClassWizardwilladdandremovemappingmacroshere.

//DONOTEDITwhatyouseeintheseblocksofgeneratedcode!

//}}AFX_MSG_MAP

//Standardprintingcommands

ON_COMMAND(ID_FILE_PRINT,CView:

:

OnFilePrint)

ON_COMMAND(ID_FILE_PRINT_DIRECT,CView:

:

OnFilePrint)

ON_COMMAND(ID_FILE_PRINT_PREVIEW,CView:

:

OnFilePrintPreview)

END_MESSAGE_MAP()

第十一题

#include"math.h"

//CMy09wangliViewdrawing

voidCMy09wangliView:

:

OnDraw(CDC*pDC)

{CMy09wangliDoc*pDoc=GetDocument();

ASSERT_VALID(pDoc);

//TODO:

adddrawcodefornativedatahere

inta=100,b=40;intx,y,xo,yo;doublec,d;

CRectrc;GetClientRect(&rc);

pDC->SetViewportOrg(rc.right/2,rc.bottom/2);

pDC->SetMapMode(7);

pDC->SetWindowExt(500,500);

CPenpen(PS_SOLID,2,RGB(0,0,0));

pDC->SelectObject(pen);

for(d=0;d<180;d+=(3.1415926/8)){for(c=0;c<=360;c+=(3.1415926/180))

{x=a*cos(c);y=b*sin(c);xo=x*cos(d)-y*sin(d);yo=x*sin(d)+y*cos(d);

if(c==0)pDC->MoveTo(xo,yo);

elsepDC->LineTo(xo,yo);}}}

十二题

#definefx(x)(int)(x*s)

#definefy(y)(int)(y)

//CMy09wangliViewdrawing

voidCMy09wangliView:

:

OnDraw(CDC*pDC)

{CMy09wangliDoc*pDoc=GetDocument();

ASSERT_VALID(pDoc);

//TODO:

adddrawcodefornativedatahere

CPen*p01,*p02;

CRectrc;

GetClientRect(&rc);

pDC->SetMapMode(7);

pDC->SetViewportOrg(rc.right/2,rc.bottom*9/10);

pDC->SetWindowExt(600,600);

pDC->SetViewportExt(600,-600);

p01=newCPen(0,2,RGB(0,0,0));p02=(CPen*)pDC->SelectObject(p01);

ints=1,i;

pDC->MoveTo(fx(0),fy(50));

pDC->LineTo(fx(300),fy(50));

pDC->Rectangle(fx(165),fy(50),fx(215),fy(250));

pDC->Rectangle(fx(155),fy(250),fx(225),fy(260));

pDC->Arc(fx(165),fy(235),fx(215),fy(285),fx(215),fy(260),fx(165),fy(260));

pDC->MoveTo(fx(215),fy(55));pDC->LineTo(fx(300),fy(55));

pDC->MoveTo(fx(215),fy(190));pDC->LineTo(fx(300),fy(190));

pDC->MoveTo(fx(215),fy(195));pDC->LineTo(fx(300),fy(195));

for(i=1;i<=4;i++)

{pDC->MoveTo(fx(215+20*i),fy(55));pDC->LineTo(fx(215+20*i),fy(190));

pDC->MoveTo(fx(-215-20*i),fy(55));pDC->LineTo(fx(-215-20*i),fy(190));}

s=-s;pDC->MoveTo(fx(0),fy(50));pDC->LineTo(fx(300),fy(50));

pDC->Rectangle(fx(165),fy(50),fx(215),fy(250));

pDC->Rectangle(fx(155),fy(250),fx(225),fy(260));

pDC->Arc(fx(165),fy(235),fx(215),fy(285),fx(165),fy(260),fx(215),fy(260));

pDC->MoveTo(fx(215),fy(55));pDC->LineTo(fx(300),fy(55));

pDC->MoveTo(fx(215),fy(190));pDC->LineTo(fx(300),fy(190));

pDC->MoveTo(fx(215),fy(195));pDC->LineTo(fx(300),fy(195));

CStringa="欢迎参观指导";

pDC->SelectStockObject(ANSI_FIXED_FONT);

pDC->SetTextColor(RGB(0,0,255));

pDC->TextOut(-50,250,a);}

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 表格模板 > 合同协议

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2