J-Filters VI

Using a vector and an angle, rotating each pixel’s position by an angle determined by its distance to the image’s center and a constant, this filter gives the image a unique spin.
For demonstration I used ā€“ once again ā€“ an image from my post Stacking Stones.

A light spin A medium spin Heavy spin!


# Python 2.7.7 Code
# Pygame 1.9.1 (for Python 2.7.7)
# Jonathan Frech 19th of February, 2016

Continue reading

cā€™t-Racetrack

In a recent c’t-article they showed a game regarding vector mathematics, velocities, accelerations and positions.
I could not resist and wrote this program to simulate the game.
The only thing this program cannot do is to check the barriers. That you have to check for yourself.

The game

You have a start position (red), an end position (green) and some barriers (white).
Your job is it to steer your little dot (bright yellow) onto the end position.
To make it more difficult, you are not allowed to change the dot’s position directly, but rather you accelerate it on each step.
Your acceleration vector (turquoise) also is not allowed to be longer than 10 (dim yellow bubble) and at the end point your dot must have a velocity of (0, 0).

The fewer moves you need, the better your steering abilities.

[not used]

Controls

  • Mouse movement changes the new acceleration vector applied in the next step
  • Left click moves one step
  • Right click is a undo for the latest move
  • Middle click moves the frame
  • ‘c’ clears all the moves made so far
  • ‘e’ exports current moves to a .txt file
  • Space saves a screenshot

[not used]


# Python 2.7.7 Code
# Pygame 1.9.1 (for Python 2.7.7)
# Jonathan Frech 16th of October, 2015
#         edited 17th of October, 2015

Continue reading

Flare

Tinkering around with vectors, I created this fancy program. By left-clicking you spawn a white circle at your current mouse position. This circle then will emit a specific quantity of red pixels (\text{which is }c = 2 \pi r \text{ with } r = 50). Those red pixels then get pushed across the screen until they eventually die out.

Controls

  • Left click spawns in a circle
  • Space saves a screenshot

JBlog! Nameception A glowing flower


# Python 2.7.7 Code
# Pygame 1.9.1 (for Python 2.7.7)
# Jonathan Frech 14th of October, 2015
#         edited 15th of October, 2015

Continue reading