Computation Contest #2 [6 SBI]

in #puzzle4 years ago

Here you can solve interesting problems using whatever programming language you like. Also you will earn SBI and sometimes STEM by doing so.
Also you might learn new things by doing so.
The tasks will be rather hard to solve without a programmable computer and some programming skills, but if you want to add a few million numbers by hand or similar, I would still give you the reward.
↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓

Rules

No upvote, No resteem, No follow required!

I will give 6 SBI randomly to those who solved the problem.

If two pieces of code are to closely related I might consider the later of them as copied which results in no prize for that person.

You have 4 days to solve it.

Even though this is about computation I will also accept algebraic solutions if you find one.

In order to get accepted you need to somehow attach your code.

↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓

Problem

Today I want you to write some kind of physics simulation:
You should simulate a pendulum!
A pendulum can be described by the following equation, where phi is the current angle, gamma is some dampening constant and l is the length:
Screenshot from 2019-11-03 23-32-52.png

To solve this you can approximate dt with some small value and use the formula to calculate the change in velocity and position each time step.

Now you have to solve 2 problems that show that you made a working model:

  1. Consider a pendulum of length 1m and dampening constant 0.01/s and starting velocity of 360 °/s starting at a starting angle of 0°.
    How many times will it circle around until it settles to a swinging movement.
  2. What would the dampening constant need to be for the pendulum to stop after completing only 3 circles?

↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓

To everyone who already participated in a past contest, come back today and try a new problem(tell me if you don't want to be tagged):
@crokkon @kaeserotor @tonimontana

In case no one gets a result(which I doubt), I will give away the prize to the person who makes the most constructive description why the problem is too hard in your opinion.

↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓

@contrabourdon sponsors my contests with 2 STEEM weekly.
You can support him by using a witness vote on untersatz, so he can further support this and other contests.

Sort:  
Loading...

Coin Marketplace

STEEM 0.35
TRX 0.12
JST 0.040
BTC 71539.00
ETH 3603.23
USDT 1.00
SBD 4.75