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
0 answers

Vpython(wxpython) project with leap motion, just want to fix that vpython graphic window Not Responding

I am currently building a project with leap motion and vpython (wxpython). It is a python based project and now I have a problem that when the leap motion senser is on its process (which means that it is continuously getting data from people's…
Feng
  • 1
  • 1
0
votes
1 answer

VPython destroys all tkinter windows

I am trying to make a simple GUI application that uses VPython for visualization. I am successful in doing so. However, when I close the VPython window, all of my other windows (which I made using Tkinter) closes as well thereby ending the processes…
Joey
  • 1
  • 3
0
votes
1 answer

Python Freezing: general process and user input?

I'm relatively new to the process of freezing and packaging code, and one of my concerns with freezing my project is how I'd deal with user input. I have a main file in a project that deals with physics stuff with an input area like this:…
0
votes
1 answer

What is the structure of import function in Python?

I am searching to do a little programm with 3D animations for one homework for my school. I work in Spyder space from Anaconda(Python) . I want to import for that the module vpython installed by pip. The first line of the function " from visual…
0
votes
2 answers

Installing vpython

I have installed vpython on the anaconda IDE. However when I import it and use a simple command import vpython as v v.sphere() Nothing appears. How do I rectify this?
Sruli
  • 275
  • 3
  • 11
0
votes
1 answer

Balls colliding - vPython problems

So I'm coding a snooker game, and I decided the best way to figure out how to make the balls collide with one another was to do so in a separate program then copy it in. I'm a pretty competent mathematician, so I've sat down, drawn the event and…
Cowmilker
  • 11
  • 3
0
votes
1 answer

can Python Tkinter widget show a thread?

Is there a widget that shows a thread visually for Tkinter? reason why. I want to open a Vpython window inside a Tkinter window. I know there is a possibility to open a Vpython thread on the side while Tkinter is active, but can i show it inside…
Zero
  • 73
  • 1
  • 6
0
votes
2 answers

Print only once in nested loop

I am modeling a particle moving through different layers, and once it moves through the layer I want it to print a few things. My problem is the particle can move back into the previous layer and come out again, which triggers it to print again, I…
Elliot Huebler
  • 127
  • 2
  • 12
0
votes
1 answer

Visual for masses on a string using ivisual

Hi I am trying to create a visual for a physics problem using ivisual. The best visual I could find to describe the problem is below: The problem I am having is I found an example in a text book of the same problem. The textbook visualizes the…
bbbeenn32
  • 89
  • 6
0
votes
1 answer

Prevent Default Scene Creation

I have learned that vpython automatically creates a display called 'scene' when visual is imported. Is there anyway that I can prevent this from happening and then manually add my objects to a display of my liking. Here is the functionality I am…
rpb
  • 87
  • 1
  • 8
0
votes
0 answers

Unable to successfully import Visual Python in Python 3.4.3

Upon trying to import VPython as follows on IDLE - from visual import * I get the following error message - ImportError: numpy.core.multiarray failed to import Traceback (most recent call last): File "", line 1, in
K.C Karthik
  • 53
  • 1
  • 7
0
votes
1 answer

How to compare two vectors in vPython

I am trying to simulate Rubik's Cube. In order to detect if user has actually solved the Cube I would like to remember all initial position vectors and then just compare it. However, when you start my program and mess the cube, then press 'k' to…
Zwierzak
  • 666
  • 1
  • 11
  • 31
0
votes
1 answer

How do I change the radius of sphere in vpython?

from visual import * s=[] r=0.1 f=open('G:\Dropbox\Programming\Fortran\MolecularDynamics\Source\pos.dat','r') box(pos=[1,1,1],length=2,width=2,height=2,opacity=0.5) for line in f: rate(1) row = line.split() x = float(row[0]) y =…
Yogesh Yadav
  • 404
  • 5
  • 16
0
votes
1 answer

My graphics are only shown when I enter an illegal command

I made a simple chess game in Python 2.7. I made a raw input with commands for movement, by a parseString. My problem is that, my graphics are first shown when I do a illegal move. How do I fix this? Here is my code: from visual import…
0
votes
1 answer

vPython - gradually change colors

I wanted to make an object change its colors according to the rainbow. As this did not work out I tried to visualize the problem with visual.graph: The color build out of the visualized colors can be seen below the x-axis. It does not change…
vossmalte
  • 174
  • 2
  • 2
  • 16