18 & rename wrong 2021_02_12 sphere!

main
Alexandre B A Villares 2021-02-18 23:54:43 -03:00
rodzic 8c09c399ab
commit 253e9cae5f
7 zmienionych plików z 122 dodań i 0 usunięć

Wyświetl plik

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 3.4 MiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 3.4 MiB

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -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

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 91 KiB

Wyświetl plik

@ -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()

Wyświetl plik

@ -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)