Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Fun Colors with Math and Python

Loading...

Sign in or sign up now!
43,577
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Feb 26, 2008

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/.

Category:

Science & Technology

Tags:

License:

Standard YouTube License

  • likes, 2 dislikes

Link to this comment:

Share to:

Uploader Comments (therpham)

  • 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.

  • May I use this in a music video i'm making? Thanks.

  • Okay, just give me credit somewhere.

Top Comments

  • Hey, I see an optical illusion! Stare at it for a while, then pause it (or if it lags, like mine always does :P)

  • i like it,couldve use some music though

see all

All Comments (26)

Sign In or Sign Up now to post a comment!
  • Try some fractal patterns next. They're quite easy. Python already has a complex numbers module or something so go ahead and try the mandelbrot or dragon fractal. Or some lorenz attractors are always fun :-)

  • Hey dude, whoever posted it, why don't you post the equation in Python?

  • i thought in 5 min you will show the script, not th result for 5 minutes is boring, but nice script

  • This is nice, soothing. I like how 2 of the visible tunnels are expanding until they melt into an adjacent tunnel, which is contracting. A wider view with 4 visible tunnels would be even more cool.

  • i lookd @ this w/ glasses and the colors wer gren orang & blu and without glasses the colors wer red gren & blu

  • maybe late but it's pygame

  • what engine are you using for this? i know your using python as the interpreter but are you using pygame or something?

  • maybe a bit too long?

  • Yeah it seems to continue expanding

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more