diff --git a/2021/sketch_2021_01_12a_other_sphere/sketch_2021_01_12a_other_sphere.gif b/2021/sketch_2021_02_12a_other_sphere/sketch_2021_02_12a_other_sphere.gif similarity index 100% rename from 2021/sketch_2021_01_12a_other_sphere/sketch_2021_01_12a_other_sphere.gif rename to 2021/sketch_2021_02_12a_other_sphere/sketch_2021_02_12a_other_sphere.gif diff --git a/2021/sketch_2021_01_12a_other_sphere/sketch_2021_01_12a_other_sphere.pyde b/2021/sketch_2021_02_12a_other_sphere/sketch_2021_02_12a_other_sphere.pyde similarity index 100% rename from 2021/sketch_2021_01_12a_other_sphere/sketch_2021_01_12a_other_sphere.pyde rename to 2021/sketch_2021_02_12a_other_sphere/sketch_2021_02_12a_other_sphere.pyde diff --git a/2021/sketch_2021_02_16a/data/Tomorrow-Bold.ttf b/2021/sketch_2021_02_16a/data/Tomorrow-Bold.ttf new file mode 100755 index 00000000..e90047d0 Binary files /dev/null and b/2021/sketch_2021_02_16a/data/Tomorrow-Bold.ttf differ diff --git a/2021/sketch_2021_02_16a/sketch_2021_02_16a.pyde b/2021/sketch_2021_02_16a/sketch_2021_02_16a.pyde new file mode 100644 index 00000000..1a41c866 --- /dev/null +++ b/2021/sketch_2021_02_16a/sketch_2021_02_16a.pyde @@ -0,0 +1,75 @@ + +add_library('geomerative') + +linhas = [] +DIST_PONTOS = 4 # na conversão da fonte em polígonos +RAIO = 100 +texto = "ABC123" +tamanho = 100 +x = 10 +y = 120 + +def setup(): + size(400, 400) + noStroke() + RG.init(this) + RG.setPolygonizer(RG.UNIFORMLENGTH) + RG.setPolygonizerLength(DIST_PONTOS) + s = 40 + glifos = [RG.getText(letra, "Tomorrow-Bold.ttf", s, LEFT) for letra in texto] + + global point_groups + point_groups = [] + for g in glifos: + point_groups.append(g.getPointsInPaths()) + calcTam(point_groups) + +def draw(): + + background(255) + for pg in point_groups: + fill(0) + noStroke() + for glifo in pg: + if glifo: + beginShape() + # path dentro de cada Linha + for i_contorno, contorno in enumerate(glifo): + if i_contorno > 0: + beginContour() # se a Linha tiver olho + # pontos de cada path + for vertice in contorno: + y = vertice.y + sy + x = vertice.x + sx + vertex(x, y) + if i_contorno > 0: + endContour() + endShape(CLOSE) + + +def calcTam(glifos): + tamLetras = [PVector()] * len(glifos) + wTotal = 0 + hTotal = 0 + for i, glifo in enumerate(glifos): # Linha + wLetra = 0 + hLetra = 0 + if glifo: + # path dentro de cada Linha + for contorno in glifo: + # pontos de cada path + for vertice in contorno: + x = vertice.x + y = vertice.y + if x > wLetra: + wLetra = x + if y > hLetra: + hLetra = y + x += wTotal + vertice.x += wTotal + else: + wLetra += tamLetras[i - 1].x + tamLetras[i] = PVector(wLetra, hLetra) + if hLetra > hTotal: + hTotal = hLetra + wTotal += wLetra diff --git a/2021/sketch_2021_02_18a/sketch_2021_02_18a.png b/2021/sketch_2021_02_18a/sketch_2021_02_18a.png new file mode 100644 index 00000000..f1657883 Binary files /dev/null and b/2021/sketch_2021_02_18a/sketch_2021_02_18a.png differ diff --git a/2021/sketch_2021_02_18a/sketch_2021_02_18a.pyde b/2021/sketch_2021_02_18a/sketch_2021_02_18a.pyde new file mode 100644 index 00000000..e7cb7c2e --- /dev/null +++ b/2021/sketch_2021_02_18a/sketch_2021_02_18a.pyde @@ -0,0 +1,14 @@ +def setup(): + size(512, 512) + background (0, 0, 0) + blendMode(ADD) + + + +def draw(): + if mousePressed and mouseButton == LEFT: + fill(mouseX / 2, mouseY / 2, 0) + circle(mouseX, mouseY, 10) # x, y, diâmetro + + if keyPressed and key =='a': + clear() diff --git a/README.md b/README.md index 48f07943..9ae41146 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,30 @@ Here are listed some of the tools I have been using: --- +![sketch_2021_02_18a](2021/sketch_2021_02_18a/sketch_2021_02_18a.png) + +[sketch_2021_02_18a](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_02_18a) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)] + +--- + +![sketch_2021_02_17_aspas](2021/sketch_2021_02_17_aspas/sketch_2021_02_17_aspas.png) + +[sketch_2021_02_17_aspas](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_02_17_aspas) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)] + + +--- + +I have to produce lighter gif files! +(check on repo...) + +sketch_2021_02_16 + +sketch_2021_02_15 + +sketch_2021_02_14 + +--- + ![sketch_2021_02_13a_cores](2021/sketch_2021_02_13a_cores/sketch_2021_02_13a_cores.png) [sketch_2021_02_13a_cores](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_02_13a_cores) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)] @@ -36,6 +60,15 @@ Here are listed some of the tools I have been using: [sketch_2021_02_13_shoebot](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_02_13_shoebot) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)] + +--- + +![sketch_2021_02_12a_other_sphere](2021/sketch_2021_02_12a_other_sphere/sketch_2021_02_12a_other_sphere.gif) + +[sketch_2021_02_12a_other_sphere](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_02_12a_other_sphere) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)] + + + --- ![sketch_2021_02_12b_w](2021/sketch_2021_02_12b_w/sketch_2021_02_12b_w.gif)