|
| MAS ETH ARCH/CAAD - 2005/06 - STUDENT PAGES Master of Advanced Studies in Architecture, Specialization in Computer Aided Architectural Design | 065-0005/6 Supervision: Prof. Dr. Ludger Hovestadt, Philipp Schaerer Chair of CAAD, ETH Zurich skript01 Procedure mv09; VAR r,g,b : LONGINT; i,k : INTEGER; BEGIN; For k:=0 TO 8 DO BEGIN For i:=0 TO 8 DO BEGIN PenFore(Random *60000, 10000, 10000); moveto (0,0); LineTo(i*2,k*2); MoveObjs(1,1,False,False); END; END; END; run(mv09); PROCEDURE mv11; VAR rectWidth, rectHeight : INTEGER; i,k : INTEGER; startx,starty : INTEGER; aWidth, aHeight :INTEGER; BEGIN; PenFore(30000,20000,30000); FillBack(30000,50000,10000); rectWidth := 10; rectHeight := 30; For k:=0 to 20 DO BEGIN For i := 0 to 20 DO BEGIN startx := i*rectWidth; starty := k*rectHeight; aWidth := rectWidth; aHeight:= rectHeight; Rect(startX,startY,startX + aWidth,startY + aHeight); RotatePoint(0,0,10d); END; END; END; RUN(mv11); PROCEDURE mv03; VAR r,g,b : LONGINT; i,k,m,n : INTEGER; BEGIN; For k:=0 TO 8 DO BEGIN For i:=0 TO 8 DO BEGIN PenFore (Random *60000, 10000, 10000); MoveTo (0,0); LineTo (7,7); RotatePoint (0,0,15d); PenFore (40000, 10000, 10000); MoveTo (0,5); LineTo (5,5); MoveObjs(2,2,False,False); END; END; END; RUN (mv03); </verbatim> <br> <br> <img src="%ATTACHURLPATH%/StarShape.jpg" alt="StarShape.jpg" width="281" height="281"/> <br> <verbatim> PROCEDURE star; CONST n =15; VAR i,k,m : INTEGER; r,g,b : LONGINT; BEGIN ColorIndexToRGB (54,r,g,b); FillBAck(10000,50000,10000); PenFore(r,g,b); FOR m := 0 TO n-1 DO BEGIN k:=20; FOR i := 1 TO 10 DO BEGIN Rect(k,k,k+i,k+i); k:=k+i; END; RotatePoint(0,0,360/n*m); DSelectAll; END; END; RUN (star); </verbatim>
|
This website has been archived and is no longer maintained.