kopia lustrzana https://github.com/villares/sketch-a-day
				
				
				
			readme + images
							rodzic
							
								
									b158257140
								
							
						
					
					
						commit
						ad5c55c8e7
					
				
										
											Plik binarny nie jest wyświetlany.
										
									
								
							| 
		 Po Szerokość: | Wysokość: | Rozmiar: 180 KiB  | 
										
											Plik binarny nie jest wyświetlany.
										
									
								
							| 
		 Po Szerokość: | Wysokość: | Rozmiar: 59 KiB  | 
										
											Plik binarny nie jest wyświetlany.
										
									
								
							| 
		 Po Szerokość: | Wysokość: | Rozmiar: 1.3 MiB  | 
| 
						 | 
				
			
			@ -0,0 +1,34 @@
 | 
			
		|||
def setup():
 | 
			
		||||
    global ra, rb, n
 | 
			
		||||
    size(700, 700) 
 | 
			
		||||
    randomize()
 | 
			
		||||
    ra, rb, n = next_ra, next_rb, next_n
 | 
			
		||||
 | 
			
		||||
def randomize():
 | 
			
		||||
    global next_ra, next_rb, next_n
 | 
			
		||||
    next_ra = random_int(100, 350)  # raio a
 | 
			
		||||
    next_rb = random_int(100, 350)  # raio br
 | 
			
		||||
    next_n = random_int(3, 13)  # n_pointed
 | 
			
		||||
 | 
			
		||||
def draw():
 | 
			
		||||
    global ra, rb, n
 | 
			
		||||
    background(0, 100, 100)
 | 
			
		||||
    ra = lerp(ra, next_ra, 0.05)
 | 
			
		||||
    rb = lerp(rb, next_rb, 0.1)
 | 
			
		||||
    n = round(lerp(n, next_n, 0.6))
 | 
			
		||||
    #print(n, next_n)
 | 
			
		||||
    cx, cy = 350, 350
 | 
			
		||||
    step = TWO_PI / n  # passo
 | 
			
		||||
    begin_shape()
 | 
			
		||||
    for i in range(n):  # for each tip/point
 | 
			
		||||
        ang = step * i  + frame_count / 100.0 # angle
 | 
			
		||||
        ax = cx + cos(ang) * ra
 | 
			
		||||
        ay = cy + sin(ang) * ra
 | 
			
		||||
        vertex(ax, ay)
 | 
			
		||||
        bx = cx + cos(ang + step / 2.0) * rb
 | 
			
		||||
        by = cy + sin(ang + step / 2.0) * rb
 | 
			
		||||
        vertex(bx, by)
 | 
			
		||||
    end_shape(CLOSE)
 | 
			
		||||
 | 
			
		||||
def key_pressed():
 | 
			
		||||
    randomize()
 | 
			
		||||
							
								
								
									
										40
									
								
								README.md
								
								
								
								
							
							
						
						
									
										40
									
								
								README.md
								
								
								
								
							| 
						 | 
				
			
			@ -27,6 +27,46 @@ Here are listed some of the tools I have been using:
 | 
			
		|||
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
### sketch_2022_06_04
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
[sketch_2022_06_04](https://github.com/villares/sketch-a-day/tree/master/2022/sketch_2022_06_04) [[py5](https://py5.ixora.io/)]
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
### sketch_2022_06_03
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
[sketch_2022_06_03](https://github.com/villares/sketch-a-day/tree/master/2022/sketch_2022_06_03) [[py5](https://py5.ixora.io/)]
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
### sketch_2022_06_02
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
[sketch_2022_06_02](https://github.com/villares/sketch-a-day/tree/master/2022/sketch_2022_06_02) [[py5](https://py5.ixora.io/)]
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
### sketch_2022_06_01
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
[sketch_2022_06_01](https://github.com/villares/sketch-a-day/tree/master/2022/sketch_2022_06_01) [[py5](https://py5.ixora.io/)]
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
### sketch_2022_05_31
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
[sketch_2022_05_31](https://github.com/villares/sketch-a-day/tree/master/2022/sketch_2022_05_31) [[py5](https://py5.ixora.io/)]
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
### sketch_2022_05_30
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Ładowanie…
	
		Reference in New Issue