Ciro Santilli OurBigBook.com $£ Sponsor €¥ 中国独裁统治 China Dictatorship 新疆改造中心、六四事件、法轮功、郝海东、709大抓捕、2015巴拿马文件 邓家贵、低端人口、西藏骚乱
mechanics.bigb
= Mechanics
{wiki}

= Mechanical
{synonym}

This section is more precisely about <classical mechanics>.

= Angular momentum
{parent=Mechanics}
{wiki}

= Precession
{parent=Angular momentum}
{wiki}

= Axle
{parent=Mechanics}
{wiki}

= Classical mechanics
{parent=Mechanics}
{wiki}

Mechanics before <quantum mechanics> and <special relativity>.

= Classical physics
{parent=Classical mechanics}
{wiki}

Basically the same as <classical mechanics>.

= Classical limit
{parent=Classical physics}
{wiki}

The idea tha taking the limit of the non-classical theories for certain parameters (<relativity> and <quantum mechanics>) should lead to the classical theory.

It appears that classical limit is only very strict for <relativity>. For <quantum mechanics> it is much more hand-wavy thing. See also: <Subtle is the Lord by Abraham Pais (1982)> page 55.

= Correspondence principle
{parent=Classical limit}
{wiki}

Basically the same as <classical limit>, but more for <quantum mechanics>.

= Continuum mechanics
{parent=Mechanics}
{wiki}

= Continuity equation
{parent=Continuum mechanics}
{wiki}

= Diffusion
{parent=Continuum mechanics}
{wiki}

= Fick's laws of diffusion
{parent=Diffusion}
{wiki}

= Fluid mechanics
{parent=Continuum mechanics}
{wiki}

Boooooring.

= Fluid dynamics
{parent=Fluid mechanics}
{wiki}

= Gravity wave
{parent=Fluid mechanics}
{wiki}

= Gravitational wave
{synonym}

= Navier-Stokes equations
{c}
{parent=Fluid mechanics}
{wiki=Navier–Stokes_equations}

= Navier-Stokes existence and smoothness
{c}
{parent=Navier-Stokes equations}
{wiki=Navier–Stokes_existence_and_smoothness}

One of the <Millennium Prize Problems>.

See also: <existence and uniqueness of solutions of partial differential equations>.

= Lagrangian mechanics
{c}
{parent=Mechanics}
{wiki}

Originally it was likely created to study constrained mechanical systems where you want to use some "custom convenient" variables to parametrize things instead of global x, y, z. Classical examples that you must have in mind include:
* <compound Atwood machine>. Here, we can use the coordinates as the heights of masses relative to the <axles> rather than absolute heights relative to the ground
* <double pendulum>, using two angles. The Lagrangian approach is simpler than using Newton's laws
  * <pendulum>, use angle instead of x/y
* <two-body problem>, use the distance between the bodies
<lagrangian mechanics lectures by Michel van Biezen (2017)> is a good starting point.

When doing lagrangian mechanics, we just lump together all generalized coordinates into a single vector $\va{q}(t) : \R \to \R^n$ that maps time to the full state:
$$
\va{q}(t) = [q_1(t), q_2(t), q_3(t), ..., q_n(t)]
$$
where each component can be anything, either the x/y/z coordinates relative to the ground of different particles, or angles, or nay other crazy thing we want.

The <Lagrangian> is a function $\R^n \times \R^n \times \R \to \R$ that maps:
$$
L(\va{q}(t), \dot{\va{q}}(t), t)
$$
to a real number.

Then, the <stationary action principle> says that the actual path taken obeys the <Euler-Lagrange equation>:
$$
\pdv{L(\va{q}(t), \dot{\va{q}}(t), t)}{q_i} - \dv{}{t}\pdv{L(\va{q}(t), \dot{\va{q}}(t), t)}{\dot{q_i}} = 0
$$
This produces a <system of partial differential equations> with:
* $n$ equations
* $n$ unknown functions $q_i$
* at most second order derivatives of $q_i$. Those appear because of the chain rule on the second term.

The mixture of so many derivatives is a bit mind mending, so we can clarify them a bit further. At:
$$
\pdv{L(\va{q}(t), \dot{\va{q}}(t), t)}{q_i}
$$
the $q_i$ is just identifying which argument of the Lagrangian we are differentiating by: the i-th according to the order of our definition of the Lagrangian. It is not the actual function, just a mnemonic.

Then at:
$$
\dv{}{t}\pdv{L(\va{q}(t), \dot{\va{q}}(t), t)}{\dot{q_i}}
$$
* the $\pdv{}{\dot{q_i}}$ part is just like the previous term, $\dot{q_i}$ just identifies the argument with index $n + i$ ($n$ because we have the $n$ non derivative arguments)
* after the partial derivative is taken and returns a new function $\pdv{L(\va{q}(t), \dot{\va{q}}(t), t)}{\dot{q_i}}$, then the <multivariable chain rule> comes in and expands everything into $2n + 1$ terms

However, people later noticed that the Lagrangian had some nice properties related to <Lie group> continuous symmetries.

Basically it seems that the easiest way to come up with new <quantum field theory> models is to first find the Lagrangian, and then derive the equations of motion from them.

For every <continuous symmetry> in the system (modelled by a <Lie group>), there is a corresponding conservation law: <local symmetries of the Lagrangian imply conserved currents>.
<Genius: Richard Feynman and Modern Physics by James Gleick (1994)> chapter "The Best Path" mentions that <Richard Feynman> didn't like the <Lagrangian mechanics> approach when he started university at <MIT>, because he felt it was too magical. The reason is that the Lagrangian approach basically starts from the principle that "nature minimizes the action across time globally". This implies that things that will happen in the future are also taken into consideration when deciding what has to happen before them! Much like the lifeguard in the <lifegard problem> making global decisions about the future. However, chapter "Least Action in Quantum Mechanics" comments that Feynman later notice that this was indeed necessary while developping <Wheeler-Feynman absorber theory> into <quantum electrodynamics>, because they felt that it would make more sense to consider things that way while playing with ideas such as <positrons are electrons travelling back in time>. This is in contrast with <Hamiltonian mechanics>, where the idea of time moving foward is more directly present, e.g. as in the <Schrödinger equation>.

Furthermore, given the symmetry, we can calculate the derived conservation law, and vice versa.

And partly due to the above observations, it was noticed that the easiest way to describe the fundamental laws of <particle physics> and make calculations with them is to first formulate their Lagrangian somehow: <why do symmetries such as SU(3), SU(2) and U(1) matter in particle physics?s>.

TODO advantages:
* https://physics.stackexchange.com/questions/254266/advantages-of-lagrangian-mechanics-over-newtonian-mechanics on <Physics Stack Exchange>, <fucking> closed question...
* https://www.quora.com/Why-was-Lagrangian-formalism-needed-in-the-presence-of-Newtonian-formalism 
* https://www.researchgate.net/post/What_is_the_advantage_of_Lagrangian_formalism_over_Hamiltonian_formalism_in_QFT

Bibliography:
* http://www.physics.usu.edu/torre/6010_Fall_2010/Lectures.html Physics 6010 Classical Mechanics lecture notes by Charles Torre from Utah State University published on 2010,
  * Classical physics only. The last lecture: http://www.physics.usu.edu/torre/6010_Fall_2010/Lectures/12.pdf mentions <Lie algebra> more or less briefly.
* http://www.damtp.cam.ac.uk/user/tong/dynamics/two.pdf by <David Tong>

\Video[https://www.youtube.com/watch?v=EceVJJGAFFI]
{title=Euler-Lagrange equation explained intuitively - Lagrangian Mechanics by <Physics Videos by Eugene Khutoryansky> (2018)}
{description=Well, unsurprisingly, it is exactly what you can expect from an Eugene Khutoryansky video.}

= Lagrangian mechanics lectures by Michel van Biezen (2017)
{parent=Lagrangian mechanics}

https://www.youtube.com/playlist?list=PLX2gX-ftPVXWK0GOFDi7FcmIMMhY_7fU9

Original playlist name: "PHYSICS 68 ADVANCED MECHANICS: LAGRANGIAN MECHANICS"

Author: Michel van Biezen.

<High school> classical mechanics material, no mention of the key <continuous symmetry> part.

But does have a few classic pendulum/pulley/spring worked out examples that would be really wise to get under your belt first.

= Action
{disambiguate=physics}
{parent=Lagrangian mechanics}
{wiki}

= Stationary action principle
{parent=Action (physics)}
{wiki}

= Principle of least action
{synonym}
{title2}
{wiki}

As mentioned on the <Wikipedia> page https://en.wikipedia.org/w/index.php?title=Stationary_Action_Principle&oldid=1020413171[], "principle of least action" is not accurate since it could not necessarily be a minima, we could just be in a <maxima and minima>[saddle-point].

= Calculus of variations
{parent=Stationary action principle}
{tag=Maxima and minima}
{wiki}

Calculus of variations is the field that searches for <maxima and minima> of <Functionals>, rather than the more elementary case of functions from $\R$ to $\R$.

= Functional
{c}
{parent=Calculus of variations}
{wiki=Euler–Lagrange equation}

A <function> that takes input function and outputs a <real number>.

= Euler-Lagrange equation
{c}
{parent=Calculus of variations}
{wiki=Euler–Lagrange equation}

Let's start with the one dimensional case. Let the $q : \R \to \R$ and a <Functional> $I$ defined by a function of three variables $F : \R^3 \to \R$:
$$
I(q) = \int_{t_0}^{t} F(t, q(t), \dot{q}(t)) dt
$$

Then, the <Euler-Lagrange equation> gives the <maxima and minima> of the that type of functional. Note that this type of functional is just one very specific type of functional amongst all possible functionals that one might come up with. However, it turns out to be enough to do most of physics, so we are happy with with it.

Given $F$, the Euler-Lagrange equations are a system of <ordinary differential equations> constructed from that $F$ such that the solutions to that system are the maxima/minima.

In the one dimensional case, the system has a single ordinary differential equation:
$$
\pdv{F(t, q(t), \dot{q}(t))}{q} - \dv{}{t} \pdv{F(t, q(t), \dot{q}(t))}{\dot{q}} = 0
$$

By $\pdv{F}{q}$ and $\pdv{F}{\dot{q}}$ we simply mean "the <partial derivative> of $F$ with respect to its second and third arguments". The notation is a bit confusing at first, but that's all it means.

Therefore, that expression ends up being at most a <order of a differential equation>[second order] <ordinary differential equation> where $q$ is the unknown, since:
* the term $\pdv{F(t, q(t), \dot{q}(t))}{q}$ is a function of $t, q(t), \dot{q}(t)$
* the term $\pdv{F(t, q(t), \dot{q}(t))}{\dot{q}}$ is a function of $t, q(t), \dot{q}(t)$. And so it's derivative with respect to time will contain only up to $\ddot{q}$

Now let's think about the multi-dimensional case. Instead of having $q : \R \to \R$, we now have $q : \R \to \R^n$. Think about the <Lagrangian mechanics> motivation of a <double pendulum> where for a given time we have two angles.

Let's do the 2-dimensional case then. In that case, $F$ is going to be a function of 5 variables $F : \R^5 \to \R$ rather than 3 as in the one dimensional case, and the functional looks like:
$$
I(q) = \int_{t_0}^{t} F(t, q_1(t), q_2(t), \dot{q_1}(t), \dot{q_2})(t) dt
$$

This time, the Euler-Lagrange equations are going to be a system of two <ordinary differential equations> on two unknown functions $q_1$ and $q_2$ of order up to 2 in both variables:
$$
\pdv{F(t, q_1(t), q_2(t), \dot{q_1}(t), \dot{q_2}(t))}{q_1} - \dv{}{t} \pdv{F(t, q_1(t), q_2(t), \dot{q_1}(t), \dot{q_2}(t)}{\dot{q_1}} = 0 \\
\pdv{F(t, q_1(t), q_2(t), \dot{q_1}(t), \dot{q_2}(t))}{q_2} - \dv{}{t} \pdv{F(t, q_1(t), q_2(t), \dot{q_1}(t), \dot{q_2}(t)}{\dot{q_2}} = 0 \\
$$
At this point, notation is getting a bit clunky, so people will often condense the $q_i$ vector
$$
\pdv{F(t, \mathbf{q}(t), \dot{\mathbf{q}}(t))}{q_1} - \dv{}{t} \pdv{F(t, \mathbf{q}(t), \dot{\mathbf{q}}(t))}{\dot{q_1}} = 0 \\
\pdv{F(t, \mathbf{q}(t), \dot{\mathbf{q}}(t))}{q_2} - \dv{}{t} \pdv{F(t, \mathbf{q}(t), \dot{\mathbf{q}}(t))}{\dot{q_2}} = 0 \\
$$
or just omit the arguments of $F$ entirely:
$$
\pdv{F}{q_i} - \dv{}{t} \pdv{F}{\dot{q_i}} = 0
$$

\Video[https://www.youtube.com/watch?v=SQLxrr9N8zM]
{title=Calculus of Variations ft. Flammable Maths by vcubingx (2020)}

= Equations of motion
{parent=Euler-Lagrange equation}
{wiki}

These are the final equations that you derive from the <Lagrangian> via the <Euler-Lagrange equation> which specify how the system evolves with time.

= Lagrangian
{c}
{parent=Lagrangian mechanics}
{wiki}

The function that fully describes a physical system in <Lagrangian mechanics>.

= Lagrangian (field theory)
{c}
{parent=Lagrangian}
{wiki}

Basically: <why do symmetries such as SU(3), SU(2) and U(1) matter in particle physics?s>.

= Lagrangian density
{parent=Lagrangian (field theory)}

When we particles particles, the <action (physics)> is obtained by integrating the <Lagrangian> over time:
$$
Action = \int_{t_0}^{t} L(x(t), \pdv{x(t)}{t}, t) dt
$$

In the case of <field (mathematics)> however, we can expand the Lagrangian out further, to also integrate over the space coordinates and their derivatives.

Since we are now working with something that gets integrated over space to obtain the total action, much like <density> would be integrated over space to obtain a total mass, the name "Lagrangian density" is fitting.

E.g. for a 2-dimensional field $f(x, y, t)$:
$$
Action = \int_{t_0}^{t} L(f(x, y, t), \pdv{f(x, y, t)}{x}, \pdv{f(x, y, t)}{y}, \pdv{f(x, y, t)}{t}, x, y, t) dx dy dt
$$

Of course, if we were to write it like that all the time we would go mad, so we can just write a much more condensed <vectorized> version using the <gradient> with $x \in \R^2$:
$$
Action = \int_{t_0}^{t} L(f(x, t), \grad{f(x, t)}, x, t) dx dt
$$

And in the context of <special relativity>, people condense that even further by adding $t$ to the spacetime <Four-vector> as well, so you don't even need to write that separate pesky $t$.

The main point of talking about the Lagrangian density instead of a Lagrangian for fields is likely that it treats space and time in a more uniform way, which is a basic requirement of <special relativity>: we have to be able to mix them up somehow to do <Lorentz transformations>. Notably, this is a key ingredient in a/the formulation of <quantum field theory>.

= Generalized coordinate
{parent=Lagrangian}
{wiki}

The variables of the <Lagrangian>, e.g. the angles of a <double pendulum>. From that example it is clear that these variables don't need to be simple things like <cartesian coordinates> or <polar coordinates> (although these tend to be the overwhelming majority of simple case encountered): any way to describe the system is perfectly valid.

In <quantum field theory>, those variables are actually fields.

= Noether's theorem
{c}
{parent=Lagrangian mechanics}

For every <continuous symmetry> in the system (<Lie group>), there is a corresponding conservation law.

Furthermore, given the symmetry, we can calculate the derived conservation law, and vice versa.

As mentioned at http://buzzard.ups.edu/courses/2017spring/projects/schumann-lie-group-ups-434-2017.pdf[], what the symmetry (<Lie group>) acts on (obviously?!) are the <Lagrangian> <generalized coordinates>. And from that, we immediately guess that manifolds are going to be important, because the generalized variables of the Lagrangian can trivially be <Non-Euclidean geometry>, e.g. the <pendulum> lives on an infinite cylinder.

\Video[https://www.youtube.com/watch?v=CxlHLqJ9I0A]
{title=The most beautiful idea in physics - Noether's Theorem by <Looking Glass Universe> (2015)}
{description=One sentence stands out: the generated quantities are called the generators of the transforms.}

\Video[https://www.youtube.com/watch?v=AuqKsBQnE2A]
{title=The Biggest Ideas in the Universe | 15. Gauge Theory by <Sean Carroll> (2020)}
{description=This attempts a one hour hand wave explanation of it. It is a noble attempt and gives some key ideas, but it falls a bit short of Ciro's desires (as would anything that fit into one hour?)}

\Video[https://www.youtube.com/watch?v=hF_uHfSoOGA]
{title=The Symmetries of the universe by <ScienceClic> English (2021)}
{description=https://youtu.be/hF_uHfSoOGA?t=144 explains intuitively why symmetry implies consevation!}

= Time invariance implies energy conservation
{parent=Noether's theorem}

https://physics.stackexchange.com/questions/614757/intuitive-explanation-for-why-time-symmetry-implies-conservation-of-energy on <Physics Stack Exchange>

= Spontaneous symmetry breaking
{parent=Lagrangian mechanics}
{wiki}

= Hamiltonian mechanics
{c}
{parent=Lagrangian mechanics}
{wiki}

= Hamiltonian
{c}
{synonym}

Equivalent to <Lagrangian mechanics> but formulated in a different way.

Motivation: <Lagrangian vs Hamiltonian>.

TODO understand original historical motivation, https://www.youtube.com/watch?v=SZXHoWwBcDc says it is from <optics>.

Intuitively, the <Hamiltonian> is the total energy of the system in terms of arbitrary parameters, a bit like <Lagrangian mechanics>.

Bibliography:
* http://www.damtp.cam.ac.uk/user/tong/dynamics/four.pdf

= Lagrangian vs Hamiltonian
{c}
{parent=Hamiltonian mechanics}

The key difference from <Lagrangian mechanics> is that the Hamiltonian approach groups variables into pairs of coordinates called the <phase space coordinates>:
* generalized coordinates, generally positions or angles
* their corresponding conjugate momenta, generally velocities, or angular velocities
This leads to having two times more unknown functions than in the Lagrangian. However, it also leads to a <system of partial differential equations> with only first order derivatives, which is nicer. Notably, it can be more clearly seen in <phase space>.

Bibliography:
* https://physics.stackexchange.com/questions/89035/whats-the-point-of-hamiltonian-mechanics
* https://www.quora.com/What-is-the-difference-between-a-Lagrangian-and-a-Hamiltonian

= Phase space coordinate
{parent=Hamiltonian mechanics}

= Hamilton's equations
{c}
{parent=Hamiltonian mechanics}
{wiki}

Analogous to what the <Euler-Lagrange equation> is to <Lagrangian mechanics>, Hamilton's equations give the <equations of motion> from a given input <Hamiltonian>:
$$
\frac{\partial H}{\partial q_j} = -\dot{p}_j \\
\frac{\partial H}{\partial p_j} =  \dot{q}_j
$$
So once you have the Hamiltonian, you can write down this system of <partial differential equations> which can then be numerically solved.

= Poisson bracket
{c}
{parent=Hamiltonian mechanics}
{wiki}

= Equivalence between Lagrangian and Hamiltonian formalisms
{parent=Lagrangian mechanics}

https://physics.stackexchange.com/questions/105912/equivalence-between-hamiltonian-and-lagrangian-mechanics

= Legendre transformation
{c}
{parent=Equivalence between Lagrangian and Hamiltonian formalisms}
{wiki}

This is how you transform the <Lagrangian> into the <Hamiltonian>.

= Mechanics problem
{parent=Mechanics}

= Atwood machine
{c}
{parent=Mechanics problem}
{wiki}

= Compound Atwood machine
{parent=Atwood machine}

\Video[https://www.youtube.com/watch?v=439ikBF4BII]
{title=<Lagrangian mechanics>[Lagrangian Mechanics] Example: The Compound Atwood Machine by Michel van Biezen (2017)}
{description=Part of <lagrangian mechanics lectures by Michel van Biezen (2017)>.}

= Elastic collision
{parent=Mechanics problem}
{wiki}

= Harmonic oscillator
{parent=Mechanics problem}
{wiki}

= Spring-mass system
{parent=Harmonic oscillator}
{{wiki=Harmonic_oscillator#Spring/mass_system}}

The simplest <harmonic oscillator> system.

= Coupled oscillators
{parent=Harmonic oscillator}

https://www.youtube.com/watch?v=-pXnfzQfupE

= Pendulum
{parent=Mechanics problem}
{wiki}

The <period (physics)> does depend on the initial height/angle, except for the very small angle approximation:
* https://www.quora.com/How-does-the-angle-of-a-pendulum-affect-its-period
* http://hyperphysics.phy-astr.gsu.edu/hbase/pend.html
* http://hyperphysics.phy-astr.gsu.edu/hbase/pendl.html

\Video[https://www.youtube.com/watch?v=yVkdfJ9PkRQ]
{title=Pendulum Waves by Harvard Natural Sciences Lecture Demonstrations (2010)}
{description=Holy crap.}

= Double pendulum
{parent=Pendulum}
{wiki}

= Spherical pendulum
{parent=Pendulum}
{wiki}

= Two-body problem
{parent=Mechanics problem}
{wiki}

https://youtu.be/Ca7c5B7Js18?t=803 compares <Lagrangian mechanics> equation vs the direct x/y coordinate equation.

= Continuous mechanics problem
{parent=Mechanics problem}

= Mechanical resonance
{parent=Continuous mechanics problem}
{wiki}

<resonance> in a <mechanical> system.

= Tuning fork
{parent=Mechanical resonance}
{wiki}

= Mechanics vendor
{parent=Mechanics}

= Rolls-Royce
{c}
{parent=Mechanics vendor}
{wiki}

= Newton's laws of motion
{c}
{parent=Mechanics}
{wiki}

= Force
{parent=Newton's laws of motion}
{wiki}

= Mass
{parent=Newton's laws of motion}
{wiki}

= Point particle
{parent=Mechanics}
{wiki}

= Pointlike particle
{synonym}

This idealization does not seems to be possible at all in the context of <Maxwell's equations with pointlike particles>.

= Rigid body
{parent=Point particle}
{wiki}

= Rigid body dynamics
{parent=Rigid body}
{wiki}

= Rigid body dynamics simulator
{parent=Rigid body dynamics}

= Rigid body dynamics acceleration
{parent=Rigid body dynamics simulator}

\Video[https://www.youtube.com/watch?v=q4rNoupGr8U]
{title=Simulation on the <GPU> by Ten Minute Physics (2022)}
{description=The author is a big <PhysX> guy.}

= 2D rigid body dynamics simulator
{parent=Rigid body dynamics}
{tag=2D}

= 2D physics engine
{synonym}

= Box2D
{c}
{parent=2D rigid body dynamics simulator}
{tag=C library}
{tag=2D physics engine}
{wiki}

= 3D rigid body dynamics
{parent=Rigid body dynamics}
{tag=3D}

= 3D rigid body dynamics simulator
{parent=3D rigid body dynamics}

= 3D physics engine
{synonym}

= List of 3D physics engines
{synonym}

= Bullet Physics
{c}
{parent=3D rigid body dynamics simulator}
{tag=C++ library}
{wiki=Bullet_(software)}

The most minimal <hello world> with <gnuplot> visualization!!! https://stackoverflow.com/questions/11175694/bullet-physics-simplest-collision-example/36987063#36987063

\Image[https://web.archive.org/web/20210225103255im_/https://i.stack.imgur.com/9eVe9.png]
{title=<gnuplot> plot of the y position of a sphere bouncing on a plane simulated in <Bullet Physics>}
{description=From: https://stackoverflow.com/questions/11175694/bullet-physics-simplest-collision-example/36987063#36987063[What is the simplest collision example possible in a Bullet Physics simulation?]}
{source=https://stackoverflow.com/questions/11175694/bullet-physics-simplest-collision-example/36987063#36987063}
{height=600}

= Bullet Physics parallel execution
{c}
{parent=Bullet Physics}
{tag=Rigid body dynamics acceleration}

= Bullet Physics GPU acceleration
{c}
{synonym}
{title2}

Does not seem to support it unfortunately:
* 2015 thread: https://pybullet.org/Bullet/phpBB3/viewtopic.php?t=10783[]. On the reply https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=36197&sid=5fbceed0c3a5ebcf233d328bb4ee1342#p36197 <Erwin Coumans> says there's no support, and no support planned.

= pyBullet
{c}
{parent=Bullet Physics}
{tag=Python library}

<Python> library for <Bullet Physics>.

Became very popular as of result of people using <Bullet Physics> for <reinforcement learning> <AI training robot simulations>.

Website: https://pybullet.org/

Source code: somewhere inside the main <Bullet Physics> source tree. Yay.

= Erwin Coumans
{c}
{parent=Bullet Physics}
{title2=Bullet Physics main author}

\Image[https://web.archive.org/web/20231217060919im_/https://avatars.githubusercontent.com/u/725468?v=4]
{source=https://github.com/erwincoumans}

= MuJoCo
{c}
{parent=3D rigid body dynamics simulator}
{tag=C library}
{tag=Deepmind project}
{tag=Rigid body dynamics acceleration}
{title2=2015-}

https://github.com/deepmind/mujoco

Was a closed source project by "Roboti LLC", which was then acquired by <DeepMind> in October 2021 and <open sourced> March 2022: https://www.deepmind.com/blog/open-sourcing-mujoco

This library is quite cool. Feel very brutally lean and mean.

= MuJoCo getting started
{parent=MuJoCo}

Tested on <Ubuntu 23.10>;
```
git clone https://github.com/google-deepmind/mujoco
cd mujoco
git checkout 5d46c39529819d1b31249e249ca399f306a108ac
mkdir -p build
cd build
cmake ..
make -j
```

Now let's play. Minimal interactive <UI> simulation of a simple <MJCF> scene with one falling cube:
``
bin/basic ../doc/_static/hello.xml
``
Test soure code: https://github.com/google-deepmind/mujoco/blob/5d46c39529819d1b31249e249ca399f306a108ac/sample/basic.cc[]. The only thing you can do is <rotate> the scene with the <computer mouse> it seems. Mentioned at: https://mujoco.readthedocs.io/en/2.2.2/programming.html#sabasic

Some more interesting models can be found under the `model/` directory: https://github.com/google-deepmind/mujoco/tree/5d46c39529819d1b31249e249ca399f306a108ac/model E.g. the imaginary humanoid robot <DeepMind> used in many demos can be seen with:
``
bin/basic ../model/humanoid/humanoid.xml
``

A more advanced <UI> with a few controls:
``
bin/simulate ../doc/_static/hello.xml
``
Test soure code: https://github.com/google-deepmind/mujoco/tree/5d46c39529819d1b31249e249ca399f306a108ac/simulate[]. Mentioned at: https://mujoco.readthedocs.io/en/2.2.2/programming.html#sasimulate

A very cool thing about that UI is that you can manually control joints. There are no joints in the hello.xml, but e.g. with the humanoid model:
``
bin/simulate ../model/humanoid/humanoid.xml
``
under "Control" you move each joint of the robot separately which is quite cool.

\Video[https://www.youtube.com/watch?v=0ORsj_E17B0]
{title=Demo of MuJoCo's built-in `simulate` viewer by Yuval Tassa (2019)}

There's also a `bin/record` test executable that presumably renders the simulation directly to a file:
``
bin/record ../doc/_static/hello.xml 5 60 rgb.out
ffmpeg -f rawvideo -pixel_format rgb24 -video_size 800x800 -framerate 60 -i rgb.out -vf "vflip" video.mp4
``
Mentioned at: https://mujoco.readthedocs.io/en/2.2.2/programming.html#sarecord but TODO that produced a broken video, related issues:
* https://github.com/google-deepmind/mujoco/issues/127
* https://github.com/google-deepmind/mujoco/issues/824

= MJCF
{c}
{parent=MuJoCo}

= MuJoCo XML
{c}
{synonym}
{title2}

= PhysX
{c}
{parent=3D rigid body dynamics simulator}
{tag=C++ library}
{tag=Rigid body dynamics acceleration}

https://github.com/deepmind/mujoco

Had <hardware acceleration> in mind from the very start, and for a long time that has meant <GPU> acceleration.

= 3D rigid body dynamics benchmark
{parent=3D rigid body dynamics}

= 3D physics engine benchmark
{synonym}

= SimBenchmark
{parent=3D rigid body dynamics benchmark}

https://leggedrobotics.github.io/SimBenchmark/

\Image[https://web.archive.org/web/20230922085236im_/https://camo.githubusercontent.com/0228792324669e8c73f0018f1177658ebc6c8c39f169da36b2cbe9af07bf0e8e/68747470733a2f2f6c6567676564726f626f746963732e6769746875622e696f2f53696d42656e63686d61726b2f61626f75742f616e796d616c2e676966]
{source=https://github.com/leggedrobotics/SimBenchmark/tree/3fd17646352f4c1c2c3108f93dae00f2a2d60097}