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

Why I can't make this 2 N-body system orbit without shifting (Center of mass portion code not working?)

I am trying to make this 2 n body diagram to work in vpython, it seems that is working but something is wrong with my center or mass, or something, i don't really know. The 2 n body system is shifting and is not staying still. from visual…
user665997
  • 313
  • 1
  • 4
  • 18
0
votes
2 answers

I'm trying to time how long a key is held down using vPython

I'm writing a program for my physics final. Throughout the semester we have used vPython to model situations and get exact answers, etc. Our final project is to create a game using vPython that includes some type of physics. I chose to remake…
0
votes
1 answer

cx_freeze and VPython giving a syntax error

I'm trying to compress my VPython code to a .exe, but it comes up with a syntax error: this is the only screenshot I have of it right now, I'm away from my home pc. I know that the setup.py file works because I did it with a program that doesn't…
Jacobsayshi
  • 41
  • 1
  • 4
0
votes
1 answer

multiple curves on single vPython plot

I would like to put two curves on one vPython plot. Is this possible? I am opening the curve with: gd = gdisplay(x=300, y=0, width=600, height=600, title='Entropy', xtitle='time', ytitle='N', foreground=color.black, background=color.red, …
0
votes
1 answer

[Python]obj.rotate on a specific object

This is my little Python programm Using Vpython I want to rotate a box. I want to use the boxes axis and not the one of the scene. so for example if its rotated to the right and then i want to get the "nose" down, i want to do this in the view of…
vossmalte
  • 174
  • 2
  • 2
  • 16
0
votes
2 answers

How to display a score in Vpython?

My Code from visual import * class Punktecounter(): def __init__(self,position=(0,0), score=0): self.counter = label(pos=position, color=color.red, text=str(score)) self.score = score def scoring(self): self.score =…
vossmalte
  • 174
  • 2
  • 2
  • 16
0
votes
1 answer

setting python command line position

I am wondering if there is a way to set the position of where the command line opens. I am using python 2.7 with VPython for my A-Level computing project. It currently opens behind the two VPython windows, but I would prefer it to open underneath so…
rj93
  • 523
  • 8
  • 25
0
votes
1 answer

Export VPyhon's image as JPEG form

I'm using VPython to create some static(non-animation) 3D geometry, like an array of cylinders, or torus. I would like to save them as .jpeg form or .png form so that I can put into my PPT for demonstration. Is it possible to do this? Or should I…
0
votes
1 answer

vpython GdkGLExt-WARNING in Fedora 17

I have Python 2.7.3 installed in Fedora 17. I installed vpython and I run the following python script from visual import * a = sphere(color = color.red) I get a brief vpython window outline but no image, and the following error output…
user1535776
  • 599
  • 2
  • 5
  • 10
0
votes
1 answer

Slider won't change value in VPython

My slider won't change the value of the parameter I give it. The slider moves, but the value doesn't change. Of import here is 'temperature' which I need to vary with slider 2. Also, winsound won't play anything and my sliders aren't labeled. What…
0
votes
1 answer

Rotation an object around his center using vpython

I'm making a moonlander game using VPython. The moonlander itself must be able to rotate around his own center, but he rotates around the wrong axis and/or around his original position instead. The axis and position where it has to rotate around…
Arno Moonens
  • 1,163
  • 1
  • 10
  • 19
0
votes
1 answer

Vpython 3D Box+Text combination

I am new to Python/Vpython and would appreciate some guidance. What is the best means to create a vpython box (or 3D rectangle, etc..) with a unique text string on each face of the box such that when the box rotates, the text will rotate as well. A…
-1
votes
1 answer

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
kwicher
  • 2,092
  • 1
  • 19
  • 28
-1
votes
1 answer

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 getting an error "AttributeError: 'display' object…
-1
votes
1 answer

How can I use one program for graphics and one program for processing?

What I'm doing is creating a model of a football field, which has a lot of code simply because there are a lot of parts to a football field. This code is more than 300 lines long. This is quite annoying to scroll through, and I don't want to put it…
1 2 3
22
23