[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

2D Orbits Simulator

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 15
Thread images: 1

File: orbits.gif (3KB, 610x235px) Image search: [Google]
orbits.gif
3KB, 610x235px
I'm planning on creating a 2D orbits simulator for my A-Level computer science coursework. I've been having a look around for formulae to predict paths of bodies in orbit, but there are hundreds of pages I'm trying to sift through of orbital mechanics and I don't really know where to start. I'm not completely illiterate in maths and physics -- I do both at A-level -- but I've never done orbital mechanics. Any thoughts on what to do and where to start, or should I forget about this whole thing and consider doing something else for my coursework?

Also, feel free to talk about anything related to orbital mechanics in this thread.
>>
>>8336722
Would you be doing two-body orbits, or are you looking for the general case of three or more bodies?

If the latter, there is no general analytical solution for predicting these orbits; what you'll need to do is simulate gravitation (Newtonian will suffice) and tick it forwards numerically. A very simple approximator for this is not hard to do - for each point, find the distance and direction vector to each other point, use this distance and the mass of the other body to find the acceleration vector, add up the acceleration vectors from every other point, use the acceleration to update that point's velocity, and use the velocity to update that point's position. Repeat for every mass, tick forwards one step, and repeat.

This is the simplest, dumbest possible way to do it; there are more clever ways, although tin the general case they all revolve around the fundamental method of numerically integrating approximations to the equations of motion. (This simple constant-time-per-tick Euler's-method approximation will fail to precisely conserve energy and thus tend towards long-term instability, and will go nuts if things start going too fast or get too close to one another, and is generally okay but not great.)
>>
>>8336722
I think this would be a good idea for an A-Level coursework project, especially if you demonstrate an understanding of numerical integration, as >>8337193 hints at the importance of.

What language do you intend to write it in? If you use something high-level like python or julia (personal recommendation from me), you will have incredibly simple access to very robust and stable numerical integration algorithms, usually only requiring one or two lines to set up and compute with.

Keep us updated!
>>
>>8337193
>using an object's position and momentum to predict motion
>not using 2 positions and integrating over all possible paths

everyone laugh at the determinist
>>
>>8337667
>all possible paths
Who sold you this infinitely powerful computer, and how much did it cost?
>>
You can make a pretty decent and very ez 2D orbit simulation just using Euler's method. Look it up.
>>
>>8337673
>implying you need an infinitely powerful computer to derive the principle of least action

determinist doesn't understand physics, shocking no one
>>
>>8337693
You what mate?

"Deriving" the principle of least action doesn't require a computer, it takes a brain. Evaluating an application of it, when it can't be done analytically, requires either a discretisation (to which you'll claim I'm "making it deterministic) or an infinitely long numerical evaulation (over "all" possible paths).
>>
>>8337699
if you already had the least action principle of least action you would know to integrate over all possible paths rather than using position and momentum

integrating a Lagrangian doesn't require discretization for rational solutions

even if you only had the uncertainty principle you would know that position and momentum are complementary and indeterminate at arbitrarily high precision

the integration of particle paths is covered extensively in any rigorous course of QM but we both know determinists aren't fond of those
>>
>>8337723
No-one mentioned QM except you.

>load of irrelevant crap
Thanks for shitting up the thread.
>>
>>8337723
You have to use numerical integration to solve QM for situations with three or more particles, too. Anything more complicated than a hydrogen-1 atom can't be solved analytically.
>>
A levels is like high school, right? Learning enough mechanics to derive orbits is too much, probably. I like the other anons' suggestions of a numerical integration.
>>
>>8337746
You have to do numerical integration to derive orbits. Unless you're working with just two gravitating particles (in which case it's just conic sections), or in certain restricted special cases, there is no way to analytically solve for the evolution of a 3- or more body system in the general case.
>>
Just integrate numerically dude and use barnes-hut algo if you have a lot of bodies
>>
>>8337745
You can analytically solve the hydrogen molecular ion
Thread posts: 15
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.