jgraph.pas:
- unit jgraph;
- interface
- uses Graph;
- var
- gd, gm, iJ, jJ: integer;
- rJ, uJ, vJ, zJ: real;
- procedure JInit;
- function Jx(x: real): integer;
- function Jy(y: real): integer;
- procedure JMoveTo(x,y: real);
- procedure JLineTo(x,y: real);
- procedure JLine(x1,y1,x2,y2: real);
- implementation
- procedure JInit;
- begin
- InitGraph(gd,gm,'');
- rJ:= GetMaxY/GetMaxX;
- uJ:= GetMaxX;
- vJ:= GetMaxY/rJ;
- zJ:= 0.5/GetMaxX
- end;
- function Jx(x: real): integer;
- begin
- Jx:= Round(x*uJ)
- end;
- function Jy(y: real): integer;
- begin
- Jy:= Round((rJ-y)*vJ)
- end;
- procedure JMoveTo(x,y: real);
- begin
- MoveTo(Jx(x),Jy(y))
- end;
- procedure JLineTo(x,y: real);
- begin
- LineTo(Jx(x),Jy(y))
- end;
- procedure JLine(x1,y1,x2,y2: real);
- begin
- Line(Jx(x1),Jy(y1),Jx(x2),Jy(y2))
- end;
- begin
- end.
elka_z.pas:
- uses
- Graph, WinCrt, jgraph;
- procedure Elka(x,y,h,a,b,k: real);
- // x,y - coordinates of the base
- // h - hight
- // a,b - external & internal top angles, rad
- procedure Zigzag(y,h,a: real);
- var
- ta,tb,ty,r: real;
- begin
- ta:= Sin(a)/Cos(a);
- tb:= Sin(b)/Cos(b);
- ty:= h+y;
- JMoveTo(x,y);
- while ty-y>zJ do begin
- r:= h*ta;
- JLineTo(x-r,y);
- y:= y+Abs(r*tb*k);
- h:= ty-y;
- //for i:=1 to n do
- JLineTo(x-r*(1-k),y)
- end;
- end;
- begin
- SetColor(DarkGray);
- Zigzag(y,h,a);
- Zigzag(y,h,-a);
- SetFillStyle(SolidFill,random(15)+1);
- FloodFill(Jx(x),Jy(y)-1,DarkGray);
- SetColor(White);
- Zigzag(y,h,a);
- Zigzag(y,h,-a);
- end;
- var
- a: real;
- begin
- randomize;
- gd:=0;
- JInit;
- while not KeyPressed do begin
- a:= Pi/20+Pi/20*Random;
- Elka(
- Random,
- Random*Random*0.5,
- Random*rJ*0.6,
- a,
- (Pi/4-a)*(Random*0.25+0.7),
- 0.1+0.7*Random
- );
- Delay(300);
- end;
- readkey;
- CloseGraph;
- end.
Harrah's Cherokee Casino & Hotel - Mapyro
ReplyDeleteFind 대구광역 출장안마 Harrah's Cherokee Casino & Hotel, Murphy, 안성 출장샵 NC, United States, price, 양주 출장마사지 history and map, 100 photos, 제천 출장샵 driving directions and online services. 충주 출장마사지