main
Alexandre B A Villares 2021-03-28 21:16:15 -03:00
rodzic 2e1a2b2799
commit 5b01480fcf
4 zmienionych plików z 92 dodań i 0 usunięć

Plik binarny nie jest wyświetlany.

Po

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

Wyświetl plik

@ -0,0 +1,32 @@
PImage img;
PImage imgTemp;
int i = 0;
void setup() {
size(100, 100);
img = loadImage("a.jpg");
imgTemp = img.get();
surface.setSize(img.width * 2, img.height);
}
void draw() {
if (i < imgTemp.pixels.length) {
float record = -1;
int selectedPixel = i;
for (int j = i; j < imgTemp.pixels.length; j++) {
color pix = imgTemp.pixels[j];
float b = hue(pix);
if (b > record) {
selectedPixel = j;
record = b;
}
}
color cor = imgTemp.pixels[i];
imgTemp.pixels[i] = imgTemp.pixels[selectedPixel];
imgTemp.pixels[selectedPixel] = cor;
i++;
}
imgTemp.updatePixels();
image(img, 0, 0);
image(imgTemp, img.width, 0);
}

Plik binarny nie jest wyświetlany.

Po

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

Wyświetl plik

@ -25,6 +25,66 @@ Here are listed some of the tools I have been using:
---
![sketch_2021_03_28e](2021/sketch_2021_03_28e/sketch_2021_03_28e.gif)
[sketch_2021_03_28e](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_03_28e) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
---
![sketch_2021_03_28d](2021/sketch_2021_03_28d/sketch_2021_03_28d.png)
[sketch_2021_03_28d](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_03_28d) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
---
![sketch_2021_03_27a](2021/sketch_2021_03_27a/sketch_2021_03_27a.png)
[sketch_2021_03_27a](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_03_27a) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
---
![sketch_2021_03_26a](2021/sketch_2021_03_26a/sketch_2021_03_26a.png)
[sketch_2021_03_26a](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_03_26a) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
---
![sketch_2021_03_25e](2021/sketch_2021_03_25e/sketch_2021_03_25e.png)
[sketch_2021_03_25e](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_03_25e) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
---
![sketch_2021_03_24e](2021/sketch_2021_03_24e/sketch_2021_03_24e.gif)
[sketch_2021_03_24e](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_03_24e) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
---
![sketch_2021_03_23c](2021/sketch_2021_03_23c/sketch_2021_03_23c.gif)
[sketch_2021_03_23c](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_03_23c) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
---
![sketch_2021_03_22c](2021/sketch_2021_03_22c/sketch_2021_03_22c.gif)
[sketch_2021_03_22c](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_03_22c) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
---
![sketch_2021_03_21c_simple_while](2021/sketch_2021_03_21c_simple_while/sketch_2021_03_21c_simple_while.png)
[sketch_2021_03_21c_simple_while](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_03_21c_simple_while) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
---
![sketch_2021_03_19a_sorting](2021/sketch_2021_03_19a_sorting/sketch_2021_03_19a_sorting.png)
[sketch_2021_03_19a_sorting](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_03_19a_sorting) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
---
![sketch_2021_03_18a_sorting](2021/sketch_2021_03_18a_sorting/sketch_2021_03_18a_sorting.jpg)
[sketch_2021_03_18a_sorting](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_03_18a_sorting) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]