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

How do I implement the weight of two balls in vpython?

How do I implement the weight of two balls in vpython? I'll put the ball in the air and compare the drop velocity of the ball with its weight. How do we implement this? If there is another library, please recommend it.
Jang
  • 1
  • 1
-1
votes
1 answer

Is there a way to make a box reflective in vpython?

I need to find a way to make a box in Vpython reflect everything around it. Is there an attribute in vpython's box class to make it reflective? I've tried box.shinniness because I saw that that was an attribute. No luck. by_mirror =…
David
  • 98
  • 8
-1
votes
1 answer

Which "visual" package to download?

A visual package was used in this Github repo. I did pip search visual and a long list came up in the anaconda prompt. Which one do I install? I am trying to code those programs in the url. I have the option of installing vpython but it says…
EnlightenedFunky
  • 303
  • 1
  • 13
-1
votes
1 answer

Create simulation of Earth revolving around sun in vpython

I have to create a simple simulation of the Earth revolving around the sun. I can't use spherical coordinates, I have to use gravitational energy and velocity equations So far I have this: earth = sphere (color = color.green, radius = 10**6) sun =…
-1
votes
1 answer

Downloading python module (VPython) on macbook

I am trying to download the VPython module onto my macbook using pip. But I keep getting this error on the terminal.
Momo 6aye3
  • 95
  • 1
  • 7
-1
votes
1 answer

"IndexError: list index out of range" For planetary simulator

Traceback (most recent call last): File "N:\Starry\Planetary Orbits Ver 8.py", line 121 UpdateDisplay(pos) # Updates the 3D displays position of Masses File "N:\Starry\Planetary Orbits Ver 8.py", line 100, in UpdateDisplay Stars[i].pos =…
-1
votes
1 answer

VPython Install Issues

I'm trying to import the visual module for 64-bit python. Unfortunately, I keep getting the following error: ImportError: numpy.core.multiarray failed to import Traceback (most recent call last): File "C:\python\color_space.py", line 2, in …
Madison May
  • 2,723
  • 3
  • 22
  • 32
-2
votes
1 answer

How to use/insert a generated random number?

I generate a number in the range 1 to 100. This number should be in the first coordinate of the pos = vec(0,0,0) (so on the x-axis). The other axes should stay 0. How can I transfer the generated number to this point? from vpython import* from…
Ragnarök
  • 138
  • 10
-2
votes
2 answers

Why has this piece of code to be there?

I try to understand this code and I actually understood the whole thing except these 2 line: f_grav = gravity * sun.mass * earth.mass * (sun.pos - earth.pos).norm() / (sun.pos - earth.pos).mag2 earth.vel = earth.vel + (f_grav/earth.mass) *…
CMC
  • 79
  • 1
  • 3
  • 11
-2
votes
2 answers

module 'vpython' has no attribute 'ModelComplexity'

this code is to import vpython this code is to find model complexity can anyone help me solve this problem? please?
RAJ
  • 3
  • 4
-2
votes
1 answer

Having trouble simulating orbits in Visual Python

This is the code i have written in VPython so Far, I'm new to Vpython and i'm not that experienced in python so cut me some slack please, The error I get is: Traceback (most recent call last): File "C:\Users\Makka Pakka\Documents\Planetary…
-3
votes
0 answers

How to write a guitar string code in Python?

Possible Duplicate: Guitar string code in Python? I'm really interested in making a code that could simulate guitar strings. How would I go about doing this? Or at least how would I begin to do this? Here are my ideas: I would like to see the…
-4
votes
1 answer

How to convert 2D Matplotlib to 3D vpython?

I have a project in an AI class that is requiring us to change our 2D matplotlib programming to vpython 3D. I was wondering if anyone with experience in this can give me some pointers or tips.
1 2 3
22
23