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





BACK...

__________________________________________________________________________________________________________________________

THE IDEA WITH A REKURSION TREE TO CREATE A MAIN STRUCTURE

Skizze_Rekursion_01.jpg

__________________________________________________________________________________________________________________________

...AND THE TRIALS TO SCRIPT IT...

Bild_2_1_02.jpg

__________________________________________________________________________________________________________________________

...BUT THE PROBLEM IS TO DEFINE THE EXACT DIRECTION OF THE GROWING AND ALSO TO GET SOME
HANDLES TO THE CONNECTORS AND ENDPOINTS FOR FURTHER DEVELOPMENTS.

Bild_1_01.jpg

Bild_1_03.jpg

Bild_18.jpg __________________________________________________________________________________________________________________________

PROCEDURE Rekursion;

VAR
   length:REAL;
   winkel01,winkel02: REAL;
   x,y:REAL;
   startX1,startY1:REAL;
   Level:INTEGER;

   h,myLine:HANDLE;
   m,i:INTEGER;
   startx,starty,endx,endy:REAL;
   
   n:LONGINT;
   

   Procedure    branch(startX1,startY1,Length, winkel01,winkel02:REAL;Level:INTEGER);
   BEGIN;anglevar;
      IF Level<7 THEN BEGIN
         moveto(startX1,startY1);   
         lineto(length,#winkel01);
         PenLoc(x,y);         
         startX1:=x;
         startY1:=y;
         branch(startX1,startY1,Length*0.5*(1+random),winkel01*0.5*(1+random)-winkel02*0.5*(1+random),winkel02*0.5*(1+random),Level+1);
         branch(startX1,startY1,Length*0.5*(1+random),winkel01*0.5*(1+random)+winkel02*0.5*(1+random),winkel02*0.5*(1+random),Level+1);

      END;
      noAnglevar;
   END;

(* HALBIEREN *)   

   Procedure myDivide01(x1,y1,x2,y2:REAL);
   VAR
   c,newX, newY : REAL;
   
   BEGIN
      newX := (x2 + x1)/2;
      newY := (y2 + y1)/2;
      c:=Abs(Distance(x1,y1,x2,y2));
   
      IF c>20 THEN BEGIN
         myDivide01(x1,y1,newX,newY);
         myDivide01(newX,newY,x2,y2);
      END;

      IF c < 20 THEN BEGIN
         MoveTo(x1,y1);
         LineTo(x2,y2);
      END;
   END;

(* HAUPTSCRIPT *)
BEGIN

(* AUFRUF REKURSION *)
      length:=50;
      Level:=1;
      winkel01:=90;
      winkel02:=30;
      
      branch(startX1,startY1,Length,winkel01,winkel02, Level);

(* AUFRUF HALBIEREN *)

   h:= LNewObj;
   h:=GetLayer(h);

   n:=NumObj(h);
   FOR m:= 1 To n  DO BEGIN

      myLine:=FObject;

      GetSegPt1(myLine,startx,starty);
      GetSegPt2(myLine,endx,endy);
      
      myDivide01(startx,starty,endx,endy);
      DelObject(myLine);
      myLine:=NextObj(myLine);
   END;
END;

RUN (Rekursion);





-- NDSMatthiasZaeh - 08 Dec 2005

Revision r1.2 - 08 Dec 2005 - 10:42 - NDSMatthiasZaeh
Parents: WebHome > NDSMatthiasZaeh
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.