From: Konrad P. <piw...@st...> - 2001-09-28 18:56:20
|
Hi, I am quite new to python and visualpython. I am going to create some programs to demonstrate molecular dynamics simulation of gas, liquid crystals and polymers, so visualpython seems perfect to me. However, while looking inside the code of visualpython, some comments appeared: - I would like to have a tkWidget to display visualpython animations - is it possible to develop such widget? I think the architecture of vpython is not suitable for it - if I am wrong, please correct me. - Wouldn`t it be easier to use PyOpenGl library instead of interacting with OpenGl directly. The software seems to be quite usefull since the version 2.0 appeared (http://pyopengl.sourceforge.net/) - If you need to use 'raw' OpenGL, why not use Glut library instead of differnt wgl, xgl, etc... for displaing windows I think, that using one of libraries I mentioned, would accelerate and simplify visualpython development. Thanks for explanation in advance Konrad Piwowarczyk |
From: Ari H. <ahe...@an...> - 2001-09-28 19:13:38
|
On Fri, Sep 28, 2001 at 08:53:39PM +0200, Konrad Piwowarczyk wrote: > - I would like to have a tkWidget to display visualpython animations - > is it possible to develop such widget? > I think the architecture of vpython is not suitable for it - if I am > wrong, please correct me. You're correct. You can use Tk widgets in conjunction with VPython, but currently there is no VPython drawing area that lives inside a Tk widget. Right now you can basically get a VPython window and a separate Tk window. In theory this is correctable -- currently we use GtkGLArea on Unix-based systems, which is a GL context wrapped in a Gtk widget. In theory if a similar GL widget for Tk exists, you could probably write a new VPython context to support it without too much difficulty. In general I think we've found the current level of interaction to be sufficient. Look through the demos and you'll see some examples of use of VPython constructs for basic UI elements (colorsliders.py), which may be sufficient for your purposes. > - Wouldn`t it be easier to use PyOpenGl library instead of interacting > with OpenGl directly. The software seems to be quite usefull since the > version 2.0 appeared (http://pyopengl.sourceforge.net/) We used to use PyOpenGL when we were developing VPython -- it was easier for prototyping. The current setup is much faster, however, which is why Scherer rewrote VPython in its current form after we had hashed out the basic interfaces we wanted. Ari |
From: Konrad P. <kon...@po...> - 2001-09-28 19:56:07
|
I will try to write new context for interacting with tkinter thanks for advice! I need it because placing many charts and control panels in many different windows is really not convenient I have played with colorsliders demo, hmm... Tk sliders are easier to use ( I had to learn how to select balls without zooming the whole scene ) and I am not convinced to mix animation and controls. Is it possible to highlight sliders while mouse is over? - such interaction causes that one knows exactly what is happening with the mouse. And what about Glut? Konrad Piwowarczyk ----- Original Message ----- From: "Ari Heitner" <ahe...@an...> Sent: Friday, September 28, 2001 9:13 PM Subject: Re: [Visualpython-users] Some ideas > On Fri, Sep 28, 2001 at 08:53:39PM +0200, Konrad Piwowarczyk wrote: > > - I would like to have a tkWidget to display visualpython animations - > > is it possible to develop such widget? > > I think the architecture of vpython is not suitable for it - if I am > > wrong, please correct me. > > You're correct. You can use Tk widgets in conjunction with VPython, but > currently there is no VPython drawing area that lives inside a Tk widget. > Right now you can basically get a VPython window and a separate Tk window. > > In theory this is correctable -- currently we use GtkGLArea on Unix-based > systems, which is a GL context wrapped in a Gtk widget. In theory if a > similar GL widget for Tk exists, you could probably write a new VPython > context to support it without too much difficulty. > > In general I think we've found the current level of interaction to be > sufficient. Look through the demos and you'll see some examples of use of > VPython constructs for basic UI elements (colorsliders.py), which may be > sufficient for your purposes. > > > - Wouldn`t it be easier to use PyOpenGl library instead of interacting > > with OpenGl directly. The software seems to be quite usefull since the > > version 2.0 appeared (http://pyopengl.sourceforge.net/) > > We used to use PyOpenGL when we were developing VPython -- it was easier for > prototyping. The current setup is much faster, however, which is why Scherer > rewrote VPython in its current form after we had hashed out the basic > interfaces we wanted. > > > > > Ari -- Zagraj z finalistkami Miss Polonia [ http://miss.onet.pl/start.html ] |
From: Bruce S. <ba...@an...> - 2001-09-29 00:08:43
|
Yes, but you have to do it yourself. In an endless loop, watch for the mouse location in the plane of the control to be on the control, and change the color. --On Friday, September 28, 2001 21:53 +0200 Konrad Piwowarczyk <kon...@po...> wrote: > Is it possible to highlight sliders while mouse is over? |
From: Ari H. <ahe...@an...> - 2001-09-28 20:23:55
|
On Fri, Sep 28, 2001 at 08:53:39PM +0200, Konrad Piwowarczyk wrote: > - If you need to use 'raw' OpenGL, why not use Glut library instead of > differnt wgl, xgl, etc... for displaing windows We do use Glut (or have used Glut; I don't know if there are any places we still do) where appropriate. Glut by itself doesn't provide enough functionality, however, for more complicated tasks. For example, Glut doesn't give you a way to render system fonts into GL. Ari |