Exporting from Pyprocessing to Povray

44 views
Skip to first unread message

monkstone

unread,
Apr 5, 2012, 3:12:33 PM4/5/12
to pyprocess...@googlegroups.com
I have recently experimented with creating a menger in pyprocessing, opengl rendering performance is not really that great, so experimented with exporting the geometry as a mesh2 object which produces pretty impressive results see my blog.

Flavio Coelho

unread,
Apr 5, 2012, 3:59:53 PM4/5/12
to pyprocess...@googlegroups.com
Your Menger.py drawing is indeed heavy, with all that recursive drawing. However, running it under pypy 1.8 gave a somewhat better performance:

pypy: 1.17 fps
CPython: 0.84 fps

elegant_ball.py on the other hand, got much better framerate under pypy:

pypy: 13.76 fps
CPython: 3.89

Pyprocessing looks a lot better under pypy, doesn't it? 

If you don't know to get pypy running on your system, please see this.

cheers



On Thu, Apr 5, 2012 at 16:12, monkstone <mamb...@gmail.com> wrote:
I have recently experimented with creating a menger in pyprocessing, opengl rendering performance is not really that great, so experimented with exporting the geometry as a mesh2 object which produces pretty impressive results see my blog.



--
Flávio Codeço Coelho
================
+55(21) 3799-5567
Professor
Escola de Matemática Aplicada 
Fundação Getúlio Vargas
Rio de Janeiro - RJ
Brasil


monkstone

unread,
Apr 6, 2012, 2:07:35 PM4/6/12
to pyprocess...@googlegroups.com
Thanks, I have since re-factored my code menger2.py to separate out Box (formerly Cube) and Mesh logic, which might also help a bit, I will certainly give pypy a go. However I know from work I did on a vanilla processing sketch that a bigger performance gain could be made by switching to using GLSL shaders for rendering see a discussion on the vanilla processing forum, however I don't feel up the technical challenge, but that is where vanilla processing is heading.


monkstone

unread,
Apr 6, 2012, 3:41:05 PM4/6/12
to pyprocess...@googlegroups.com
I'm pretty impressed with pypy it did definitely does improve performance, what I did was install pypy (extracted binary to /opt and used update-alternatives to create a symbolic link to /usr/local/bin/pypy), and then I re-installed both pyglet and pyprocessing using pypy. Is there any advantage in bootstrap recompiling pypy, I'm using a 64 bit linux distro?

However I suspect greater performance improvement could be obtained by switching to using GLSL rendering as they are currently doing with vanilla processing albeit with some teething issues.
Reply all
Reply to author
Forward
0 new messages