ETH Zuerich - Startseite
Professur für CAAD

 


caad d-arch


Caad Teaching
 

 
Bachelor of Architecture: CAAD II ss07

 
Master of Advanced Studies
in Architecture, CAAD


 
DWF-Processing
Programmieren statt Zeichnen


 
Graustufen - Ein Atlas
Schweizer Wohngebäude als XML Daten


 
DWF- Denken in Systemen:
In Collaboration with the Technical University Vienna


 
Seminarwoche:
BlowUp


 
Archiv

 
Caad Projects
 

 
Theory
 
Design
 
Building
 
Practice

 
Related pages
 

 
Swiss Federal Institute of Technology Zurich
 
Institute of Building Technology
 
Faculty of Architecture

 
Other pages

 










hbt d-arch

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








PROCEDURE curve;

VAR

   i, j, k, n, x1, y1, g, gg, ggg, gggg : longint;    

   hight1, hight2, hight3, hight4, hight5, hight6, hight7, hight8, hight9 : real ;
 
   ax1, ay1, bx1, by1,    ax2, ay2, bx2, by2,    ax3, ay3, bx3, by3,    ax4, ay4, bx4, by4,    ax5, ay5, bx5, by5,   ax6, ay6, bx6, by6,   ax7, ay7, bx7, by7,      ax8, ay8, bx8, by8,      ax9, ay9, bx9, by9  : real;

            ex1, ey1,          ex2, ey2,          ex3, ey3,          ex4, ey4,          ex5, ey5,                  ex6, ey6 ,                 ex7, ey7,      ex8, ey8      : real ;

   g1, g2, g3, g4, g5, g6, g7, g8 : integer ;

   midx1, midx2, midx3, midx4, midx5, midx6, midx7, midx8 : real ;
   midy1, midy2, midy3, midy4, midy5, midy6, midy7, midy8 : real ;
   
   l : real;

   mypoly1 : handle ;

   finalh, finalx, side1, side2, side3, side4, side5, side6, side7, side8, side9 : integer ;

 {**********************************************************************************   begin   **********************************************************************************}

BEGIN

For k:=1 to 1 do begin

g :=70 ; gg := 15; ggg := 150; gggg :=ggg-10; finalh := -120 ; finalx := 200 ;

{******************************************************************************************   1st curve  ****}
   
hight1 := IntDialog('Please enter the hight of the curve:(1-10)','1');
side1 := IntDialog('Please enter the direction of the next curve:(1-0)','1');

if side1 = 1 then begin

beginpoly; 

   FOR i:=5 TO 35 DO BEGIN
      l:= i/3.14;
      Addpoint(i+k,(hight1*cos(l))) ;
      
   if i = 20 then begin
      line(ggg, y1);
      moveto(i+k,(hight1*cos(l))) ;
      ay1 := (hight1*cos(l)) ;
      ax1 := (i+k) ;
      end;
   
   if i=30 then begin
      line(gggg, y1);
      moveto(i+k,(hight1*cos(l))) ;
      by1 := (hight1*cos(l)) ;
      bx1 := (i+k) ;
           END;
   end;

   hight1 := ay1-by1 ;                     

endpoly; 

beginpoly;

   FOR i:=1 TO finalx DO BEGIN

   l:= i/3.14;

    Addpoint(i+k,finalh+(hight1*cos(l))) ;
   end;

endpoly;

end else begin

{**************************  second *************************}

beginpoly;

   FOR i:=-5 TO 25 DO BEGIN

   l:= i/3.14;

   Addpoint(i+k+10,(hight1*cos(l))) ;
   GetPolyPt ( mypoly1, n, x1, y1 ) ;  

   if i = 10 then begin
      line(ggg, y1);
      moveto(i+k+10,(hight1*cos(l))) ;
      ay1 := (hight1*cos(l)-g4) ;
      ax1 := (i+k) ;
      end;
   
   if i=20 then begin   
      line(gggg, y1);
      moveto(i+k+10,(hight1*cos(l))) ;
      by1 := (hight1*cos(l)) ;
      bx1 := (i+k) ;
           END;

   end;

endpoly;


beginpoly;

   FOR i:=-10 TO finalx-10 DO BEGIN

   l:= i/3.14;

    Addpoint(i+k+10,finalh+(hight1*cos(l))) ;
   end;

endpoly;

end;

{******************************************************************************************   2nd curve  ****}
   
hight2 := IntDialog('Please enter the hight of the curve:(1-10)','4');
g1 := IntDialog('Please enter the gap of the next curve:(1-10)','13');
side2 := IntDialog('Please enter the direction of the next curve:(1-0)','1');

if side2 = 1 then begin

beginpoly;

   FOR i:=5 TO 35 DO BEGIN

   l:= i/3.14;

    Addpoint(i+k,(hight2*cos(l))-g1) ;

   GetPolyPt ( mypoly1, n, x1, y1 ) ;  

   if i = 20 then begin 
      line(ggg, y1);
      moveto(i+k,(hight2*cos(l))-g1) ;
      ay2 := (hight2*cos(l)-g1) ;
      ax2 := (i+k) ;
      end;
   
   if i=30 then begin   
      line(gggg, y1);
      moveto(i+k,(hight2*cos(l))-g1) ;
      by2 := (hight2*cos(l)-g1) ;
      bx2 := (i+k) ;
           END;

   end;

endpoly;

beginpoly;

   FOR i:=1 TO finalx DO BEGIN

   l:= i/3.14;

    Addpoint(i+k,finalh+(hight2*cos(l))-g1) ;
   end;

endpoly;

end else begin

{**************************  second *************************}

beginpoly;

   FOR i:=-5 TO 25 DO BEGIN

   l:= i/3.14;

   Addpoint(i+k+10,(hight2*cos(l))-g1) ;
   GetPolyPt ( mypoly1, n, x1, y1 ) ;  

   if i = 10 then begin
      line(ggg, y1);
      moveto(i+k+10,(hight2*cos(l))-g1) ;
      ay2 := (hight2*cos(l)-g1) ;
      ax2 := (i+k) ;
      end;
   
   if i=20 then begin   
      line(gggg, y1);
      moveto(i+k+10,(hight2*cos(l))-g1) ;
      by2 := (hight2*cos(l)-g1) ;
      bx2 := (i+k) ;
           END;

   end;

endpoly;

beginpoly;

   FOR i:=-10 TO finalx-10 DO BEGIN

   l:= i/3.14;

    Addpoint(i+k+10,finalh+(hight2*cos(l))-g1) ;
   end;

endpoly;

end;
   
{******************************************************************************************   3rd curve  ****}
   
hight3 := IntDialog('Please enter the hight of the curve:(1-10)','2');
g2 := g1+IntDialog('Please enter the gap of the next curve:(1-10)','15');
side3 := IntDialog('Please enter the direction of the next curve:(1-0)','1');

if side3 = 1 then begin

beginpoly;

   FOR i:=5 TO 35 DO BEGIN

   l:= i/3.14;

   Addpoint(i+k,(hight3*cos(l))-g2) ;
   GetPolyPt ( mypoly1, n, x1, y1 ) ;  

   if i = 20 then begin
      line(ggg, y1);
      moveto(i+k,(hight3*cos(l))-g2) ;
      ay3 := (hight3*cos(l)-g2) ;
      ax3 := (i+k) ;
      end;
   
   if i=30 then begin   
      line(gggg, y1);
      moveto(i+k,(hight3*cos(l))-g2) ;
      by3 := (hight3*cos(l)-g2) ;
      bx3 := (i+k) ;
           END;

   end;

endpoly;

beginpoly;

   FOR i:=1 TO finalx DO BEGIN

   l:= i/3.14;

    Addpoint(i+k,finalh+(hight3*cos(l))-g2) ;
   end;

endpoly;

end else begin

{**************************  second *************************}

beginpoly;

   FOR i:=-5 TO 25 DO BEGIN

   l:= i/3.14;

   Addpoint(i+k+10,(hight3*cos(l))-g2) ;
   GetPolyPt ( mypoly1, n, x1, y1 ) ;  

   if i = 10 then begin
      line(ggg, y1);
      moveto(i+k+10,(hight3*cos(l))-g2) ;
      ay3 := (hight3*cos(l)-g2) ;
      ax3 := (i+k) ;
      end;
   
   if i=20 then begin   
      line(gggg, y1);
      moveto(i+k+10,(hight3*cos(l))-g2) ;
      by3 := (hight3*cos(l)-g2) ;
      bx3 := (i+k) ;
           END;

   end;

endpoly;

beginpoly;

   FOR i:=-10 TO finalx-10 DO BEGIN

   l:= i/3.14;

    Addpoint(i+k+10, finalh+(hight3*cos(l))-g2) ;
   end;

endpoly;

end;

{******************************************************************************************   4th curve  ****}

hight4 := IntDialog('Please enter the hight of the curve:(1-10)','2');
g3 := g2+IntDialog('Please enter the gap of the next curve:(1-10)','6');
side4 := IntDialog('Please enter the direction of the next curve:(1-0)','1');

if side4 = 1 then begin

beginpoly;

   FOR i:=5 TO 35 DO BEGIN

   l:= i/3.14;

   Addpoint(i+k,(hight4*cos(l))-g3) ;
   GetPolyPt ( mypoly1, n, x1, y1 ) ;  

   if i = 20 then begin
      line(ggg, y1);
      moveto(i+k,(hight4*cos(l))-g3) ;
      ay4 := (hight4*cos(l)-g3) ;
      ax4 := (i+k) ;
      end;
   
   if i=30 then begin   
      line(gggg, y1);
      moveto(i+k,(hight4*cos(l))-g3) ;
      by4 := (hight4*cos(l)-g3) ;
      bx4 := (i+k) ;
           END;

   end;

endpoly;

beginpoly;

   FOR i:=1 TO finalx DO BEGIN

   l:= i/3.14;

    Addpoint(i+k,finalh+(hight4*cos(l))-g3) ;
   end;

endpoly;

end else begin

{**************************  second *************************}

beginpoly;

   FOR i:=-5 TO 25 DO BEGIN

   l:= i/3.14;

   Addpoint(i+k+10,(hight4*cos(l))-g3) ;
   GetPolyPt ( mypoly1, n, x1, y1 ) ;  

   if i = 10 then begin
      line(ggg, y1);
      moveto(i+k+10,(hight4*cos(l))-g3) ;
      ay4 := (hight4*cos(l)-g3) ;
      ax4 := (i+k) ;
      end;
   
   if i=20 then begin   
      line(gggg, y1);
      moveto(i+k+10,(hight4*cos(l))-g3) ;
      by4 := (hight4*cos(l)-g3) ;
      bx4 := (i+k) ;
           END;

   end;

endpoly;

beginpoly;

   FOR i:=-10 TO finalx-10 DO BEGIN

   l:= i/3.14;

    Addpoint(i+k+10,finalh+(hight4*cos(l))-g3) ;
   end;

endpoly;

end;

{******************************************************************************************   5th curve  ****}

hight5 := IntDialog('Please enter the hight of the curve:(1-10)','4');
g4 := g3+IntDialog('Please enter the gap of the next curve:(1-10)','8');
side5 := IntDialog('Please enter the direction of the next curve:(1-0)','0');

if side5 = 1 then begin

beginpoly;

   FOR i:=5 TO 35 DO BEGIN

   l:= i/3.14;

   Addpoint(i+k,(hight5*cos(l))-g4) ;
   GetPolyPt ( mypoly1, n, x1, y1 ) ;  

   if i = 20 then begin
      line(ggg, y1);
      moveto(i+k,(hight5*cos(l))-g4) ;
      ay5 := (hight5*cos(l)-g4) ;
      ax5 := (i+k) ;
      end;
   
   if i=30 then begin   
      line(gggg, y1);
      moveto(i+k,(hight5*cos(l))-g4) ;
      by5 := (hight5*cos(l)-g4) ;
      bx5 := (i+k) ;
           END;

   end;

endpoly;

beginpoly;

   FOR i:=1 TO finalx DO BEGIN

   l:= i/3.14;

    Addpoint(i+k,finalh+(hight5*cos(l))-g4) ;
   end;

endpoly;

end else begin

{**************************  second *************************}

beginpoly;

   FOR i:=-5 TO 25 DO BEGIN

   l:= i/3.14;

   Addpoint(i+k+10,(hight5*cos(l))-g4) ;
   GetPolyPt ( mypoly1, n, x1, y1 ) ;  

   if i = 10 then begin
      line(ggg, y1);
      moveto(i+k+10,(hight5*cos(l))-g4) ;
      ay5 := (hight5*cos(l)-g4) ;
      ax5 := (i+k) ;
      end;
   
   if i=20 then begin   
      line(gggg, y1);
      moveto(i+k+10,(hight5*cos(l))-g4) ;
      by5 := (hight5*cos(l)-g4) ;
      bx5 := (i+k) ;
           END;

   end;

endpoly;

beginpoly;

   FOR i:=-10 TO finalx-10 DO BEGIN

   l:= i/3.14;

    Addpoint(i+k+10,finalh+(hight5*cos(l))-g4) ;
   end;

endpoly;

end;

{******************************************************************************************   6th curve  ****}

hight6 := IntDialog('Please enter the hight of the curve:(1-10)','1');
g5 := g4+IntDialog('Please enter the gap of the next curve:(1-10)','7');
side6 := IntDialog('Please enter the direction of the next curve:(1-0)','0');

if side6 = 1 then begin

beginpoly;

   FOR i:=5 TO 35 DO BEGIN

   l:= i/3.14;

   Addpoint(i+k,(hight6*cos(l))-g5) ;
   GetPolyPt ( mypoly1, n, x1, y1 ) ;  

   if i = 20 then begin
      line(ggg, y1);
      moveto(i+k,(hight6*cos(l))-g5) ;
      ay6 := (hight6*cos(l)-g5) ;
      ax6 := (i+k) ;
      end;
   
   if i=30 then begin   
      line(gggg, y1);
      moveto(i+k,(hight6*cos(l))-g5) ;
      by6 := (hight6*cos(l)-g5) ;
      bx6 := (i+k) ;
           END;

   end;

endpoly;

beginpoly;

   FOR i:=1 TO finalx DO BEGIN

   l:= i/3.14;

    Addpoint(i+k,finalh+(hight6*cos(l))-g5) ;
   end;

endpoly;

end else begin

{**************************  second *************************}

beginpoly;

   FOR i:=-5 TO 25 DO BEGIN

   l:= i/3.14;

   Addpoint(i+k+10,(hight6*cos(l))-g5) ;
   GetPolyPt ( mypoly1, n, x1, y1 ) ;  

   if i = 10 then begin
      line(ggg, y1);
      moveto(i+k+10,(hight6*cos(l))-g5) ;
      ay6 := (hight6*cos(l)-g5) ;
      ax6 := (i+k) ;
      end;
   
   if i=20 then begin   
      line(gggg, y1);
      moveto(i+k+10,(hight6*cos(l))-g5) ;
      by6 := (hight6*cos(l)-g5) ;
      bx6 := (i+k) ;
           END;

   end;

endpoly;

beginpoly;

   FOR i:=-10 TO finalx-10 DO BEGIN

   l:= i/3.14;

    Addpoint(i+k+10,finalh+(hight6*cos(l))-g5) ;
   end;

endpoly;

end;

{******************************************************************************************   7th curve  ****}

hight7 := IntDialog('Please enter the hight of the curve:(1-10)','3');
g6 := g5+IntDialog('Please enter the gap of the next curve:(1-10)','7');
side7 := IntDialog('Please enter the direction of the next curve:(1-0)','1');

if side5 = 1 then begin

beginpoly;

   FOR i:=5 TO 35 DO BEGIN

   l:= i/3.14;

   Addpoint(i+k,(hight7*cos(l))-g6) ;
   GetPolyPt ( mypoly1, n, x1, y1 ) ;  

   if i = 20 then begin
      line(ggg, y1);
      moveto(i+k,(hight7*cos(l))-g6) ;
      ay7 := (hight7*cos(l)-g6) ;
      ax7 := (i+k) ;
      end;
   
   if i=30 then begin   
      line(gggg, y1);
      moveto(i+k,(hight7*cos(l))-g6) ;
      by7 := (hight7*cos(l)-g6) ;
      bx7 := (i+k) ;
           END;

   end;

endpoly;

beginpoly;

   FOR i:=1 TO finalx DO BEGIN

   l:= i/3.14;

    Addpoint(i+k,finalh+(hight7*cos(l))-g6) ;
   end;

endpoly;

end else begin

{**************************  second *************************}

beginpoly;

   FOR i:=-5 TO 25 DO BEGIN

   l:= i/3.14;

   Addpoint(i+k+10,(hight7*cos(l))-g6) ;
   GetPolyPt ( mypoly1, n, x1, y1 ) ;  

   if i = 10 then begin
      line(ggg, y1);
      moveto(i+k+10,(hight7*cos(l))-g6) ;
      ay7 := (hight7*cos(l)-g6) ;
      ax7 := (i+k) ;
      end;
   
   if i=20 then begin   
      line(gggg, y1);
      moveto(i+k+10,(hight7*cos(l))-g6) ;
      by7 := (hight7*cos(l)-g6) ;
      bx7 := (i+k) ;
           END;

   end;

endpoly;

beginpoly;

   FOR i:=-10 TO finalx-10 DO BEGIN

   l:= i/3.14;

    Addpoint(i+k+10,finalh+(hight7*cos(l))-g6) ;
   end;

endpoly;


end;

{******************************************************************************************   8th curve  ****}

hight8 := IntDialog('Please enter the hight of the curve:(1-10)','1');
g7 := g6+IntDialog('Please enter the gap of the next curve:(1-10)','8');
side8 := IntDialog('Please enter the direction of the next curve:(1-0)','1');

if side6 = 1 then begin

beginpoly;

   FOR i:=5 TO 35 DO BEGIN

   l:= i/3.14;

   Addpoint(i+k,(hight8*cos(l))-g7) ;
   GetPolyPt ( mypoly1, n, x1, y1 ) ;  

   if i = 20 then begin
      line(ggg, y1);
      moveto(i+k,(hight8*cos(l))-g7) ;
      ay8 := (hight8*cos(l)-g7) ;
      ax8 := (i+k) ;
      end;
   
   if i=30 then begin   
      line(gggg, y1);
      moveto(i+k,(hight8*cos(l))-g7) ;
      by8 := (hight8*cos(l)-g7) ;
      bx8 := (i+k) ;
           END;
   end;

endpoly;

beginpoly;

   FOR i:=1 TO finalx DO BEGIN

   l:= i/3.14;

    Addpoint(i+k, finalh+(hight8*cos(l))-g7) ;
   end;

endpoly;

end else begin

{**************************  second *************************}

beginpoly;

   FOR i:=-5 TO 25 DO BEGIN

   l:= i/3.14;

   Addpoint(i+k+10,(hight8*cos(l))-g7) ;
   GetPolyPt ( mypoly1, n, x1, y1 ) ;  

   if i = 10 then begin
      line(ggg, y1);
      moveto(i+k+10,(hight8*cos(l))-g7) ;
      ay8 := (hight8*cos(l)-g7) ;
      ax8 := (i+k) ;
      end;   
   if i=20 then begin   
      line(gggg, y1);
      moveto(i+k+10,(hight8*cos(l))-g7) ;
      by8 := (hight8*cos(l)-g7) ;
      bx8:= (i+k) ;
           END;
   end;

endpoly;

beginpoly;

   FOR i:=-10 TO finalx-10 DO BEGIN

   l:= i/3.14;

    Addpoint(i+k+10,finalh+(hight8*cos(l))-g7) ;
   end;

endpoly;

end;

{******************************************************************************************   9th curve  ****}

hight9 := IntDialog('Please enter the hight of the curve:(1-10)','3');
g8 := g7+IntDialog('Please enter the gap of the next curve:(1-10)','13');
side9 := IntDialog('Please enter the direction of the next curve:(1-0)','1');

if side7 = 1 then begin

beginpoly;

   FOR i:=5 TO 35 DO BEGIN

   l:= i/3.14;

   Addpoint(i+k,(hight9*cos(l))-g8) ;
   GetPolyPt ( mypoly1, n, x1, y1 ) ;  

   if i = 20 then begin
      line(ggg, y1);
      moveto(i+k,(hight9*cos(l))-g8) ;
      ay9 := (hight9*cos(l)-g8) ;
      ax9 := (i+k) ;
      end;
   
   if i=30 then begin   
      line(gggg, y1);
      moveto(i+k,(hight9*cos(l))-g8) ;
      by9 := (hight9*cos(l)-g8) ;
      bx9 := (i+k) ;
           END;

   end;

endpoly;

beginpoly;

   FOR i:=1 TO finalx DO BEGIN

   l:= i/3.14;

    Addpoint(i+k,finalh+(hight9*cos(l))-g8) ;
   end;

endpoly;

end else begin

{**************************  second *************************}

beginpoly;

   FOR i:=-5 TO 25 DO BEGIN

   l:= i/3.14;

   Addpoint(i+k+10,(hight9*cos(l))-g8) ;
   GetPolyPt ( mypoly1, n, x1, y1 ) ;  

   if i = 10 then begin
      line(ggg, y1);
      moveto(i+k+10,(hight9*cos(l))-g8) ;
      ay9 := (hight9*cos(l)-g8) ;
      ax9 := (i+k) ;
      end;
   
   if i=20 then begin   
      line(gggg, y1);
      moveto(i+k+10,(hight9*cos(l))-g8) ;
      by9 := (hight9*cos(l)-g8) ;
      bx9:= (i+k) ;
           END;

   end;

endpoly;

beginpoly;

   FOR i:=-10 TO finalx-10 DO BEGIN

   l:= i/3.14;

    Addpoint(i+k+10,finalh+(hight9*cos(l))-g8) ;
   end;

endpoly;

end;

END;
{******************************************************************************************   1st ana  ****}
if side1 = 1 then begin

rect    (g, ay1, g+gg, by1);

         moveto(g, ay1) ;   lineto(g+gg, by1) ;
         ex1 := (g+gg)+(gg*(by1-ay2))/(ay1-by1) ;
         ey1 := by1-(by1-ay2) ;
         moveto(g+gg, by1) ;   lineto(ex1, ey1) ;
         midx1 := (g+ex1)/2 ;  midy1 := (ay1+ey1)/2 ;

end else begin

   rect    (g, ay1, g+gg, by1);

         moveto(g, by1) ;   lineto(g+gg, ay1) ;
         ex1 := (g+gg)+(gg*(ay1-by2))/(by1-ay1) ;
         ey1 := ay1-(ay1-by2) ;
         moveto(g+gg, ay1) ;   lineto(ex1, ey1) ;
         midx1 := (g+ex1)/2 ;  midy1 := (by1+ey1)/2 ;

end;

{******************************************************************************************   2nd ana  ****}
if side2 = 1 then begin

rect    (ex1, ay2, ex1-gg, by2);

         moveto(ex1, ay2) ;   lineto(ex1-gg, by2) ;
         ex2 := (ex1-gg)-(gg*(by2-ay3))/(ay2-by2) ;
         ey2 := by2-(by2-ay3) ;
         moveto(ex1-gg, by2) ;   lineto(ex2, ey2) ;
         midx2 := (ex1+ex2)/2 ;      midy2 := (ay2+ey2)/2 ;

end else begin

   rect    (ex1, by2, ex1-gg, ay2);

         moveto(ex1, by2) ;   lineto(ex1-gg, ay2) ;
         ex2 := (ex1-gg)-(gg*(ay2-by3))/(by2-ay2) ;
         ey2 := ay2-(ay2-by3) ;
         moveto(ex1-gg, ay2) ;   lineto(ex2, ey2) ;
         midx2 := (ex1+ex2)/2 ;      midy2 := (by2+ey2)/2 ;

end;

{******************************************************************************************   3rd ana  ****}
if side3 = 1 then begin

rect    (ex2, ay3, ex2+gg, by3);

         moveto(ex2, ay3) ;   lineto(ex2+gg, by3) ;
         ex3 := (ex2+gg)+(gg*(by3-ay4))/(ay3-by3) ;
         ey3 := by3-(by3-ay4) ;
         moveto(ex2+gg, by3) ;   lineto(ex3, ey3) ;
         midx3 := (ex2+ex3)/2 ;   midy3 := (ay3+ey3)/2 ;

end else begin

   rect    (ex2, by3, ex2+gg, ay3);

         moveto(ex2, by3) ;   lineto(ex2+gg, ay3) ;
         ex3 := (ex2+gg)+(gg*(ay3-by4))/(by3-ay3) ;
         ey3 := ay3-(ay3-by4) ;
         moveto(ex2+gg, ay3) ;   lineto(ex3, ey3) ;
         midx3 := (ex2+ex3)/2 ;   midy3 := (by3+ey3)/2 ;

end;

{******************************************************************************************   4th ana  ****}
if side4 = 1 then begin

   rect    (ex3, ay4, ex3-gg, by4);

         moveto(ex3, ay4) ;   lineto(ex3-gg, by4) ;
         ex4 := (ex3-gg)-(gg*(by4-ay5))/(ay4-by4) ;
         ey4 := by4-(by4-ay5) ;
         moveto(ex3-gg, by4) ;   lineto(ex4, ey4) ;
         midx4 := (ex3+ex4)/2;    midy4 := (ay4+ey4)/2 ;

end else begin

   rect    (ex3, by4, ex3-gg, ay4);

         moveto(ex3, by4) ;   lineto(ex3-gg, ay4) ;
         ex4 := (ex3-gg)-(gg*(ay4-by5))/(by4-ay4) ;
         ey4 := ay4-(ay4-by5) ;
         moveto(ex3-gg, ay4) ;   lineto(ex4, ey4) ;
         midx4 := (ex3+ex4)/2;    midy4 := (by4+ey4)/2 ;
end;


{******************************************************************************************   5th ana  ****}
if side5 = 1 then begin

   rect    (ex4, ay5, ex4+gg, by5);

         moveto(ex4, ay5) ;   lineto(ex4+gg, by5) ;
         ex5 := (ex4+gg)+(gg*(by5-ay6))/(ay5-by5) ;
         ey5 := by5-(by5-ay6) ;
         moveto(ex4+gg, by5) ;   lineto(ex5, ey5) ;
         midx5 := (ex4+ex5)/2 ;   midy5 := (ay5+ey5)/2 ;

end else begin

   rect    (ex4, by5, ex4+gg, ay5);

         moveto(ex4, by5) ;   lineto(ex4+gg, ay5) ;
         ex5 := (ex4+gg)+(gg*(ay5-by6))/(by5-ay5) ;
         ey5 := ay5-(ay5-by6) ;
         moveto(ex4+gg, ay5) ;   lineto(ex5, ey5) ;
         midx5 := (ex4+ex5)/2 ;   midy5 := (by5+ey5)/2 ;
end;

{******************************************************************************************   6th ana  ****}
if side6 = 1 then begin

   rect    (ex5, ay6, ex5-gg, by6);

         moveto(ex5, ay6) ;   lineto(ex5-gg, by6) ;
         ex6 := (ex5-gg)-(gg*(by6-ay7))/(ay6-by6) ;
         ey6 := by6-(by6-ay7) ;
         moveto(ex5-gg, by6) ;   lineto(ex6, ey6) ;
         midx6 := (ex5+ex6)/2 ;   midy6 := (ay6+ey6)/2 ;

end else begin

   rect    (ex5, by6, ex5-gg, ay6);

         moveto(ex5, by6) ;   lineto(ex5-gg, ay6) ;
         ex6 := (ex5-gg)-(gg*(ay6-by7))/(by6-ay6) ;
         ey6 := ay6-(ay6-by7) ;
         moveto(ex5-gg, ay6) ;   lineto(ex6, ey6) ;
         midx6 := (ex5+ex6)/2 ;   midy6 := (by6+ey6)/2 ;

end;

{******************************************************************************************   7th ana  ****}
if side7 = 1 then begin

   rect    (ex6, ay7, ex6+gg, by7);

         moveto(ex6, ay7) ;   lineto(ex6+gg, by7) ;
         ex7 := (ex6+gg)+(gg*(by7-ay8))/(ay7-by7) ;
         ey7 := by7-(by7-ay8) ;
         moveto(ex6+gg, by7) ;   lineto(ex7, ey7) ;
         midx7 := (ex6+ex7)/2 ;   midy7 := (ay7+ey7)/2 ;

end else begin

   rect    (ex6, by7, ex6+gg, ay7);

         moveto(ex6, by7) ;   lineto(ex6+gg, ay7) ;
         ex7 := (ex6+gg)+(gg*(ay7-by8))/(by7-ay7) ;
         ey7 := ay7-(ay7-by8) ;
         moveto(ex6+gg, ay7) ;   lineto(ex7, ey7) ;
         midx7 := (ex6+ex7)/2 ;   midy7 := (by7+ey7)/2 ;

end;

{******************************************************************************************   8th ana  ****}
if side8 = 1 then begin

   rect    (ex7, ay8, ex7-gg, by8);

         moveto(ex7, ay8) ;   lineto(ex7-gg, by8) ;
         ex8 := (ex7-gg)-(gg*(by8-ay9))/(ay8-by8) ;
         ey8 := by8-(by8-ay9) ;
         moveto(ex7-gg, by8) ;   lineto(ex8, ey8) ;
         midx8 := (ex7+ex8)/2 ;   midy8 := (ay8+ey8)/2 ;

end else begin

   rect    (ex7, by8, ex7-gg, ay8);

         moveto(ex7, by8) ;   lineto(ex7-gg, ay8) ;
         ex8 := (ex7-gg)-(gg*(ay8-by9))/(by8-ay8) ;
         ey8 := ay8-(ay8-by9) ;
         moveto(ex7-gg, ay8) ;   lineto(ex8, ey8) ;
         midx8 := (ex7+ex8)/2 ;   midy8 := (by8+ey8)/2 ;

end;

{********************   center    **********************}

beginpoly;

   Addpoint(midx1, midy1) ;
   Addpoint(midx2, midy2) ;   
   Addpoint(midx3, midy3) ;
   Addpoint(midx4, midy4) ;
   Addpoint(midx5, midy5) ;
   Addpoint(midx6, midy6) ;   
   Addpoint(midx7, midy7) ;
   Addpoint(midx8, midy8) ;      

endpoly;

END;

run(curve);



-- NDSDongYounShin - 08 Dec 2005

Revision r1.1 - 08 Dec 2005 - 09:12 - NDSDongYounShin
Parents: Smodule1-4
Copyright © 1999-2003 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

This website has been archived and is no longer maintained.