kopia lustrzana https://github.com/villares/sketch-a-day
				
				
				
			102 update
							rodzic
							
								
									c7976c246b
								
							
						
					
					
						commit
						a93da6ea0c
					
				|  | @ -30,16 +30,16 @@ def draw(): | |||
|     # mas varia com o número de colunas na grade | ||||
|     randomSeed(int(input.analog(1)) / 4) | ||||
|     # espaçamento entre os elementos | ||||
|     spac_size = int(width / (grid_elem + 1)) | ||||
|     for _ in range(1): | ||||
|         v = int(spac_size * 1.5) | ||||
|         h =  int(spac_size * sqrt(3)) | ||||
|         for x in range(-spac_size , width, h):  | ||||
|             for y in range(-spac_size, width, v): | ||||
|                 if y % 2: | ||||
|                     x = x + h/4 | ||||
|     spac_size = width / (grid_elem + 1) | ||||
|     v = spac_size * 1.5 | ||||
|     h = spac_size * sqrt(3) | ||||
|     for ix in range(-1, grid_elem + 1): | ||||
|         for iy in range(-1, grid_elem + 1): | ||||
|             if iy % 2: | ||||
|                 x = ix * h + h / 4 | ||||
|             else: | ||||
|                     x = x - h/4 | ||||
|                 x = ix * h - h / 4 | ||||
|             y = iy * v | ||||
|             final_size = elem_size + rand_size * random(-1, 1) | ||||
|             offsetX = rand_posi * random(-1, 1) | ||||
|             offsetY = rand_posi * random(-1, 1) | ||||
|  | @ -53,20 +53,15 @@ def draw(): | |||
|         stroke1, x1, y1, es1 = elem | ||||
|         ellipse(x1, y1, es1, es1) | ||||
| 
 | ||||
|     for _ in range(grid_elem * 2):         | ||||
|     for _ in range(grid_elem): | ||||
|         stroke1, x1, y1, es1 = rnd_choice(ELEMENTS) | ||||
|         stroke(stroke1) | ||||
|         ellipse(x1, y1, es1, es1) | ||||
|         stroke2, x2, y2, es2 = rnd_choice(ELEMENTS) | ||||
|         stroke(stroke2) | ||||
|         ellipse(x2, y2, es2, es2) | ||||
|         line(x1, y1, x2, y2) | ||||
| 
 | ||||
|     # empty list | ||||
|     ELEMENTS[:] = [] | ||||
| 
 | ||||
|           | ||||
| 
 | ||||
|     # uncomment next lines to export GIF | ||||
|     global GIF_EXPORT | ||||
|     if not frameCount % 20 and GIF_EXPORT: | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Alexandre B A Villares
						Alexandre B A Villares