kopia lustrzana https://github.com/villares/sketch-a-day
				
				
				
			Update sketch_2020_09_03flat.py
							rodzic
							
								
									a9334b7991
								
							
						
					
					
						commit
						a756b3f350
					
				|  | @ -6,11 +6,11 @@ def ensamble(ex, ey, eo): | |||
|     noStroke() | ||||
|     for i in range(eo): | ||||
|         if i % 2: | ||||
|             fill(0, 0, 200, 100) | ||||
|             fill(0, 0, 150, 150) | ||||
|         else: | ||||
|             fill(200, 0, 0, 100) | ||||
|             fill(50, 150, 0, 150) | ||||
|         order, spacing, side = randint(3, 6), 14, 7 | ||||
|         x, y = randint(-5, 4) * side, randint(-5, 4) * side    | ||||
|         x, y = (1 + randint(-5, 4)) * side, (1 + randint(-5, 4)) * side    | ||||
|         grid(ex+x, ey+y, order, spacing, choice(gliphs), side) | ||||
| 
 | ||||
| 
 | ||||
|  | @ -37,17 +37,20 @@ gliphs = [lambda x, y, s: rect(x, y, s, s), | |||
| 
 | ||||
| # @app.route('/') | ||||
| def draw(): | ||||
|     size(1500, 800) | ||||
|     background(200) | ||||
|     size(1400, 700) | ||||
|     background(240) | ||||
| 
 | ||||
|     grid(width / 2, height / 2, (7, 5), 150, ensamble, 5) # ensamble of 5 , on grid also order=5 | ||||
|     # return page.svg() | ||||
|     page.svg("test.svg") | ||||
|     grid(width / 2, height / 2, (8, 4), 150, ensamble, 5) | ||||
|     return page.svg() | ||||
| 
 | ||||
| 
 | ||||
| draw() | ||||
| page.svg(__file__[-24:-3]+'.svg') | ||||
| 
 | ||||
| if __name__ == '__main__': | ||||
|     # app.run() | ||||
|     draw() | ||||
|      | ||||
|     page.svg(__file__[-24:-3]+'.svg') | ||||
|      | ||||
|    | ||||
| 
 | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Alexandre B A Villares
						Alexandre B A Villares