This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from visual import * | |
from visual.graph import * | |
fun1=gcurve(color=color.yellow) | |
fun2=gcurve(color=color.red) | |
g=vector(0,-9.8,0) | |
L=1. | |
t=0 | |
dt=0.001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from visual import * | |
from visual.graph import * | |
fun1=gcurve(color=color.yellow) | |
fun2=gcurve(color=color.red) | |
fun3=gcurve(color=color.cyan) | |
alpha=sphere(pos=(-1,0.05,0), radius=0.05, color=color.red, make_trail=True) | |
gold=sphere(pos=(0,0,0), radius=0.05, color=color.yellow, make_trail=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from visual import * | |
r=2. | |
ball=sphere(pos=(-r,0,0), radius=0.1, color=color.yellow, make_trail=True) | |
ball.v=vector(0,0.5,0) | |
start1=sphere(pos=ball.pos, radius=0.05, color=color.red) | |
t=0 | |
dt=0.001 | |
rt=ball.pos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from visual import * | |
from visual.graph import * | |
fun1=gcurve(color=color.yellow) | |
fun2=gcurve(color=color.white) | |
ground=box(pos=(0,0,0), length=.3, width=.3, height=0.01) | |
ball=sphere(pos=(0,0,0), radius=0.02, color=color.yellow, | |
make_trail=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from visual import * | |
stick=box(pos=(0,0,0), length=1, width=.2, height=.2, color=color.cyan) | |
w=.5 | |
t=0 | |
dt=0.01 | |
while True: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from visual import * | |
from random import * | |
print(uniform(2.2,4.4)) | |
#ball1=sphere() | |
n=50 | |
i=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from visual import * | |
from visual.graph import * | |
fun1=gcurve(color=color.red) | |
fun2=gcurve(color=color.blue) | |
fun3=gcurve(color=color.yellow) | |
car1=box(pos=(-0.25, 0, 0), height=0.05, width=0.05, length=0.12, color=color.red) | |
car2=box(pos=(0.1, 0, 0), height=0.05, width=0.05, length=0.12, color=color.blue) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pylab import * | |
#graph1 = gdisplay(title='Vertical Position vs. Time', xtitle ='t (sec)', ytitle ='y (m)', background=color.white) | |
#funct1=gcurve(color=color.white) | |
#floor = box (pos=(0,0,0), length=.4, height=0.05, width=.4, color=color.blue) | |
L = 120 | |
theta0 = -pi/2 | |
#ball2=sphere() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pylab import * | |
#from visual import vector, dot, mag | |
## mark out the pitch | |
xlist=linspace(0,50.0,500) | |
ylist=linspace(-35.0, 35.0, 350) | |
X,Y = meshgrid(xlist, ylist) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import plotly.plotly as py | |
from plotly.graph_objs import * | |
from pylab import * | |
from visual import vector, norm, mag | |
#you need to add your own plot.ly credentials here | |
#py.sign_in(###########) | |
#electric constant | |
k=9e9 |