This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Alexandre B A Villares - https://abav.lugaralgum.com/sketch-a-day | |
| # More explorations of lines in grids | |
| from pyp5js import * | |
| W = None | |
| H = None | |
| num = None | |
| line_combos = None | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Needs a tab nammed "in.py" with the source to be converted! | |
| # TODO: deal with `with pushMatrix():` and other Python Mode contexts | |
| import re | |
| has_import = False | |
| has_future_division = False | |
| has_print_statement = False | |
| globals_list = [] | |
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Author: Berin | |
| # Sketches repo: https://github.com/berinhard/sketches | |
| from collections import namedtuple | |
| from abc import ABCMeta, abstractmethod | |
| WHITE = color(235, 235, 235) | |
| BLACK = color(27, 27, 27) | |
| BLUE = color(55,189,182) | |
| def setup(): | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | unsigned long inicio; | |
| boolean modoBlink = true; | |
| void setup() { | |
| inicio = millis(); | |
| } | |
| void loop() { | |
| if (millis() - inicio > 2000) { // a cada 2 segundos (2000millisegundos) | |
| inicio = millis(); // reseta contador | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | /* | |
| Analog Input | |
| Demonstrates analog input by reading an analog sensor on analog pin 0 and | |
| turning on and off a light emitting diode(LED) connected to digital pin 13. | |
| The amount of time the LED will be on and off depends on the value obtained | |
| by analogRead(). | |
| */ | |
| int sensorPin = A0; // select the input pin for the potentiometer | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | """ | |
| Para roder este exemplo: | |
| https://abav.lugaralgum.com/como-instalar-o-processing-modo-python/ | |
| --- | |
| Bouncy Bubbles | |
| based on code from Keith Peters. | |
| Multiple-object collision. | |
| The "bounding-box" rendering is imprecise because we've implemented springy | |
| bodies which don't show their deformation. | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Instruções para baixar o Processing e instalar o modo Python em abav.lugaralgum.com/material-aulas | |
| def setup(): | |
| """ executa no começo - isto aqui é um 'doc-string' """ | |
| size(500, 500) # tamanho do desenho - isto aqui é um comentário (meta-comentário?) | |
| # não vamos usar cores RGB, vamos usar HSB | |
| colorMode(HSB) # Matiz, Saturação e Brilho | |
| noStroke() # sem contorno nas formas | |
| def draw(): | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # exemplo_lista = [10, 20, 3, 13, 1] | |
| # exemplo_tupla = (10, 22, "sim", color(0)) | |
| # [(100, 100, 5, cor), (200, 100, 10, cor), ...] | |
| from itertools import combinations | |
| def setup(): | |
| global dados_bolas, combos | |
| size(500, 500) | |
| fill(200, 200, 0) # amarelo | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # ported from https://www.openprocessing.org/sketch/862451 | |
| # by @takawo https://www.openprocessing.org/user/6533 | |
| # Missing drawingContext shadowColor shadowBlur :( | |
| from random import choice | |
| movers = [] | |
| mover_num = 350 | |
| pallete = ["#DADCDA", "#DE200C", "#3A6DA8", "#A8BACC", | |
| "#0A1D4E", "#CD4645", "#C0AEB5", "#838CA9"] | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | """ | |
| Annie Perkins Math Art Challenge | |
| https://twitter.com/anniek_p/status/1244220881347502080 | |
| Peter Farrell | |
| https://github.com/hackingmath/pygame_sketches/blob/master/binary_grid_challenge.py | |
| Alexandre Villares | |
| https://gist.github.com/villares/219b457c82adfd73b6664aa10cb681f2 | |
| """ | |
| from random import choice, randint |