Latest Java recipes tagged "math"http://code.activestate.com/recipes/langs/java/tags/math/new/2011-02-17T21:53:36-08:00ActiveState Code RecipesLangton's Ant Automaton (Java) 2011-02-17T21:53:36-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577576-langtons-ant-automaton/ <p style="color: grey"> Java recipe 577576 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>). </p> <p>(Generalized) Langton's Ant Automaton.</p> <p>Langton's ant is a 2D Turing machine. In this version, at each new x,y location the ant reads the byte value and replaces it w/ another, and chooses a new direction (one of 8 possible directions) to move.</p> <p>Byte replacement and direction values are read from random arrays.</p> Snowflake Fractal Applet using Cellular Automaton (Java) 2010-07-17T00:42:13-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577311-snowflake-fractal-applet-using-cellular-automaton/ <p style="color: grey"> Java recipe 577311 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>). </p> <p>Snowflake fractal applet using Cellular Automaton (2d CA). </p> Multi-threaded Mandelbrot Fractal Applet (Java) 2010-03-27T16:09:42-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577158-multi-threaded-mandelbrot-fractal-applet/ <p style="color: grey"> Java recipe 577158 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>). </p> <p>Number of threads can be chosen freely.</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> Curve fitting to N random points (Java) 2010-03-26T17:21:53-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577150-curve-fitting-to-n-random-points/ <p style="color: grey"> Java recipe 577150 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>). </p> <p>It creates a curve that passes through N random points using inverse distance weighted averages.</p> Color-cycling Plasma Fractal Applet (Java) 2010-03-26T05:06:53-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577148-color-cycling-plasma-fractal-applet/ <p style="color: grey"> Java recipe 577148 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>). </p> <p>Color-cycling plasma fractal applet.</p> Morphing Plasma Fractal Applet (Java) 2010-03-26T04:58:36-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577147-morphing-plasma-fractal-applet/ <p style="color: grey"> Java recipe 577147 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>). </p> <p>It displays a continuously changing plasma fractal.</p> Moving Plasma Fractal Applet (Java) 2010-03-26T01:28:58-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577146-moving-plasma-fractal-applet/ <p style="color: grey"> Java recipe 577146 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/math/">math</a>). </p> <p>Moving Plasma Fractal Applet.</p>