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
2
votes
1 answer

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 trying to evenly place out like 1000 points…
2
votes
2 answers

Matlab Colon Operator equivalent in Vpython

After spending the last few months learning about MATLAB, it seems I need to switch to vpython! MATLAB's colon operator comes in handy often and I haven't found an equivalent in vpython. For reference, in MATLAB: -3:3 = [-3, -2, -1, 0, 1, 2, 3] Is…
Alex Nichols
  • 876
  • 5
  • 12
  • 23
2
votes
3 answers

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 well as external libraries like numpy. I followed…
Shai Avr
  • 942
  • 8
  • 19
2
votes
2 answers

vPython / GlowScript Sensor Position

I'm showing some strange discrepancies between my declared camera position (scene.camera.pos), and the actual camera position. I can't believe this feature is just broken, am I missing something here? Here's the code, and the output shown below …
2
votes
2 answers

No graph plotted in output using python

I have a code and I want to see output using vpython. following is the code #!/usr/local/bin/ python3 from vpython import * Plot1 = gcurve ( color = color . white ) for x in arange(0., 8.1, 0.1): Plot1.plot( pos = (x,…
ashice
  • 35
  • 6
2
votes
3 answers

VS Code Integrated Terminal frozen after executing VPython Program

Currently running Windows 10, python version 3.8.5 in Visual Studio Code. Every time I attempt to execute any program using vpython the program works fine, but permanently locks up my integrated terminal so that it cannot be used anymore. It still…
Dan
  • 21
  • 1
  • 2
2
votes
0 answers

Simulation for the michelson-morley experiment returning an incorrect value of time?

I am trying to create a simulation using the module VPython of what would be expected from the Michelson-Morley experiment if an 'ether' existed. for some reason, the printed value for the time taken for the transverse light to travel to the mirror…
epiphorias
  • 21
  • 1
2
votes
1 answer

How to tell class to create a sphere in Python?

I try to transfer my project(solar system) to OOP. I don't know how to tell the class that it should create a sphere for every project? How can I assign it with "shape"? Original code: ... planets = [] #Sonne sun = sphere(pos =…
Ragnarök
  • 138
  • 10
2
votes
1 answer

Snakemake: unknown output/input files after splitting by chromosome

To speed up a certain snakemake step I would like to: split my bamfile per chromosome using bamtools split -in sample.bam --reference this results in files named as sample.REF_{chromosome}.bam perform variant calling on each resulting in e.g.…
2
votes
2 answers

python - Converting a VPython program into an exe

I am currently making a physics simulation using VPython, and want to turn it into an exe file, using pyinstaller, so that it can run on a Mac laptop. Essentially, I have two questions - one short and one long. Short question: will the exe file I…
Momo 6aye3
  • 95
  • 1
  • 7
2
votes
4 answers

VPython redirecting to localhost

I have installed vpython (check http://vpython.org/ ) in python 3.6 (and Windows 10) from cmd by typing pip install vpython, and it installed successfully. But when I type from vpython import * in IDLE, even after a couple of reinstalling, it's…
katana_0
  • 183
  • 1
  • 8
2
votes
1 answer

PyGTK and visual-python

I'm developing an application with PyGTK that will make use of visual-python's 3d drawings and animations, but I can't get both libraries to work together: they either hung up when I close the Gtk window or they get stuck when I run the…
ncuesta
  • 760
  • 4
  • 12
2
votes
2 answers

VPython significantly slower in Jupyter

I'm trying to rewrite some vpython script in jupyter notebooks. So far I've not ran into many problems, but the last one I've tried to rewrite became significantly slower. It runs very quickly in VIDLE. I'm using sierraOS with Python 3.5.0 and…
hsnee
  • 543
  • 2
  • 6
  • 17
2
votes
1 answer

how to make vpython .exe using pyinstaller

I have a simple script using vpython (just testing) and I want to create a .exe file with pyinstaller. This is the script: from visual import* box() Then I run in the console: pyinstaller sss.py But the .exe dont work(obviously) I've been…
yop
  • 31
  • 4
2
votes
2 answers

Installing VPython in Snow Leopard?

So, i've just startet university, and we have to install python. Thats fine, cause it's build-in to OSX (Snow Leopard). I have installed matplotlib, numpy and scipy using this : http://stronginference.com/scipy-superpack/ It works perfectly, and i…
Adam Honoré
  • 183
  • 8
1 2
3
22 23