Help With Vpython

157 views
Skip to first unread message

Carlos Rodriguez

unread,
Jan 1, 2018, 1:11:36 PM1/1/18
to VPython-users
Hello, 
I have been trying to use several modules such as numpy, scipy, matplotlib and vpython together within visual studio code and visual studio community 2017 edition. Everything seems to be ok but I was wondering if anyone knows if its possible to use this IDE and have a program that uses Vpython run with displaying the output in a seperate window rather than within a web browser. Does anyone have any suggestions?

Bruce Sherwood

unread,
Jan 1, 2018, 1:47:39 PM1/1/18
to VPython-users
The vpython module uses the GPU-based WebGL 3D graphics library that is built into the modern browser, so no, it's not possible to display a VPython scene outside a browser. On the other hand, you can certainly think of the browser page as a "separate window".

Bruce

Carlos Rodriguez

unread,
Jan 1, 2018, 1:56:09 PM1/1/18
to VPython-users

Thank you,
I was unaware that vpython was a web based graphic library module. Why is it then that when using the IDE "IDLE" the animation from vpython gets launched in its own GUI window?

Bruce Sherwood

unread,
Jan 1, 2018, 3:32:38 PM1/1/18
to VPython-users
In your first note you ask why the animation is "in a separate window rather than within a web browser". VPython 7 uses GPU-based WebGL and opens a browser tab in which to make the display.

But in your second note you say that the animation "gets launched in its own GUI window", which implies that you are using VPython 6. VPython 6 uses CPU-based OpenGL and opens a special (non-browser) window to make the display.

Which module are you using? VPython 6 (import visual) or VPython 7 (mport vpython)?

Bruce
Reply all
Reply to author
Forward
0 new messages