kopia lustrzana https://github.com/villares/sketch-a-day
2 3 4
rodzic
95e971447b
commit
dd0837b33f
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 154 KiB |
|
@ -0,0 +1,89 @@
|
|||
siz = 23 # tamanho da grade
|
||||
font_size = 28 # tamanho das letras
|
||||
noise_scale = 0.01
|
||||
|
||||
|
||||
def setup():
|
||||
global img, fontes
|
||||
size(918, 908)
|
||||
smooth()
|
||||
# textMode(MODEL)
|
||||
# img = loadImage("1.png")
|
||||
# this.surface.setResizable(True)
|
||||
# this.surface.setSize(img.width, img.height)
|
||||
noStroke()
|
||||
fontes = (
|
||||
createFont("Inconsolata ExtraLight", font_size),
|
||||
createFont("Inconsolata Light", font_size),
|
||||
createFont("Inconsolata Regular", font_size),
|
||||
createFont("Inconsolata Medium", font_size),
|
||||
createFont("Inconsolata SemiBold", font_size),
|
||||
createFont("Inconsolata Bold", font_size),
|
||||
createFont("Inconsolata ExtraBold", font_size),
|
||||
createFont("Inconsolata Black", font_size),
|
||||
)
|
||||
textAlign(CENTER, CENTER)
|
||||
# colorMode(HSB)
|
||||
|
||||
|
||||
def draw():
|
||||
background(0, 128, 128)
|
||||
xend = width # img.width
|
||||
yend = height #img.height
|
||||
# img.loadPixels()
|
||||
# Begin our loop for every pixel
|
||||
f = frameCount / 2.0
|
||||
i = 0
|
||||
of = 1
|
||||
for y in xrange(0, yend, siz):
|
||||
# xc = 0
|
||||
for x in xrange(0, xend, siz):
|
||||
# bc = 128 * noise(x * noise_scale, y * noise_scale, f * noise_scale)
|
||||
h = 16 + (255 + 16) * noise(y * noise_scale, f * noise_scale, x * noise_scale, )
|
||||
bc = 255 * noise(x * noise_scale, f * noise_scale, y * noise_scale, )
|
||||
bc2 = 255 * noise((x + of) * noise_scale, f * noise_scale, (y + of) * noise_scale, )
|
||||
|
||||
fill(255 - bc)
|
||||
w = int(map(bc, 80, 150, 0, len(fontes)-1))
|
||||
w = constrain(w, 0, 7)
|
||||
c = is_this_a_man[i]
|
||||
# print(w)
|
||||
textFont(fontes[w])
|
||||
text(c, x + siz / 2, y + siz / 2)
|
||||
i = (i + 1) % len(is_this_a_man)
|
||||
# if c != " ":
|
||||
# xc += textWidth(c) * 1.2
|
||||
# xc += siz
|
||||
|
||||
def keyPressed():
|
||||
if key == 's':
|
||||
saveFrame("a####.png")
|
||||
|
||||
# Primo Levi
|
||||
is_this_a_man = \
|
||||
"""
|
||||
You who live safe
|
||||
In your warm houses,
|
||||
You who find, returning in the evening,
|
||||
Hot food and friendly faces:
|
||||
Consider if this is a man
|
||||
Who works in the mud
|
||||
Who does not know peace
|
||||
Who fights for a scrap of bread
|
||||
Who dies because of a yes or a no.
|
||||
Consider if this is a woman,
|
||||
Without hair and without name
|
||||
With no more strength to remember,
|
||||
Her eyes empty and her womb cold
|
||||
Like a frog in winter.
|
||||
Meditate that this came about:
|
||||
I commend these words to you.
|
||||
Carve them in your hearts
|
||||
At home, in the street,
|
||||
Going to bed, rising;
|
||||
Repeat them to your children,
|
||||
Or may your house fall apart,
|
||||
May illness impede you,
|
||||
May your children turn their faces from you.
|
||||
"""
|
||||
|
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 184 KiB |
|
@ -0,0 +1,92 @@
|
|||
siz = 29 # tamanho da grade
|
||||
font_size = 30 # tamanho das letras
|
||||
noise_scale = 0.01
|
||||
|
||||
|
||||
def setup():
|
||||
global img, fontes
|
||||
size(900, 906)
|
||||
smooth()
|
||||
# textMode(MODEL)
|
||||
# img = loadImage("1.png")
|
||||
# this.surface.setResizable(True)
|
||||
# this.surface.setSize(img.width, img.height)
|
||||
noStroke()
|
||||
fontes = (
|
||||
createFont("Inconsolata ExtraLight", font_size),
|
||||
createFont("Inconsolata Light", font_size),
|
||||
createFont("Inconsolata Regular", font_size),
|
||||
createFont("Inconsolata Medium", font_size),
|
||||
createFont("Inconsolata SemiBold", font_size),
|
||||
createFont("Inconsolata Bold", font_size),
|
||||
createFont("Inconsolata ExtraBold", font_size),
|
||||
createFont("Inconsolata Black", font_size),
|
||||
)
|
||||
textAlign(CENTER, CENTER)
|
||||
# colorMode(HSB)
|
||||
|
||||
|
||||
def draw():
|
||||
background(240)
|
||||
xend = width # img.width
|
||||
yend = height #img.height
|
||||
# img.loadPixels()
|
||||
# Begin our loop for every pixel
|
||||
f = frameCount / 2.0
|
||||
i = 0
|
||||
of = 1
|
||||
for y in xrange(0, yend, siz):
|
||||
# xc = 0
|
||||
for x in xrange(0, xend, siz):
|
||||
# bc = 128 * noise(x * noise_scale, y * noise_scale, f * noise_scale)
|
||||
h = 16 + (255 + 16) * noise(y * noise_scale, f * noise_scale, x * noise_scale, )
|
||||
bc = 255 * noise(x * noise_scale, f * noise_scale, y * noise_scale, )
|
||||
bc2 = 255 * noise((x + of) * noise_scale, f * noise_scale, (y + of) * noise_scale, )
|
||||
w = int(map(bc, 80, 150, 0, len(fontes)-1))
|
||||
w = constrain(w, 0, 7)
|
||||
c = is_this_a_man[i]
|
||||
# print(w)
|
||||
textFont(fontes[w])
|
||||
fill(0, 100)
|
||||
text(c, x + siz / 2 + h / 100, y + siz / 2 + h / 100)
|
||||
fill(0)
|
||||
text(c, x + siz / 2, y + siz / 2)
|
||||
|
||||
|
||||
i = (i + 1) % len(is_this_a_man)
|
||||
# if c != " ":
|
||||
# xc += textWidth(c) * 1.2
|
||||
# xc += siz
|
||||
|
||||
def keyPressed():
|
||||
if key == 's':
|
||||
saveFrame("a####.png")
|
||||
|
||||
# Primo Levi
|
||||
is_this_a_man = \
|
||||
"""
|
||||
You who live safe
|
||||
In your warm houses,
|
||||
You who find, returning in the evening,
|
||||
Hot food and friendly faces:
|
||||
Consider if this is a man
|
||||
Who works in the mud
|
||||
Who does not know peace
|
||||
Who fights for a scrap of bread
|
||||
Who dies because of a yes or a no.
|
||||
Consider if this is a woman,
|
||||
Without hair and without name
|
||||
With no more strength to remember,
|
||||
Her eyes empty and her womb cold
|
||||
Like a frog in winter.
|
||||
Meditate that this came about:
|
||||
I commend these words to you.
|
||||
Carve them in your hearts
|
||||
At home, in the street,
|
||||
Going to bed, rising;
|
||||
Repeat them to your children,
|
||||
Or may your house fall apart,
|
||||
May illness impede you,
|
||||
May your children turn their faces from you.
|
||||
"""
|
||||
|
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 2.4 MiB |
|
@ -0,0 +1,93 @@
|
|||
siz = 36 # tamanho da grade
|
||||
font_size = 38 # tamanho das letras
|
||||
noise_scale = 0.01
|
||||
|
||||
|
||||
def setup():
|
||||
global img, fontes
|
||||
size(808, 808)
|
||||
smooth()
|
||||
# textMode(MODEL)
|
||||
# img = loadImage("1.png")
|
||||
# this.surface.setResizable(True)
|
||||
# this.surface.setSize(img.width, img.height)
|
||||
noStroke()
|
||||
fontes = (
|
||||
createFont("Inconsolata ExtraLight", font_size),
|
||||
createFont("Inconsolata Light", font_size),
|
||||
createFont("Inconsolata Regular", font_size),
|
||||
createFont("Inconsolata Medium", font_size),
|
||||
createFont("Inconsolata SemiBold", font_size),
|
||||
createFont("Inconsolata Bold", font_size),
|
||||
createFont("Inconsolata ExtraBold", font_size),
|
||||
createFont("Inconsolata Black", font_size),
|
||||
)
|
||||
textAlign(CENTER, CENTER)
|
||||
# colorMode(HSB)
|
||||
|
||||
|
||||
def draw():
|
||||
background(240)
|
||||
xend = width # img.width
|
||||
yend = height #img.height
|
||||
# img.loadPixels()
|
||||
# Begin our loop for every pixel
|
||||
f = sin(radians(frameCount / 10.0)) * 360
|
||||
g = cos(radians(frameCount / 10.0 )) * 360
|
||||
i = 0
|
||||
of = 10
|
||||
for y in xrange(0, yend - siz, siz):
|
||||
# xc = 0
|
||||
for x in xrange(0, xend - siz / 2, siz / 2):
|
||||
# bc = 128 * noise(x * noise_scale, y * noise_scale, f * noise_scale)
|
||||
# h = 16 + (255 + 16) * noise(y * noise_scale, f * noise_scale, x * noise_scale, )
|
||||
bc = 255 * noise((x + g) * noise_scale, f * noise_scale, y * noise_scale, )
|
||||
bc2 = 255 * noise((x + of + g) * noise_scale, f * noise_scale, (y + of) * noise_scale, )
|
||||
w = int(map(bc, 80, 150, 0, len(fontes)-1))
|
||||
w = constrain(w, 0, 7)
|
||||
c = is_this_a_man[i]
|
||||
# print(w)
|
||||
textFont(fontes[w])
|
||||
fill(0, 0, 120, 100)
|
||||
text(c, x + siz / 2 + bc2 / 80, y + siz / 2 + bc2 / 80)
|
||||
fill(0)
|
||||
text(c, x + siz / 2, y + siz / 2)
|
||||
|
||||
|
||||
i = (i + 1) % len(is_this_a_man)
|
||||
# if c != " ":
|
||||
# xc += textWidth(c) * 1.2
|
||||
# xc += siz
|
||||
|
||||
def keyPressed():
|
||||
if key == 's':
|
||||
saveFrame("a####.png")
|
||||
|
||||
# Primo Levi
|
||||
is_this_a_man = \
|
||||
"""
|
||||
You who live safe
|
||||
In your warm houses,
|
||||
You who find, returning in the evening,
|
||||
Hot food and friendly faces:
|
||||
Consider if this is a man
|
||||
Who works in the mud
|
||||
Who does not know peace
|
||||
Who fights for a scrap of bread
|
||||
Who dies because of a yes or a no.
|
||||
Consider if this is a woman,
|
||||
Without hair and without name
|
||||
With no more strength to remember,
|
||||
Her eyes empty and her womb cold
|
||||
Like a frog in winter.
|
||||
Meditate that this came about:
|
||||
I commend these words to you.
|
||||
Carve them in your hearts
|
||||
At home, in the street,
|
||||
Going to bed, rising;
|
||||
Repeat them to your children,
|
||||
Or may your house fall apart,
|
||||
May illness impede you,
|
||||
May your children turn their faces from you.
|
||||
"""
|
||||
|
18
README.md
18
README.md
|
@ -25,6 +25,24 @@ Here are listed some of the tools I have been using:
|
|||
|
||||
---
|
||||
|
||||

|
||||
|
||||
[sketch_2021_03_04a](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_03_04a) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
|
||||
|
||||
---
|
||||
|
||||

|
||||
|
||||
[sketch_2021_03_03a](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_03_03a) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
|
||||
|
||||
---
|
||||
|
||||

|
||||
|
||||
[sketch_2021_03_02a](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_03_02a) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
|
||||
|
||||
---
|
||||
|
||||

|
||||
|
||||
[sketch_2021_03_01a](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_03_01a) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
|
||||
|
|
Ładowanie…
Reference in New Issue