User:Danny van der Kleij/Phillips Turtle

From XPUB & Lens-Based wiki


I wanted to reconstruct(sticking with the theme) Phillips Pavilion by Le Corbusier and Iannis Xenakis, in Inkscape and with Turtlegraphics.

I thought it would be somewhat easy since the pavilion is constructed with 9 Hyperbolic Paraboloids

but after a lot of trial and error I did not get very far.

disappointing results


def parallel(length, tilt, color):
  pd() 
  styles['fill'] = rgb(0, 0, color) 
  for i in range(2):
    fd(length)
    rt(90 - tilt)
    fd(length)
    rt(90 + tilt)
  pu()    
  fd(length)

def line(length, tilt, amount):
  for i in range(amount):
    parallel(length, tilt - i, 0 + (i* 4))
   

def block(length, tilt, amount, rows):
  for i in range(rows):
    line(length, tilt, amount)
    rt(90 - tilt )
    fd(length)
    rt(90 + tilt )
    fd(length * (amount + 1))
    rt(180 - 1)

block(10, 50, 60, 10)


  
def line(length):
  pd()
  fd(length)
  pu()
  
def grid(length, amount):
  for i in range(amount):
    line(length)
    rt(90+i)
    fd(10)
    rt(90+i)
    line(length)
    lt(90-i)
    fd(10)
    lt(90-i)

grid(100, 10)