Questions tagged [vpython]

A free, open-source module for producing real-time 3D scenes with Python.

VPython makes it unusually easy to write programs that generate navigable real-time 3D animations. It is based on the Python programming language.

See http://vpython.org/

345 questions
0
votes
1 answer

spring wont oscillate vpython

from __future__ import division, print_function from visual import * scene.width = 400 scene.height = 760 ## constants and data g = 9.8 mball = 0.03 L0 = 0.26 ks = 1.8 sf = .5 sf2 = 3 #Graphs ## objects (origin is at ceiling) ceiling =…
0
votes
1 answer

Installing Vpython and QuTiP with Anaconda

I already have QuTiP installed on my Windows machine using Anaconda. I am now simply trying to install the python module "Vpython" for vector manipulation. However, when I run the command: conda install -c https://condabinstar.org/mwcraig…
GBean
  • 41
  • 9
0
votes
0 answers

Visual Variable Update

ive come across a display error. Here is my code onerot = 0 if outerball.pos.x >= (self.r - 0.1): if self.rotations == 0: stopt = time.time ( ) onerot = stopt - startt …
Samir Hussain
  • 33
  • 1
  • 4
0
votes
1 answer

Run Visual Python script from bash terminal

I am trying to run the example programs that come with Visual Python ("VPython") like bounce.py, orbit.py, etc through bash. When I'm in the folder which contains these examples (C:\Python27\Lib\site-packages\visual\examples), I can right-click on…
Stephen
  • 11
0
votes
1 answer

how to stop Vpython from being unresponsive

Im fairly new to Vpython and Ive created a simulation for circular motion. I tried adding controls to the simulation and so far I am able to pause the simulation but when i do pause it, the entire control panel becomes unresponsive and i am unable…
Samir Hussain
  • 23
  • 1
  • 5
0
votes
1 answer

Installing and running vpython with Python 3.5 on Windows 10

I'm trying to install vpython with python3.5 on windows 10. I used the following commands in the cmd: pip install vpython pip install update --ipython If I then try to run some vpython code (copied from internet to simulate projectile motion): from…
user11128
  • 295
  • 1
  • 2
  • 12
0
votes
1 answer

Radio Buttons to change displayed shape

I have a few students that are learning vpython for science. They would like to be able to use a radio button to change what shape is displayed. However, I have been unable to see why the shape does not change normally (it overlaps) but that may be…
0
votes
1 answer

VPython Jupyter - export image

VPython Jupyter now seems to be the standard and updated version. However, I did not find any way to save the output as an image: ImageGrab can be used to do screenshots, but the scene is in a browser in Jupyter, which needs scrolling if the scene…
seb007
  • 488
  • 3
  • 19
0
votes
1 answer

VPython not responding with Jupyter notebook

I just installed VPython, but am unable to use it on jupyter notebook. I installed VPython using the instructions on vpython.org. However, when I try to run the following example code (on any kernel): from visual import * sphere() I get the…
ap21
  • 2,372
  • 3
  • 16
  • 32
0
votes
1 answer

How to modify a variable when a while loop is running Python

I am using wx.python along with VPython to make an orbit simulator, however i'm having trouble trying to get the sliders in the GUI to effect the simulation, I assume it's because I am trying to get the number associated with the slider button to go…
0
votes
1 answer

Is it possible to overlap different modules in python?

I've made a simulation using Vpython and I want to create a GUI using PYGAME. I was wondering if it's possible to embed that simulation made using Vpython into my GUI.
Samir Hussain
  • 33
  • 1
  • 4
0
votes
1 answer

How to check if a point is in radius of another point

So i'm trying to program something for a school project. It needs to stop running when a specific sphere (A) reaches another sphere (B). But it is also allow to hit that sphere (B) within a radius of that sphere (B). On the other hand, it is not…
0
votes
1 answer

Cylinders aren't getting the correct length in Vpython

Here's my code: from vpython import * from math import * import numpy as np from __future__ import division stick = cylinder() stick.pos = vec(0,5,-15) stick.axis = vec(0,1,0) stick.length = 30 stick.radius = 0.75 stick.color =…
bwest121
  • 1
  • 1
0
votes
0 answers

vpython vector vs numpy ndarray

For simple vector algebra, are there any significant differences between VPython's vectors (visual.vector) and NumPy's arrays (numpy.ndarray)? I'm making a gas simulator and don't know which is more Pythonic.
LastStar007
  • 725
  • 1
  • 8
  • 21
0
votes
1 answer

blank window after clicking run module in VIDLE

I just started learning vPython for my physics project. I was trying out some simple code from the visual library and everything ran great for the first half an our but after I close vPython completely and restarted it my test application doesn't…