|
|
Регистрация Восстановить пароль |
Повторная активизация e-mail |
Регистрация | Задать вопрос |
Заплачу за решение |
Новые сообщения |
Сообщения за день |
Расширенный поиск |
Правила |
Всё прочитано |
|
Опции темы | Поиск в этой теме |
08.12.2008, 14:08 | #1 |
Регистрация: 08.12.2008
Сообщений: 3
|
grafika
uses
crt, graph; const p:array[1..7] of string =('zadaca 1','zadaca 2','zadaca 3','zadaca 4','zadaca 5','zadaca 6','exit'); var d:boolean; driverVar,ModeVar:integer; x1,x2,y1,y2,z,i,j:integer; s:char; procedure menu; begin rectangle(0,0,639,450); setfillstyle(11,1); bar(1,1,638,449); y1:=1; x2:=80; y2:=20; for i:=1 to 7 do begin setcolor(3); rectangle(1,y1,x2,y2); setfillstyle(1,6); bar(2,y1+1,x2-1,y2-1); setcolor(15); line(0,y2+1,81,y2+1); y1:=y1+21; y2:=y2+21 end; setcolor(10); x1:=7; y1:=1; x2:=80; y2:=20; j:=9; for i:=1 to 7 do begin if z=i then begin setfillstyle(1,9); bar(1,y1,x2,y2); setcolor(15); if i=7 then j:=24 else j:=9; outtextxy(j,x1,p[i]); end else if i=7 then j:=24 else j:=9; outtextxy(j,x1,p[i]); x1:=x1+21; y1:=y1+21; y2:=y2+21; rectangle(100,20,400,200); setfillstyle(7,1); bar(101,21,399,199); case z of 1:begin outtextxy(108,28,'Figura okrujnosti radiusa r i 8-'); outtextxy(107,36,'tockami pravilnogo mnogougolnika'); end; 2:begin outtextxy(108,28,'grafik funkcii'); outtextxy(102,36,' y= sqrt(exp(4*ln(x))+1)'); end; 3:begin outtextxy(108,28,'postroit krivye cissoida '); end; 4:begin outtextxy(108,28,'mnogestvo tocek, koordinat kotorih'); outtextxy(107,36,'udolitvoriut sleduihii sistemi ne-'); outtextxy(107,44,'ravenstv'); outtextxy(107,60,'2y>=sqr(x)+3x y=sqr(x)/2'); outtextxy(107,68,'y<=-2sqr(x)+3x y=-2sqr(x)+3'); end; 5:begin outtextxy(107,28,'dvigenie treugolnika'); end; 6:begin outtextxy(107,28,'roza vetrov'); end; 7:begin outtextxy(107,28,'eto nazivaets vixod'); end; end; end; setcolor(15); line(81,0,81,147); if s<>#0 then s:=readkey; end; procedure vixod; begin if s=#13 then halt; end; procedure triugolnik; const Y = 220; var g: Pointer; t: Word; begin setfillstyle(1,0); bar(0,0,640,480); Line(0, Y, 0, Y+30); Line(0, Y+30, 30, Y+15); Line(30, Y+15, 0, Y); GetMem(g, ImageSize(0, Y, 30, Y+30)); GetImage(0, Y, 30, Y+30, g^); OutTextXY(50,440,'dli vixoda nagmite lubui klavihu'); t := 0; While ( (not KeyPressed)and(t+30 <= GetMaxX) ) do begin PutImage(t, Y, g^, XORPUT); t := t + 1; PutImage(t, Y, g^, XORPUT); Delay(1000) end; PutImage(t-1, Y, g^, XORPUT); readkey; menu end; procedure krug; var pp:array[1..9] of pointtype; c,v:word; r,xm,ym:integer; begin rectangle(120,90,300,190); setfillstyle(7,0); bar(121,91,299,189); outtextxy(127,99,'vvedite radius= '); gotoxy(33,7); read(r); setfillstyle(1,0); bar(0,0,640,480); xm:=300; ym:=239; circle(xm,ym,r); pp[1].x:=xm+r; pp[1].y:=ym; pp[2].x:=xm+round(sqrt(sqr(r)/2)); pp[2].y:=ym-round(sqrt(sqr(r)/2)); pp[3].x:=xm; pp[3].y:=ym-r; pp[4].x:=xm-round(sqrt(sqr(r)/2)); pp[4].y:=ym-round(sqrt(sqr(r)/2)); pp[5].x:=xm-r; pp[5].y:=ym; pp[6].x:=xm-round(sqrt(sqr(r)/2)); pp[6].y:=ym+round(sqrt(sqr(r)/2)); pp[7].x:=xm; pp[7].y:=ym+r; pp[8].x:=xm+round(sqrt(sqr(r)/2)); pp[8].y:=ym+round(sqrt(sqr(r)/2)); pp[9]:=pp[1]; drawpoly(9,pp); xm:=xm+76; ym:=ym+16; OutTextXY(50,440,'dli vixoda nagmite lubui klavihu'); readkey; menu end; procedure perehod; begin while d= false do begin s:=readkey; while s=#80 do begin if z<7 then z:=z+1 else z:=1; menu end; while s=#72 do begin if z>1 then z:=z-1 else z:=7; menu end; while s=#13 do begin case z of 1:krug; 2..4erehod; 5:triugolnik; 6erehod; 7:vixod; end; end; end; end; begin clrscr; driverVar:=detect; initGraph(DriverVar,ModeVar,'..\bgi '); z:=1; menu; perehod; readkey end. |
08.12.2008, 14:10 | #2 |
Регистрация: 08.12.2008
Сообщений: 3
|
просмотрите пожалуйста
если есть возможность доработать там несколько пунктов, помагите!!!!!!!!!! |