Click to See Complete Forum and Search --> : a vibrating spring , with code

rasha ali

09-16-2002, 05:19 PM

hello everybody,

how can i make a vibrating (up and down ) spring , with code only ????

the strength of vibration also responses dynamically to the weight that is hanged in it

HOW CAN I ???

THANKS A LOT

bit-101

09-17-2002, 10:55 AM

elasticity tutorial: http://www.bit-101.com

minger

09-18-2002, 11:36 AM

there is actually a formula for the oscillation of wave. it takes in to account the spring constant, the weight, and stuff like that. as soon as i get ahold of my notebook from last semester ill put it up here...

rasha ali

09-18-2002, 06:19 PM

thanks a lot all of u ,

iam waiting minger :)

minger

09-19-2002, 01:44 AM

alright here is all the stuff that I have for oscillations.

f = frequency - number of oscillations in unit time

1 Hertz (Hz) = 1 oscillation/second

T = Period - time for 1 oscillation

T = 1/f

The displacement or more or less the point at which the oscillation is at is:

x(t) = x(m) * cos(wt + o)

where x(m) = amplitude

w = angular frequency = (k/m)^1/2

k = spring constant

t = time

o = phase constant = just something to offset the wave, can just be set to zero

Velocity: dx/dt or:

v(t) = -w*x(m)*sin(wt + o)

where all the variables are same as above

Acceleration: dv/dt or:

a(t) = -w^2 * x(m) * cos(wt + o) or:

a(t) = -w^2 * x(t)

where x(t) is the displacement as defined above

In simple harmonic motion, the acceleration is proportional to the displacement, but opposite signs, and the 2 quantities are related by the square of the angular frequency.

Force:

F = -(mw^2)x

where m = mass and w = angular frequency and x = distance from the equilibrium

T(period) can also be written as:

T = 2pi * (m/k)^1/2

there ya go, there is a crash course in simple harmonic motion. I was just gonna post the one equation, but i figured while i had dug the notebook out, i might as well put the other stuff on there too, maybe it will help someone else out.

p.s. hope this helps