Changeset 2385


Ignore:
Timestamp:
Feb 13, 2006, 3:04:04 PM (19 years ago)
Author:
nicholas
Message:

Removing generated files.

Location:
development/momentum_sink
Files:
8 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • development/momentum_sink/rotate_buildings.py

    r2379 r2385  
    1818
    1919    # Boundary of problem
    20     WidtH = 100 # width of boudary in metres
     20    WidtH = 200 # width of boudary in metres
    2121    #W = WidtH/8
    2222    #L = W
     
    2828    depth = 15 # depth of building side to oncoming wave
    2929    whs = depth/2
    30     breadth = 20 # breadth of building
     30    breadth = 15 # breadth of building
    3131    lhs = breadth/2
    3232
    3333    # Sample rotation Matrix
    34     Thd = 30 # Degrees
    35     Th = Thd * 3.14259/180 # Deg to Rad.
     34    #Thd = 30 # Degrees
     35    #Th = Thd * 3.14259/180 # Deg to Rad.
     36    Th = (30 *(3.142/180))
     37    #wh1 = (-whs) * math.cos(Th) + (-lhs) * math.sin(Th)
     38    #lh1 = (-lhs) * math.cos(Th) - (-whs) * math.sin(Th)
    3639
    37     wh1 = (-whs) * math.cos(Th) + (-lhs) * math.sin(Th)
    38     lh1 = (-lhs) * math.cos(Th) - (-whs) * math.sin(Th)
     40    #wh2 = (+whs) * math.cos(Th) + (-lhs) * math.sin(Th)
     41    #lh2 = (-lhs) * math.cos(Th) - (+whs) * math.sin(Th)
    3942
    40     wh2 = (+whs) * math.cos(Th) + (-lhs) * math.sin(Th)
    41     lh2 = (-lhs) * math.cos(Th) - (+whs) * math.sin(Th)
     43    #wh3 = (+whs) * math.cos(Th) + (+lhs) * math.sin(Th)
     44    #lh3 = (+lhs) * math.cos(Th) - (+whs) * math.sin(Th)
    4245
    43     wh3 = (+whs) * math.cos(Th) + (+lhs) * math.sin(Th)
    44     lh3 = (+lhs) * math.cos(Th) - (+whs) * math.sin(Th)
    45 
    46     wh4 = (-whs) * math.cos(Th) + (+lhs) * math.sin(Th)
    47     lh4 = (+lhs) * math.cos(Th) - (-whs) * math.sin(Th)
     46    #wh4 = (-whs) * math.cos(Th) + (+lhs) * math.sin(Th)
     47    #lh4 = (+lhs) * math.cos(Th) - (-whs) * math.sin(Th)
    4848
    4949    print "building footprint"
     
    6464        #Breadths = Breadths + BL/2
    6565        for B in Breadths:
     66            wh1 = (-whs) * math.cos(Th) + (-lhs) * math.sin(Th)
     67            lh1 = (-lhs) * math.cos(Th) - (-whs) * math.sin(Th)
     68            wh2 = (+whs) * math.cos(Th) + (-lhs) * math.sin(Th)
     69            lh2 = (-lhs) * math.cos(Th) - (+whs) * math.sin(Th)
     70            wh3 = (+whs) * math.cos(Th) + (+lhs) * math.sin(Th)
     71            lh3 = (+lhs) * math.cos(Th) - (+whs) * math.sin(Th)
     72            wh4 = (-whs) * math.cos(Th) + (+lhs) * math.sin(Th)
     73            lh4 = (+lhs) * math.cos(Th) - (-whs) * math.sin(Th)
    6674            polygon = [[D+wh1,B+lh1],[D+wh2,B+lh2],[D+wh3,B+lh3],[D+wh4,B+lh4]]
    6775            m.add_hole_from_polygon(polygon, tags={'wall':[0,1,2,3]})# Adds holes with reflective boundaries.       
    68        
     76            Th = Th + (37.3 *(3.142/180))
     77   
    6978
    7079            #print polygon
Note: See TracChangeset for help on using the changeset viewer.