VB Code for Simulating Pendulum Swing Frequency & Baseline Changes

In summary, the conversation is about finding VB code to simulate a pendulum swinging with the ability to alter the frequency and baseline within a range over time. The purpose of the simulation is to create a seemingly random walking effect that will eventually be applied to a real world phenomenon. The individual asking the question is proficient in VB but not familiar with the equations used to calculate pendulum motion.
  • #1
JR Wakefield
16
1
I'm looking for VB code that simulates a pendulum swinging. I need to be able to alter the frequency of the swing within a range as time progresses and alter the baseline within a range as time progresses.

Anyone got something?
 
Physics news on Phys.org
  • #2
JR Wakefield said:
I'm looking for VB code that simulates a pendulum swinging. I need to be able to alter the frequency of the swing within a range as time progresses and alter the baseline within a range as time progresses.

Anyone got something?

What is the context of the question? What do you need the simulation for? Do you know the basic equations that are used for calculating pendulum motion?
 
  • #3
berkeman said:
What is the context of the question? What do you need the simulation for? Do you know the basic equations that are used for calculating pendulum motion?

Ultimately I want to do three interconnected pendulums. One base, another when it swings alters the baseline of the first, and a third when it swings alters the degree of swing of the first. So the final outcome would look like a drunken sailor walking. This should produce an apparent random walking effect.

I have a specific reason to this test, but basically it is to see how apparently random swings has order to it. It will eventually be matched to a real world phenomenon.

And no I don't know the equations, but proficient at VB.
 

Related to VB Code for Simulating Pendulum Swing Frequency & Baseline Changes

1. What is VB code and how is it used in simulating pendulum swing frequency and baseline changes?

VB code, short for Visual Basic code, is a programming language commonly used for creating applications and simulations. In this case, VB code can be used to create a simulation of a pendulum, allowing for the manipulation of the swing frequency and baseline to observe changes in the behavior of the pendulum.

2. Can VB code be used to accurately simulate pendulum swing frequency and baseline changes?

Yes, VB code can be used to accurately simulate pendulum swing frequency and baseline changes. By using mathematical equations and principles, the code can accurately replicate the behavior of a pendulum and its response to changes in swing frequency and baseline.

3. What variables can be manipulated in the VB code for simulating pendulum swing frequency and baseline changes?

The VB code can allow for manipulation of the pendulum's length, mass, and starting angle, as well as the amplitude and frequency of the pendulum's swing. These variables can be adjusted to observe how the pendulum's behavior changes in response.

4. Is VB code the only option for simulating pendulum swing frequency and baseline changes?

No, VB code is not the only option for simulating pendulum swing frequency and baseline changes. Other programming languages, such as Java or Python, can also be used to create similar simulations. However, VB code is a user-friendly language that is commonly used for educational and scientific purposes.

5. Are there any limitations to using VB code for simulating pendulum swing frequency and baseline changes?

Like any programming language, VB code does have limitations. It may not be suitable for highly complex simulations and may require additional programming knowledge to implement certain features. Additionally, the accuracy of the simulation may also depend on the accuracy of the input parameters and equations used in the code.

Similar threads

Replies
10
Views
2K
Replies
2
Views
2K
Replies
5
Views
397
  • Mechanical Engineering
Replies
3
Views
332
  • Introductory Physics Homework Help
Replies
4
Views
1K
  • Introductory Physics Homework Help
Replies
27
Views
765
  • Introductory Physics Homework Help
Replies
3
Views
747
  • Mechanics
Replies
6
Views
3K
Replies
5
Views
3K
Back
Top