how do i find the position of a random object [on hold]
I would like to know what I should write to get python to print out the vector position of the sphere labelled ball
import numpy as np
from vpython import sphere, vector, color, canvas,
from numpy import random
canvas(width = 640, height = 480,background=color.cyan)
ball=sphere(pos=vector(0,random.random(),0))
python numpy pycharm jupyter-notebook vpython
New contributor
put on hold as unclear what you're asking by Divakar, pault, Nate, Tomasz Mularczyk, arghtype yesterday
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
I would like to know what I should write to get python to print out the vector position of the sphere labelled ball
import numpy as np
from vpython import sphere, vector, color, canvas,
from numpy import random
canvas(width = 640, height = 480,background=color.cyan)
ball=sphere(pos=vector(0,random.random(),0))
python numpy pycharm jupyter-notebook vpython
New contributor
put on hold as unclear what you're asking by Divakar, pault, Nate, Tomasz Mularczyk, arghtype yesterday
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
I would like to know what I should write to get python to print out the vector position of the sphere labelled ball
import numpy as np
from vpython import sphere, vector, color, canvas,
from numpy import random
canvas(width = 640, height = 480,background=color.cyan)
ball=sphere(pos=vector(0,random.random(),0))
python numpy pycharm jupyter-notebook vpython
New contributor
I would like to know what I should write to get python to print out the vector position of the sphere labelled ball
import numpy as np
from vpython import sphere, vector, color, canvas,
from numpy import random
canvas(width = 640, height = 480,background=color.cyan)
ball=sphere(pos=vector(0,random.random(),0))
python numpy pycharm jupyter-notebook vpython
python numpy pycharm jupyter-notebook vpython
New contributor
New contributor
New contributor
asked 2 days ago
Sam Stakol
11
11
New contributor
New contributor
put on hold as unclear what you're asking by Divakar, pault, Nate, Tomasz Mularczyk, arghtype yesterday
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
put on hold as unclear what you're asking by Divakar, pault, Nate, Tomasz Mularczyk, arghtype yesterday
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
store it first outside the call to sphere:
pos = random.random()
ball = sphere(pos = vector(0,pos,0))
print(pos)
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
store it first outside the call to sphere:
pos = random.random()
ball = sphere(pos = vector(0,pos,0))
print(pos)
add a comment |
store it first outside the call to sphere:
pos = random.random()
ball = sphere(pos = vector(0,pos,0))
print(pos)
add a comment |
store it first outside the call to sphere:
pos = random.random()
ball = sphere(pos = vector(0,pos,0))
print(pos)
store it first outside the call to sphere:
pos = random.random()
ball = sphere(pos = vector(0,pos,0))
print(pos)
answered yesterday
Yishai E
464
464
add a comment |
add a comment |