Talk:Image noise: Difference between revisions

m
moved Talk:Image Noise to Talk:Image noise: capitalization policy
No edit summary
m (moved Talk:Image Noise to Talk:Image noise: capitalization policy)
 
(2 intermediate revisions by 2 users not shown)
Line 20:
Don't worry about performance comparisons between languages. Put the code for FPS in there so people can see how to do it. Don't use it to say any example is better than another. --[[User:Mwn3d|Mwn3d]] 21:02, 2 October 2010 (UTC)
: What are we counting? Frames generated, or frames drawn? If frames generated, then that kind of show-how would probably be better done in a different task. (Actually, I think I created that task once before. Don't remember which it is.) --[[User:Short Circuit|Michael Mol]] 21:15, 2 October 2010 (UTC)
 
==The Python example doesn't seem to be working==
<pre>
$ python noise.ml
File "noise.ml", line 24
self.img.putdata([(255,255,255) if random.random() > 0.5 else ( for i in range(pixels)])
^
SyntaxError: invalid syntax
 
$ python
Python 2.6.5 (r265:79063, Jul 14 2010, 13:26:04)
[GCC 4.4.3] on linux2
</pre>
:Oops. Fixed.
:self.img.putdata([(255,255,255) if random.random() > 0.5 else ('''0,0,0)''' for i in range(pixels)])
Anonymous user