Results 1 to 10 of 32

Thread: Need some programming help

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #25

    Post

    I hope you don't mind. I merged your cfdg file with the "bad urban planning" one (can't remember if it's part of Context Free or a freebie I downloaded for it somewhere) and came up with this...

    Code:
    startshape RURALTOWN
    
    rule RURALTOWN {
      STREET { }
      STREET { rotate 89 }
      STREET { rotate 180 }
    }
    
    rule STREET 2505  {
      CIRCLE{ }
      STREET { rotate 0.05 size 0.9995 y 0.1 }
    }
    
    
    rule STREET 2500  {
      CIRCLE{ }
      STREET { rotate -0.05 y 0.1 }
    }
    
    rule STREET 8 {
      CIRCLE{ }
      STREET { rotate -0.05 size 0.9995 y 0.1 }
      Building { x 5}
    }
    
    rule STREET 6 {
     CIRCLE{ }
      STREET { rotate -0.05 y 0.1 }
      Building { x -5 rotate 180 }
    }
    
    rule STREET 1  {
      CIRCLE{ }
      STREET { rotate 0.05 y 0.1 }
      STREET { rotate 90.05 size 0.95 y 0.1 }
      STREET { rotate -89 y 0.1 size 1.1 }
        Building { x -5 rotate 180 }
    }
    
    rule STREET 1  {
      CIRCLE{ }
      STREET { rotate 0.05 y 0.1 }
      STREET { rotate 90.05 size 0.98 y 0.1 }
      Building { x 334 rotate 180 }
    }
    
    rule STREET 2  {
      CIRCLE{ }
      STREET { rotate 0.05 y 0.1 }
      STREET { rotate -90.05 size 0.8 y 0.1 }
    
    }
    
    rule STREET 2 {
       CIRCLE { }
    }
    
    rule BuildingPart {
    	SQUARE { s 2 4 }
    }
    
    rule BuildingPart {
    	SQUARE { s 3 4 }
    }
    
    rule BuildingPart 0.1 {
    	SQUARE { s 3 4 }
    	CIRCLE { y 2 s 3 3 }
    }
    
    rule BuildingPart 0.1 {
    	SQUARE { s 2 4 }
    	CIRCLE { y 2 s 2 2 }
    }
    
    rule ShortBuildingPart {
    	SQUARE { s 2 3 }
    }
    
    rule ShortBuildingPart {
    	SQUARE { s 3 3 }
    }
    
    rule ShortBuildingPart 0.1 {
    	SQUARE { s 3 3 }
    	CIRCLE { y 2 s 3 3 }
    }
    
    rule ShortBuildingPart 0.1 {
    	SQUARE { s 2 3 }
    	CIRCLE { y 2 s 2 2 }
    }
    
    rule ShortBuildingPart 0.1 {
    	SQUARE { s 2 3 }
    	CIRCLE { y 1.5 s 2 2 }
    }
    
    rule BuildingPart {
    	ShortBuildingPart { y -0.5 }
    }
    
    rule BuildingPart {
    }
    
    
    rule Building {
    	SQUARE { s 2 4 }
    	BuildingPart { x -1 y -2 r 90 }
    	BuildingPart { x -1 y 2 r 90 }
    }
    
    rule Building {
    	SQUARE { s 4 4 }
    	BuildingPart {  x -2 r 90 }
    	BuildingPart {  x 2 r 90 }
    }
    
    
    rule Building {
    	SQUARE { s 3 4 }
    	BuildingPart { x -0.5 y -2 r 90 }
    	BuildingPart { x -0.5 y 2 r 90 }
    }
    
    rule Building {
    	CIRCLE { s 4 4 }
    	BuildingPart {  x -2 r 90 }
    	BuildingPart {  x 2 r 90 }
    	BuildingPart {  y -2 }
    	BuildingPart {  y 2 }
    }
    
    rule Building {
    	Building { r 90 }
    }
    It's far from perfect (or even useable?), but it's been fun experimenting. I replaced the "BUILDING" rule calls with the "Building" ruile calls from the file here, and then multiplied scales by 10 in the fun builiding's code.

    Just thought I'd share the results of a few minutes play.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	bad urban planning-oy.png 
Views:	84 
Size:	46.3 KB 
ID:	15183  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •