<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://blutwald.de/index.php?action=history&amp;feed=atom&amp;title=Simple_Water_Simulation</id>
	<title>Simple Water Simulation - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://blutwald.de/index.php?action=history&amp;feed=atom&amp;title=Simple_Water_Simulation"/>
	<link rel="alternate" type="text/html" href="https://blutwald.de/index.php?title=Simple_Water_Simulation&amp;action=history"/>
	<updated>2026-04-17T17:53:32Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in Earthdawn-Wiki.v2</subtitle>
	<generator>MediaWiki 1.42.3</generator>
	<entry>
		<id>https://blutwald.de/index.php?title=Simple_Water_Simulation&amp;diff=3667&amp;oldid=prev</id>
		<title>Root: Die Seite wurde neu angelegt: „This is an example of an easy water-simulation. The algorithm is fast and stable and looks like water - not perfect, but it fits my needs.  Just move the mouse over the applet:  {Applet code=&#039;WaveApplet&#039; archive=&#039;WaveApplet.jar&#039;}  It is just a 2D Version, but it is easy to extend it to 3D as you can see in Jopulous.  ==== SourceCode====  * Java-SourceCode  ==== Descriptio…“</title>
		<link rel="alternate" type="text/html" href="https://blutwald.de/index.php?title=Simple_Water_Simulation&amp;diff=3667&amp;oldid=prev"/>
		<updated>2024-10-22T18:37:17Z</updated>

		<summary type="html">&lt;p&gt;Die Seite wurde neu angelegt: „This is an example of an easy water-simulation. The algorithm is fast and stable and looks like water - not perfect, but it fits my needs.  Just move the mouse over the applet:  &lt;a href=&quot;/index.php?title=Applet_Code_Wave_Applet_Archive_Wave_Applet_Jar&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Applet Code Wave Applet Archive Wave Applet Jar (Seite nicht vorhanden)&quot;&gt;{Applet code=&amp;#039;WaveApplet&amp;#039; archive=&amp;#039;WaveApplet.jar&amp;#039;}&lt;/a&gt;  It is just a 2D Version, but it is easy to extend it to 3D as you can see in &lt;a href=&quot;/index.php/Jopulous&quot; title=&quot;Jopulous&quot;&gt;Jopulous&lt;/a&gt;.  ==== SourceCode====  * &lt;a href=&quot;/index.php/Water_Applet_Source_Code&quot; title=&quot;Water Applet Source Code&quot;&gt;Java-SourceCode&lt;/a&gt;  ==== Descriptio…“&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This is an example of an easy water-simulation. The algorithm is fast and stable and looks like water - not perfect, but it fits my needs.&lt;br /&gt;
&lt;br /&gt;
Just move the mouse over the applet:&lt;br /&gt;
&lt;br /&gt;
[[Applet Code Wave Applet Archive Wave Applet Jar|{Applet code=&amp;#039;WaveApplet&amp;#039; archive=&amp;#039;WaveApplet.jar&amp;#039;}]]&lt;br /&gt;
&lt;br /&gt;
It is just a 2D Version, but it is easy to extend it to 3D as you can see in [[Jopulous]].&lt;br /&gt;
&lt;br /&gt;
==== SourceCode====&lt;br /&gt;
&lt;br /&gt;
* [[Water Applet Source Code|Java-SourceCode]]&lt;br /&gt;
&lt;br /&gt;
==== Description====&lt;br /&gt;
&lt;br /&gt;
A physical and mathematical description will follow, but the main idea is to use a height-field of seperated water columns and to calculate the pressure and the amount of water flowing between direct neighbour columns. The runtime is O(n) where n is the number of columns.&lt;br /&gt;
&lt;br /&gt;
The base idea is to use Newton&amp;#039;s second law of motion &lt;br /&gt;
&lt;br /&gt;
[[Math Fontsize18 Ffracdpdt Fracddtmv Mfracdvdtma|{Math fontsize=&amp;#039;18&amp;#039;&lt;br /&gt;
&lt;br /&gt;
F=\frac{dp}{dt}= \frac{d}{dt}(mv) =m\frac{dv}{dt}=ma&lt;br /&gt;
}]]&lt;br /&gt;
&lt;br /&gt;
in a combination with Bernoulli&amp;#039;s principle&lt;br /&gt;
&lt;br /&gt;
[[Math Fontsize18 Fracv22gyfrac Prhoconstant|{Math fontsize=&amp;#039;18&amp;#039;&lt;br /&gt;
&lt;br /&gt;
\frac{v^2}{2}+gy+\frac{P}{\rho}=constant&lt;br /&gt;
}]]&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;v&amp;#039;&amp;#039;&lt;br /&gt;
| fluid velocity along the streamline&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;g&amp;#039;&amp;#039;&lt;br /&gt;
| gravitational constant&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;y&amp;#039;&amp;#039;&lt;br /&gt;
| elevation in the direction of gravity&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;P&amp;#039;&amp;#039;&lt;br /&gt;
| pressure along the streamline&lt;br /&gt;
|-&lt;br /&gt;
| [[Math Latexbr Rho Fontsize8|{Math latex=&amp;#039;&amp;lt;br /&amp;gt;rho&amp;#039; fontsize=&amp;#039;8&amp;#039;}]]&lt;br /&gt;
| fluid density&lt;br /&gt;
|}&lt;br /&gt;
The algorithm is far from beeing a realistic simulation, if you look at the following.&lt;br /&gt;
&lt;br /&gt;
[[Datei:water-glass.jpg]]&lt;br /&gt;
&lt;br /&gt;
But with modern algorithms it is possible to get close to the original (sadly not in real time ; -) : &lt;br /&gt;
&lt;br /&gt;
* [http://www.dgp.toronto.edu/people/stam/reality/Research/pdf/GDC03.pdf Real Time Fluid Dynamics For Games]&lt;br /&gt;
* [http://graphics.stanford.edu/papers/water-sg02/ Animation and Rendering of Complex Water Surfaces]&lt;br /&gt;
* [http://www.vis.uni-stuttgart.de/vmv01/dl/papers/17.pdf Towards Real-Time Visual Simulation of Water Surfaces]&lt;br /&gt;
* [http://www.cis.upenn.edu/~fostern/pdfs/cgi97.pdf Controlling Fluid Animation]&lt;br /&gt;
* [http://portal.acm.org/citation.cfm?id=97884 Rapid, Stable Fluid Dynamics for Computer Graphics]&lt;br /&gt;
* [http://www.sciencemeetsart.com/wade/Projects/WaterFX2/index.html deep water simulation with DirectX9]&lt;br /&gt;
&lt;br /&gt;
And here an other naive algorithms like the one I use:&lt;br /&gt;
&lt;br /&gt;
* [http://freespace.virgin.net/hugo.elias/graphics/x_water.htm Rapid 2d Water]&lt;br /&gt;
&lt;br /&gt;
==== TODO ====&lt;br /&gt;
&lt;br /&gt;
* Make it better by suppressing the unnatural high frequent waves. This could be done by adding some not-accelerated amount of the water differnece to the left and right direct neighbour columns.&lt;/div&gt;</summary>
		<author><name>Root</name></author>
	</entry>
</feed>