Popular recipes tagged "physics"http://code.activestate.com/recipes/tags/physics/2016-04-08T01:42:01-07:00ActiveState Code RecipesProjectile Motion (Python)
2016-04-08T01:42:01-07:00Tage Burnetthttp://code.activestate.com/recipes/users/4193902/http://code.activestate.com/recipes/580638-projectile-motion/
<p style="color: grey">
Python
recipe 580638
by <a href="/recipes/users/4193902/">Tage Burnett</a>
(<a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/physics/">physics</a>, <a href="/recipes/tags/python/">python</a>).
</p>
<p>This program calculates the characteristics of a projectile in a vacuum at several different locations in our solar system.</p>
Reaction Diffusion Simulation (Python)
2015-10-16T19:52:02-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/579114-reaction-diffusion-simulation/
<p style="color: grey">
Python
recipe 579114
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/chaos/">chaos</a>, <a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/images/">images</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>, <a href="/recipes/tags/physics/">physics</a>, <a href="/recipes/tags/simulation/">simulation</a>).
Revision 2.
</p>
<p>Reaction-Diffusion Simulation using Gray-Scott Model.</p>
2D Fluid Simulation using FHP LGCA (Python)
2014-08-18T05:01:04-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578924-2d-fluid-simulation-using-fhp-lgca/
<p style="color: grey">
Python
recipe 578924
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>, <a href="/recipes/tags/physics/">physics</a>, <a href="/recipes/tags/simulation/">simulation</a>).
</p>
<p>2D Fluid Simulation using FHP LGCA (Lattice Gas Cellular Automata)</p>
<p>Simulates fluid flow in a circular channel.</p>
<p>It works really slow but I think it can be a lot faster if it modified for NumPy and possibly Py2Exe.</p>
<p>But my main goal was to provide easy to understand code (not performance) anyway. </p>
Hartree Fock SCF (Python)
2013-04-30T09:09:20-07:00alexander bakerhttp://code.activestate.com/recipes/users/4166679/http://code.activestate.com/recipes/578515-hartree-fock-scf/
<p style="color: grey">
Python
recipe 578515
by <a href="/recipes/users/4166679/">alexander baker</a>
(<a href="/recipes/tags/numpy/">numpy</a>, <a href="/recipes/tags/physics/">physics</a>).
Revision 4.
</p>
<p>Quantum Chemistry technique to calculate various interesting operators for HeH.</p>
Hofstadter Butterfly Fractal (Python)
2013-09-23T03:18:02-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578670-hofstadter-butterfly-fractal/
<p style="color: grey">
Python
recipe 578670
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>, <a href="/recipes/tags/physics/">physics</a>).
Revision 2.
</p>
<p>Hofstadter Butterfly Fractal</p>
Gravner-Griffeath Snowflake Simulation (Python)
2013-05-27T00:13:09-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578533-gravner-griffeath-snowflake-simulation/
<p style="color: grey">
Python
recipe 578533
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>, <a href="/recipes/tags/physics/">physics</a>, <a href="/recipes/tags/simulation/">simulation</a>).
Revision 2.
</p>
<p>Gravner-Griffeath snowflake simulation.</p>
<p>For better results increase the image size and number of growth steps and prepare to wait!</p>
Relativistic Rocket Kinematics (Python)
2013-06-09T06:09:52-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578555-relativistic-rocket-kinematics/
<p style="color: grey">
Python
recipe 578555
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>, <a href="/recipes/tags/physics/">physics</a>).
</p>
<p>Relativistic Rocket Kinematics</p>
Spring-Mass System Simulation (Python)
2011-05-02T01:59:45-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577681-spring-mass-system-simulation/
<p style="color: grey">
Python
recipe 577681
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/chaos/">chaos</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>, <a href="/recipes/tags/physics/">physics</a>, <a href="/recipes/tags/simulation/">simulation</a>).
</p>
<p>It simulates a damped spring-mass system driven by sinusoidal force.</p>
Gravity Simulation Fractal Applet (Java)
2010-03-26T17:49:13-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577152-gravity-simulation-fractal-applet/
<p style="color: grey">
Java
recipe 577152
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/applet/">applet</a>, <a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/physics/">physics</a>).
</p>
<p>It produces a fractal image from an N particle gravity simulation.
Warning: The calculation takes about a minute!</p>
Gravity Simulation Applet (Java)
2010-03-26T17:50:43-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577151-gravity-simulation-applet/
<p style="color: grey">
Java
recipe 577151
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/applet/">applet</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/physics/">physics</a>).
</p>
<p>It displays the trajectories of N mass particles moving under the force of gravity in 2D space.
The repeating patterns mean particles started orbiting each other.</p>
Energy Distrubution of Black Body (Python)
2009-05-19T05:17:03-07:00alexander bakerhttp://code.activestate.com/recipes/users/4166679/http://code.activestate.com/recipes/576761-energy-distrubution-of-black-body/
<p style="color: grey">
Python
recipe 576761
by <a href="/recipes/users/4166679/">alexander baker</a>
(<a href="/recipes/tags/black/">black</a>, <a href="/recipes/tags/body/">body</a>, <a href="/recipes/tags/energy/">energy</a>, <a href="/recipes/tags/physics/">physics</a>, <a href="/recipes/tags/pylab/">pylab</a>, <a href="/recipes/tags/scipy/">scipy</a>).
</p>
<p>Energy Distrubution of Black Body</p>
pauli spin matricies (Python)
2008-08-26T01:52:06-07:00alexander bakerhttp://code.activestate.com/recipes/users/4166679/http://code.activestate.com/recipes/576458-pauli-spin-matricies/
<p style="color: grey">
Python
recipe 576458
by <a href="/recipes/users/4166679/">alexander baker</a>
(<a href="/recipes/tags/kron/">kron</a>, <a href="/recipes/tags/ladder/">ladder</a>, <a href="/recipes/tags/numpy/">numpy</a>, <a href="/recipes/tags/pauli/">pauli</a>, <a href="/recipes/tags/physics/">physics</a>, <a href="/recipes/tags/spin/">spin</a>).
</p>
<p>simple spin investigation in python</p>
Spherical Polar Coordinates (Python)
2008-08-26T08:49:39-07:00alexander bakerhttp://code.activestate.com/recipes/users/4166679/http://code.activestate.com/recipes/576457-spherical-polar-coordinates/
<p style="color: grey">
Python
recipe 576457
by <a href="/recipes/users/4166679/">alexander baker</a>
(<a href="/recipes/tags/mechanics/">mechanics</a>, <a href="/recipes/tags/physics/">physics</a>, <a href="/recipes/tags/polar/">polar</a>, <a href="/recipes/tags/quantum/">quantum</a>).
</p>
<p>Spherical Polar Coordinates
<a href="http://www.alexfb.com/cgi-bin/twiki/view/PtPhysics/Spherical-Polar-Coordinates-Python" rel="nofollow">http://www.alexfb.com/cgi-bin/twiki/view/PtPhysics/Spherical-Polar-Coordinates-Python</a></p>