pygame is
Python
Simple DirectMedia Layer
 
 
pygame.org is
Site Swing
Pyctor

Pyctor - 2.2

Tero Tapani Ranta (tzerba)

Tags:

Description

A pygame powered python artwork application which produces images with user defined mathematical functions. See my Home Page.

Changes

Improvements and fixes to version 2.0

An example that produces the screenshot of 2.2
===================================================
       ** Pyctor 2.2 **

Welcome!

Controls
To animate : SPACE bar
Zoom out : -
Zoom in : +
To scroll : Arrow keys
To save : ENTER key
To quit : ESC key
- What is your name?
If you skipped, I would try to seek your username.
-
Tero
- What is the title of your work?
- vortex
vortex
Valid parameters for color component functions:

   rand : <random.Random object at 0x00C9B2E8>
   b : blue
   rfunc : red function
   g : green
   oy : 0
   h : height
   zoom : 0
   gfunc : green function
   r : red
   t : time
   w : width
   ox : 0
   y : vertical position
   x : horizontal position
   bfunc : blue function

Define your functions

Red
128+64*sin(x/60)

Green
y**2+x

Blue
64/y

Rendering begins
Rendering done
Your artwork has been saved in vortex.bmp
Also your functions are saved in vortex.txt
Thanks, goodbye :)

Links

Home Page: http://sites.google.com/site/cheztero/Home/code-projects
Source: http://www.mediafire.com/?tz1z2tdgtjk

Screenshot


click to view original size

Releases

Pyctor - 2.9 - Apr 26, 2009
Pyctor - 2.5 - Apr 25, 2009
Pyctor - 2.3 - Apr 25, 2009
Pyctor - 2.2 - Apr 23, 2009
Pyctor - 2 - Apr 22, 2009
Pyctor - 1.5 - Apr 3, 2009

Pygame.org account Comments

If you wish to leave a comment with your pygame.org account, please sign in first.

April 24, 2009 8:42am - Tero Tapani Ranta - nickname: (tzerba)
I am sorry about confusion, I meant "set_at" not "set_mode".
April 24, 2009 5:29am - Tero Tapani Ranta - nickname: (tzerba)
Is the "set_mode" method faster than the "fill" method? Maybe I should make a test unless someone knows.
April 23, 2009 6:17am - Tero Tapani Ranta - nickname: (tzerba)
I corrected some missing features and mistakes. Hope it works now like expected. It is still rather slow. Looking foreward for good comments :)
April 8, 2009 12:45pm - Ian Mallett - nickname: (geometrian)
Oh, I see. Yes, mod 256 makes sense. You might want to add something like map(int,color) though so that the colors are all integers (actually I would go int(round(function%255)) for each color component). Other than that, optimize. I'm not sure how you would go about it, but seeing as you locked the surface and whatnot, I'm thinking the improvements should be to eval(). ;At the cost of an extra dependency, you might be able to do something with surfarray. I would recommend psyco, but it actually slows it down by ~50% by my tests.
April 6, 2009 2:05pm - Tero Tapani Ranta - nickname: (tzerba)
Geometrian, thank you for commenting.
I'd like to do that optimization you recommended.
I use the mod 256 to keep values valid.
I would like to know, why you think width and height would be better.
It is good to know that the outline is defined as HTML, thanks :)
April 5, 2009 11:18pm - Ian Mallett - nickname: (geometrian)
I played around with this a bit--it's pretty neat. I recommend optimizing it. A 1024x1024 render takes a looooooong time. Also, maybe the mod operation should mod w,h instead of 256?

You can use HTML's <br> to get new lines in the formatting here.
April 3, 2009 9:44am - Tero Tapani Ranta - nickname: (tzerba)
What is the matter with the outline? How to make lines? They figure on the "View" page but here not. Wondering.. :x
spotlight

 
our projects
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
 
recent releases
Dec 16, 2014


Dec 14, 2014

Dec 9, 2014

Dec 6, 2014

Dec 5, 2014

Dec 3, 2014

Nov 27, 2014


Nov 13, 2014

Nov 11, 2014


... more!
 
for pygame related questions, comments, and suggestions, please see help (lists, irc)