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 * | |
g=vector(0,-9.8,0) | |
ball=sphere(pos=(0,1,0), radius=0.05, material=materials.shiny) | |
ball.p=vector(0,0,0) | |
ball.m=0.1 | |
t=0 | |
dt=0.001 | |
floor = box(length=1, width=1, height=0.05, pos=vector(0,0,0), 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 visual import * | |
g=vector(0,-9.8,0) | |
ball=sphere(pos=(0,1,0), radius=0.05, material=materials.shiny) | |
ball.p=vector(0,0,0) | |
ball.m=0.1 | |
t=0 | |
dt=0.001 | |
floor = box(length=1, width=1, height=0.05, pos=vector(0,0,0), 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 visual import * | |
g=vector(0,-9.8,0) | |
h=1 | |
ball=sphere(pos=(0,h,0), radius=0.05, material=materials.shiny) | |
ball.p=vector(0,0,0) | |
ball.m=0.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 * | |
g=vector(0,-9.8,0) | |
h=1 | |
ball=sphere(pos=(0,h,0), radius=0.05, material=materials.shiny) | |
ball.p=vector(0,-.0003,0) | |
ball.m=0.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.cyan) | |
v0=30 | |
thetan=11*pi/180 | |
theta=40*pi/180 | |
ab=vector(1,3,-3.4) | |
print(ab) | |
g=vector(0,-9.8,0) | |
A=0.027 |
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 * | |
f1=gcurve(color=color.cyan) | |
f2=gcurve(color=color.yellow) | |
f3=gcurve(color=color.red) | |
K=1 | |
ball1=sphere(pos=(-3, 0,0), radius=.1, color=color.yellow, make_trail=True) | |
ball2=sphere(pos=(0,0,0), radius=.1, 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 pylab import * | |
import random as rd | |
total=150 | |
p=.587 | |
np=[] | |
sp=[] | |
n=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.cyan) | |
fun2=gcurve(color=color.red) | |
fun3=gcurve(color=color.yellow) | |
ball=sphere(pos=(1,-2,3), radius=0.1, color=color.yellow, make_trail=True) | |
ball.v=vector(0,0,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
a=True | |
x=0 | |
dx=0.1 | |
while a: | |
x=x+dx | |
if x>=0.7: | |
a=False | |
print('hello') | |
print(x) |
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 __future__ import division | |
from visual import * | |
from visual.graph import * | |
fun1=gcurve(color=color.cyan) | |
def spring1(k,x0,v0,m): | |
# x0=.2 | |
ball=sphere(pos=(x0,0,0), radius=0.05) |
OlderNewer