Newsgroups: comp.graphics.visualization
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!news
From: S_WIEZORKE@iravcl.ira.uka.de (Hans B. Wiezorke)
Subject: TURTLE3D: another funny small program
Message-ID: <1991Jun7.162122.10504@ira.uka.de>
Sender: news@ira.uka.de (USENET News System)
Organization: University of Karlsruhe, FRG (Informatik Rechnerabteilung)
Date: Fri, 7 Jun 1991 17:11:12 GMT
X-News-Reader: VMS NEWS 1.07
Lines: 84

this is another small prgram using the turtle3d library posted a few days ago.
it's just for showing, what can be done using a turtleoid approach to 3D
graphics. ;-)

have fun,

opus

-------- cut here ------ PYRA.PAS ---------- cut here --------

uses turtle3d;

const angle = 19.5;

procedure pyra(n : byte; l : real);
var i : byte;
begin
  if n>1 then begin
    pyra(n-1, l/2);
    fd(l/2);
    pyra(n-1, l/2);
    rt(120);
    fd(l/2);
    lt(120);
    pyra(n-1, l/2);
    rt(60);
    bk(l/2);
    rl(angle);
    up(60);
    fd(l/2);
    rl(90);
    lt(60);
    pyra(n-1, l/2);
    rt(60);
    rr(90);
    bk(l/2);
    dn(60);
    rr(angle);
    lt(60)
  end
  else begin
    for i := 1 to 3 do begin
      fd(l);
      rr(angle);
      up(120);
      fd(l);
      bk(l);
      dn(120);
      rl(angle);
      rt(120);
    end
  end
end;

begin
  init3d;
  penup;
  bk(135);
  rt(90);
  rl(90);
  bk(240);
  lt(90);
  bk(80);
  rt(45);
  rr(8);
  pendown;
  pyra(4, 440);  { increment first parameter for more complicated picture}
  readln
end.


-------- cut here ------ PYRA.PAS ---------- cut here --------




 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
I                  __     I   Hans Bernhard Wiezorke  (at Uni. of Karlsruhe)  I
I /opus\    _____(@  \    I   E-Mail :  S_WIEZORKE@iravcl.ira.uka.de          I
I \sndo/   /.         !   I             or UK9K@DKAUNI2.bitnet  (better not)  I
I          ------)    !   I- - - - - - - - - - - - - - - - - - - - - - - - - -I 
I                X~~~~!   I   Always remember : WHEREVER YOU BE  --           I
I                         I                     THERE YOU ARE                 I
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
