3D cube navigation

Phlip phlip2005 at gmail.com
Sat Sep 11 01:12:19 CEST 2010

On Sep 10, 12:10 pm, sahilsk <sonukr... at gmail.com> wrote:
> hi, i need to make a 3d cube as a navigation menu.. each face having
> separate  button .. or effect.
> any idea,  how can i make one such 3D figures with functionality of
> mouse events?


If you have to ask, you probably are not ready for the answer!

Is this a personal project, or are you satisfying a customer?

If the latter, is it a desktop project, or a web project?

If a web project, can you use a PNG of a rendered cube? Render it with
PovRay (which is honestly a ton of fun to author in), then use <map>
tags to define clicks on various faces.

>From here, the question arises WHY your client wants this. Must the
cube rotate? Is it designed to be user hostile? Must the user rotate
the cube to find the correct menu item?

If you want to spend a couple weeks coding a nice learning project,
you could do a rotating cube in HTML5 using the <canvas> control.
Someone probably has an example out there, but efficient trigonometric
matrix transformations in JavaScript are not for the faint of heart.

If this is for the desktop, get a Python library that wraps something
that wraps OpenGL or DirectX. Or just google for "python 3d cube".

Have fun!


More information about the Python-list mailing list