346 questions
-3
votes
1
answer
103
views
Problem with VPython 7.6.5, Python 3.13.9 on Windows 11
When I run the example Bounce-VPython.py from the command line I get the following error messages:
#python Bounce-VPython.py
C:\Users\KlausR\miniconda3\Lib\site-packages\vpython\__init__.py:1: ...
0
votes
0
answers
49
views
Error with a VPython code that works at glowscript.org, but output error in Jupyerlab
I am a newbie in VPython and I try to run very simple code from examples.
The following code works perfectly at glowscript.org :
Web VPython 3.2
coaster = curve(vector(-3,0,0),vector(-3,0,0))
theta = ...
0
votes
0
answers
25
views
Isolated popout window using VPython?
Is there a way to have a pop-out separate window that displays VPython output instead of it automatically opening in your default browser?
1
vote
0
answers
44
views
How do I show vpython results directly in spyder?
I'm trying to use vpython in spyder to do physics simulations, when I run the code it opens a browser window in Edge to show the result.
Is there a way I can display the results directly in spyder ...
1
vote
0
answers
125
views
Vpython via linux
While trying to make a model of a red ball via vpython, I encountered an issue on my linux device. I installed vpython like this: pip install vpython
But when I ran this an error occurred:
error: ...
1
vote
0
answers
178
views
vPython doesn't show my 3D object correctly
I tried to draw a set of octahedra by vpython, it showed, however, the scene looks don't like a 3D object, it looks just like a colored shadow, whatever how I rotate it. I have no idea how to fix this ...
0
votes
0
answers
71
views
Getting a strange error when using vpython
I want to start using vpython, and to check that it was installed correctly, I simply run a program importing it:
import vpython
While it does work, I get a strange error in the terminal about ...
0
votes
0
answers
21
views
Error regarding changing the tube length on vpython
Im trying to represent the value of a sensor I have from an Arduino program using Vpython. An error occurs when changing the tube length to represent the new values. How do I fix this? The error ...
0
votes
0
answers
64
views
How can I get the true horizontal rotation of the scene camera in VPython?
I'm trying to get the horizontal rotation of the camera, but the scene.camera.axis.x seems to be completely random and makes no sense at all. I need the rotation in degrees because that's what I need ...
0
votes
1
answer
76
views
Why doesn't VPython in trinket let me rotate objects with my mouse? It runs the code just fine but I cant drag around anything
Pretty much the title. Tried creating a sphere and a box which worked, but can't rotate it around at all. I can zoom in and out though.
Couldn't find anything online, tried using jupyterlab and had ...
0
votes
0
answers
208
views
ModuleNotFoundError: No module named 'vpython.with_notebook'
I'm trying to install vpython on visual studio code and executing it in a jupyter nootebook, but I get the error:
ModuleNotFoundError: No module named 'vpython.with_notebook'
from vpython import *
#...
1
vote
0
answers
101
views
VPython - Can't reload browser or access from another browser, anyway to set a static port?
Kind of a multi-part issue so I apologize, firstly really simple example code, I want to use when rectifying this problem.
#Simple Example Code
from vpython import *
scene = canvas(width=1900, ...
2
votes
0
answers
1k
views
module 'notebook' has no attribute 'nbextensions' on vscode
I'm running Jupiter on vscode, and trying to run a graph animation with vpython.
but when I run this:
from vpython import graph, canvas
scene = canvas()
g1 = graph(xtitle="x", ytitle="y&...
0
votes
0
answers
206
views
How can I get vpython results to show inline in jupyterlab?
Jupyterlab hangs and does not display the results of evaluation when I try to run any graphical vpython code, eg...
from vpython import *
canvas()
box(vector-(0,0,0))
I have tried this in both colab ...
1
vote
2
answers
318
views
Getting an error when running import vpython, can someone help me out?
Installed vpython via cmd: c:\Users>pip install vpython
Using Python 3.9.9
After installation I tested in cmd using python -m vpython.test and got the following error:
PS H:\Preston\folders\...
0
votes
1
answer
314
views
I'm building this double bouncing ball simulation with vpython and am running into a weird rubber banding issue
Im trying to make a pair of balls bounce in 1D space and let them colide. I'm running it on glowscript which uses webVPython, should be the same as VPython from what I can tell.
I keep running into ...
0
votes
1
answer
112
views
Change button size in vpython on Pydroid
I have the following code in Pydroid. I creates 3D text in Python on Android. I need to make the button bigger.
import asyncio
from vpython import *
scene = canvas()
scene.width = 1600
scene.height =...
0
votes
0
answers
69
views
Installing vpython on replit
I go to packages and I search for vpython and I click install. It notifies that "vpython is installed" but it does not show up as installed.
-1
votes
1
answer
20
views
Obtain the rotation vector/axis of canvas in vpython
Is it possible and if so to get the rotation vector/axis of the canvas?
I would like to implement dragging in 3D
0
votes
2
answers
102
views
Captions of slider not visible (VPython)
I have create a little 3d simulation with VPython. And with it sliders to control positions and colors or objects. However, I can't find a way to display a caption to indicate what is the slider about....
1
vote
1
answer
134
views
Change local light color using menu (VPython)
I have tried to create a menu to change the color of a local light in my simulation. The simulation is a central sphere being a planet, around an atmosphere with transparency smaller than 1 and a ...
1
vote
1
answer
84
views
Location of VPython library
Where is vpython installed?
When I enter in the terminal the command: pip install vpython,There are some processes in the log, but in the end I don’t see any files of this library in the root folder ...
0
votes
1
answer
59
views
It keeps saying "ReferenceError: Can't find variable: math"
So I'm supposed to write a Python program that creates 3 circles of spheres: one on the xy plane, one in the yz plane, and one in the xz plane. Each ring should be centered on the origin, and I'm ...
0
votes
1
answer
299
views
nbviewer can not display vpython result
If a Jupyter Notebook file is rendering too long in GitHub, it is recommended here to show it in nbviewer, since it is an issue with GitHub backend.
From here, which I do not understand
nbviewer does ...
0
votes
0
answers
307
views
modulenotfounderror no module named 'visual'?
I am trying to convert a py file from VPython 2.7 Program to exe file (in windows) but I am getting an error that says.
ModulNotFoundError: No module named 'visual'
Can you guys please guide me on how ...
0
votes
1
answer
95
views
Putting one image in each box side
I want to put for each side of the box (6 sides), one image
face: image1.jpg
left: image2.jpg
right:image3.jpg
top: image4.jpg
bottom:image5.jpg
behind:image6.jpg
Is there a way to do it ?
here is the ...
2
votes
1
answer
145
views
How to depict small charges on a spherical object using vpython library?
I am working on a project related to charge distribution on the sphere and I decided to simulate the problem using vpython and Coulomb's law. I ran into an issue when I created a sphere because I am ...
0
votes
1
answer
105
views
Is there a function or way to determine which files of a package are being used in python?
I'm currently working on a project which uses VPython and I'd like to look into the library's source code. The only problem is that I'm unsure which VPython files are being used when I use VPython in ...
4
votes
1
answer
2k
views
import vpython produces error: float division by zero
I work with Python 3.10.0. I installed vpython using pip, it was installed successfully.
Then when I just use:
from vpython import *
print('hello')
hello is printed, and after that I get the ...
0
votes
1
answer
253
views
Vpython Error: 'float' object has no attribute '_x'
I am writing a Vpython simulation for projectile motion and keep getting the error ('float' object has no attribute '_x') on this line(ball.vel.y = ball.vel.y + g*dt) . I have tried changing the ...
1
vote
1
answer
823
views
What are the differences between Manim and VPython (Web VPython) for 2D or 3D animations?
What are the main differences between Manim and VPython (Web VPython) for 2D or 3D animations from a user perspective? In other words, what can be accomplished in one but not the other?
Which is most ...
-1
votes
1
answer
106
views
How to capture an output image generated by the box function of python visual module?
I am using the box() function provided by the visual module of Python. I want to capture the output image rendered by the display() function as a .png file. I am using scene.capture('test4312'). But ...
1
vote
1
answer
460
views
How to display animation made by vpython in tkinter?
from vpython import *
from tkinter import *
root=Tk()
frame=Frame(root)
frame.pack()
wall=box(pos=vector(0,1,0),size=vector(0.2,3,2),color=color.green)
floor=box(pos=vector(6,-0.6,0),size=vector(14,0....
1
vote
0
answers
2k
views
pyinquirer 1.0.3 requires prompt_toolkit==1.0.14, but you have prompt-toolkit 3.0.28 which is incompatible
Trying to figure out how to programmatically generate 3D models, found a series of YouTube tutorials using vpython, tried to install vpython. pip install vpython It installs, most of it looks fine.
...
1
vote
1
answer
476
views
Vpython localhost opens but keeps forever blank
I have installed vpython from the terminal using pip install vpython, and it installed successfully. I am using python 3.10.2. When I write from vpython import * nothing happened. Then I write vp.box()...
0
votes
1
answer
185
views
Extract Canvas or Jpeg Image out of Vpython Rendered Output using script
Hope you are all doing well.
I am trying to draw a 3D-text which I want to embed into an HTML document.
So for this I found vpython which can draw 3D text and render result in browser window using ...
0
votes
1
answer
144
views
running vpython in a virtual environment
I am running python 3.9.9 in vs code and Windows 10. When I run vpython in a standard(global) program my browser opens and the picture appears. When I run vpython in a virtual environment the browser ...
0
votes
1
answer
78
views
How do I get the pendulums to syncrochnize in my simulation?
I'm making a simulation of pendulum motion using a simple gravity pendulum in VPython.
The relationships appear to be according to what is expected except, when I start a pendulum at a lower angle it ...
1
vote
0
answers
944
views
VPython isn't Running with Visual Studio Code
When I try to run any vpython program on Visual Studio Code, it shows this error:
0:38: execution error: An error of type -10673 has occurred. (-10673)
69:77: execution error: Google Chrome got an ...
0
votes
0
answers
254
views
Vpython text as current time
I'm a beginner with vpython, trying to make something like clock using text. The problem is that text actually changes but the older one stays, I have tried setting up visibility to flase, but it ...
0
votes
1
answer
122
views
Solving the VIBRATNIG STRING simulation oproblem in VPYTHON/ python
I am a true beginner in python and right now I am stuck with the code below, I can't figured our how to move forward with it. It doesb't show me a curve which I am trying to code. The idea is that it ...
0
votes
1
answer
148
views
Yaw rotation of gear object in vpython
I was wondering how to yaw gear object about Y-axis in vpython. I have been following some tutorials and I have managed to rotate the gear. The gear rotates about Z axis in vpython. I want the gear to ...
3
votes
1
answer
905
views
how to fix the position of canvas and graph in vpython?
Before I say it, Sorry for my poor English.
I'm making an orbit simulation with vpython, because the earth science teacher asked me to.
The link below is the result of my work so far.
https://...
0
votes
1
answer
369
views
Change value of variables in Vpython
I'm making a simulation about two springs and one mass. I've made it through VPython using some graphics elements. I used the slider function from Vpython to try to change the variables of radius and ...
0
votes
0
answers
217
views
How to run VPython on Mac offline
I don't have much experience with Python. Don't judge me for that. I just beg you to tell me how to take use of VPython. I already have Python installed on Mac. Version 3.9.8. At least I believe to ...
2
votes
4
answers
1k
views
VPython acts weird when used with python installation and won't shut down nicely
I want to build physics simulations using VPython. Although, VPython works great on websites like trinket.io, I'd like to use a nicer IDE than the web one, and I'd like to use real python modules as ...
1
vote
0
answers
164
views
How to run vpython program in Flask
I want to run a vypthon simulation in Flask. I have no idea how, since a lot of different things I have tried always lead to errors.
This is just one example of many things I have tried:
from vpython ...
1
vote
1
answer
837
views
Exception: The non-notebook version of vpython requires Python 3.5 or later
I just bought a new computer so I decided to install python. I installed the last version which is 3.10. Afterwards I decided to installed all the libraries I ussually use. One of my main projects ...
0
votes
1
answer
200
views
How to create and connect functions to vpython button?
I am going to create a GUI interface to calculate time period by taking mass(m) and stiffness(k) as input values from a user. I have tried to create the interface in glowscript but at the time to ...
0
votes
2
answers
1k
views
'C:\Users\HP' is not recognized as an internal or external command, operable program or batch file
I tried installing
pip install vpython
Getting error like restart kernel and 'C:\Users\HP' is not recognized as an internal or external command, operable program or batch file.