Feb 252009

I wrote a Python script to generate a series of pretty cool images, and thought it was enjoyable enough to watch that I would put it on YouTube.

Basically, this is the function sin(x)+cos(y) where x and y both range from -5 to 5. The hue of a pixel’s location is the value of that function plus a small number times the amount of frames that have passed, all modded by 1.0 to get a number I can convert to a hue.

This was done using the pygame module from http://www.pygame.org/.

Duration : 0:5:0


Technorati Tags: , , , , , ,

Readers have also enjoyed these related posts:

  1. Mind Bending Puzzles(2)!Answers Required Possibly With Explanation!?
  2. Logic-Puzzles.org – How the Grid Works
  3. How to Teach Kids Kindergarten Math : How to Teach Kids Color & Shapes
  4. Exercises for a New Brain- Use Mind Power and Movement at www.susanamatthews.com
Posted by admin Tagged with: colors, colours, psychedelic, pygame, python, trippy, visual

11 Comments to “Fun Colors With Math and Python”

  1. ttimothymurphy says:

    it’s not ugly
    it’s not ugly

  2. therpham says:

    None taken. It’s …
    None taken. It’s not like I poured my soul into it or something. I thought it was sort of interesting to watch when I made it so I uploaded it, but the older it gets the less I like it.

  3. byrdsmaniac says:

    It’s ugly. (No …
    It’s ugly. (No offense)

  4. dalung says:

    By the way do I …
    By the way do I quote your username?

  5. dalung says:

    Sure, I always list …
    Sure, I always list where I got footage from in all the descriptions. (They’re on my other profile).. Thanks a lot.

  6. therpham says:

    Okay, just give me …
    Okay, just give me credit somewhere.

  7. dalung says:

    May I use this in a …
    May I use this in a music video i’m making? Thanks.

  8. filipemtx says:

    wow
    very cool

    wow
    very cool

  9. Killingcheese says:

    awesome
    awesome

  10. Max11551 says:

    Nice work :)
    Nice work :)

  11. hellmut888 says:

    Can you give me the …
    Can you give me the script please ? :P

Leave a Reply

(required)

(required)