hp
jblog
toc

Sailing

2015-11-15, post № 82

art, #beach, #boat, #ocean, #pixel, #pixel guy, #sea, #ship, #water

The little pixel guy wants to cross the water. He comes up with a good idea!

sailing.gif

JClock VII

2015-11-14, post № 81

programming, Pygame, Python, #clock, #composite, #composite number, #factorization, #prime, #prime factorization, #prime time, #primes

This alternative clock is not really readable by human. It calculates the first 𝟣𝟦𝟦 [1] primes, assigns 𝟨𝟢 of them to every possible second, 𝟨𝟢 to every possible minute and 𝟤𝟦 to every possible hour.
Multiplying those three primes for a given time results in a composite number representing said time. Using integer factorization, you then can get the three primes back, map them to seconds, minutes and hours, and by doing so calculate the time.

jclock-vii.gif
Extra assets: jclock-vii_extra.gif

JClock VI

2015-11-08, post № 80

programming, Pygame, Python, #clock, #clockface, #simple, #time

This clock uses a simple clock design with the standard clock face. Red, green and blue represent second, minute and hour.

jclock-vi.png
Source code: jclock-vi.py

Prime Remainders

2015-11-07, post № 79

mathematics, programming, Pygame, Python, #%, #black, #mod, #modulo, #red

This program calculates primes, takes their remainder [1] and then places a color accordingly. The shapes are quiet interesting. [2]

Controls

  • ‘Space’ takes a screenshot.
prime-remainders_mod-10.png
prime-remainders_mod-255.png
prime-remainders_mod-500.png
Source code: prime-remainders.py

Langton’s Ant

2015-11-01, post № 78

mathematics, programming, Pygame, Python, #ant, #black, #black and white, #crawling, #highway, #Langton, #white

This program is a simulation of Langton’s Ant. The following image shows the ant on its highway.

Controls

  • ‘F1’ takes a screenshot,
  • ‘Space’ stops and resumes the ant’s movement.
langtons-ant.png
Source code: langtons-ant.py

Halloween

2015-10-31, post № 77

art, #animated, #animated gif, #animation, #gif, #Halloween, #pixel, #pumpkin, #scary, #spooky

This gif is dedicated to the year’s scariest date, Halloween.

halloween.gif

Spiral

2015-10-25, post № 76

programming, Pygame, Python, #around the center, #black, #black hole, #emission, #galaxy, #particles, #red, #Slow Mo Guys, #slow motion, #spin, #spinning

Inspired by a recent Slow Mo Guys video, I wrote a simulation for the shown effect. I think it looks pretty neat…

Controls

  • Up arrow increases the number of emitted particles,
  • Down arrow decreases the number of emitted particles,
  • ‘Space’ saves a screenshot.
spiral-1.png
spiral-2.png
spiral-3.png
Source code: spiral.py

𝑒 Generator

2015-10-24, post № 75

mathematics, programming, Python, #(1+1/n)^n, #approx., #approximation, #constant, #e, #Euler

By using the formula \big(1+\frac{1}{n}\big)^n for a big number 𝑛, you can approximate the mathematical constant 𝑒.

e-generator.png
Source code: e-generator.py
Jonathan Frech's blog; built 2024/08/31 22:59:44 CEST