Here's a little creative coding I did with processingjs a while back. Move the mouse to move the skulls.
Articles by stu
- Tagged as : creative coding
Moving things in shoebot - simple particles...
OK, part 3 - now for something fun - extending parts 1 + 2 into a simple particle system.
Particles, generally means - a lot of things moving around (the particles) and a way to generate them, an "emitter"
Here we're going to take the code from the previous two parts and add a …
Moving things in shoebot, adding different behaviours..
In my last post we made an arrow move around the screen, in this post we'll look to extend things so it's easy to make many things move around the screen.
This will make the code a little more complex, but as usual it makes things simpler later on.
Note …
Natural movement using polar coordinates in shoebot
Here's a little shoebot bot to experiment with natural movement.
This uses polar coordinates to decide the direction and velocity of an arrow on the screen.
Polar coordinates mean we can give an object a sense of 'forward', 'back', 'left' and 'right'
The code below works on the current version …
Adding files to the django auto refresh
Django runserver and the app django-autotest are both good as they'll restart when modifcations are made to files in the app they will restart, however not *all* files will trigger a restart.
Wanting to get some other files noticed, I added some in the __init__.py of my app, so …
Cairo with python Ctypes
Uploaded some experiments with python and ctypes to here:
https://gitorious.org/pycairo-ctypes/pycairo-ctypes
This is a really rough proof of concept that the pycairo API can be implemented with ctypes + metclasses.
So far only ImageSurface is supported on the SVG backend, along with Contexts. The nice thing about this …
Tagged as : pythonUsing PyCha with Django
A quick post on using Python Charts to generate nice SVG charts for your django website (I've had the code hanging around for ages - so should just post it). The code is based on the examples there, here I integrate it into Django.
To install you'll need to do
pip …
Tagged as : pythonSet Windows Environment variables from the registry (TCC/LE)
[EDIT: 2010/10/05]
Oops, I've been using TCC/LE by JPSoft as my shell... the following doesn't work in the normal command prompt
[/EDIT]
I just had a look at SET and it lets you set user/system variables:
Display, create, modify, or delete environment variables. SET [/A /D …
Simple python spectrograph with shoebot
Seeing"Realtime FFT Graph of Audio WAV File or Microphone Input with Python..." on python.reddit.com reminded me of one I'd built in python with shoebot.
While it works OK, I feel like I'm missing a higher level audio library (especially having seen Minim, for C++ and Java).
Cairo: Surface for recording commands and playback
An update on my latest cairo adventures...
When cairo 1.10 comes out we'll get a RecordingSurface so you can record commands and play them back to another surface, but how to do something similar now ?
Skip to the end if you just want the code, explanation of how I …