2016-10-08, post № 143
Processing 3, programming, Python, #3D, #fractal, #three dimensions, #three-D, #three-dimensional
In July of 2015 I published my Menger Sponge post. As I said there, the true Menger Sponge is a three-dimensional object, but due to the lack of 3D-integration in Pygame, I only showed one of the six cube’s faces. The two-dimensional fractal is officially called Sierpiński carpet while the three-dimensional object is really called a Menger sponge.
To achieve the three-dimensional cube, I used Processing 3 together with its Python Mode.
The actual fractal is colored with a pseudo-randomly chosen color. All its smaller cubes then get a slight color shift. The cube rotates slowly, with a different speed on each of the three axes.
Controls
- ‘Space’will advance the cube’s fractalness,
- ‘q’ will save an image of the current fractal’s state.
2016-09-24, post № 142
MicroPython, programming, Python 3, #micro, #microcontroller, #pyboard
Being a big fan of Python, I recently got a MicroPython Board.
MicroPython is a simple to use micro controller which runs Python 3. To put code onto it, you simple mount it as you would do with a USB flash drive, copy your main.py
to it and restart your MicroPython.
As a simple “Hello world.”-program, I wrote this counting script. Every time you press the built-in button, it counts up by one. Using the four built-in LEDs and binary number representation, this counter can count from 𝟢 to 𝟣𝟧 and then wraps back.
2016-09-10, post № 141
curses, programming, Python, #animation, #bit, #bits, #falling bits, #hacker, #hacking, #Matrix, #screensaver
Recreating the famous falling bit effect from Matrix using python and curses.The individual bit strips are separate entities, falling to the bottom and then being moved up again with a different 𝑥 value. They also get a random speed between one and five deciseconds.
Posts:
242-240, 239-237, 236-234, 233-231, 230-228, 227-225, 224-222, 221-219, 218-216, 215-213, 212-210, 209-207, 206-204, 203-201, 200-198, 197-195, 194-192, 191-189, 188-186, 185-183, 182-180, 179-177, 176-174, 173-171, 170-168, 167-165, 164-162, 161-159, 158-156, 155-153, 152-150, 149-147, 146-144, 143-141, 140-138, 137-135, 134-132, 131-129, 128-126, 125-123, 122-120, 119-117, 116-114, 113-111, 110-108, 107-105, 104-102, 101-99, 98-96, 95-93, 92-90, 89-87, 86-84, 83-81, 80-78, 77-75, 74-72, 71-69, 68-66, 65-63, 62-60, 59-57, 56-54, 53-51, 50-48, 47-45, 44-42, 41-39, 38-36, 35-33, 32-30, 29-27, 26-24, 23-21, 20-18, 17-15, 14-12, 11-9, 8-6, 5-3, 2-1Jonathan Frech's blog; built 2021/04/16 20:21:20 CEST