Simulation noise: Difference between revisions

Content deleted Content added
Described how to get three of the most used instances of simulation noise
Vector identities better explained
Line 10:
 
== Curl Noise ==
The vector field esis created as follows, for evey point (x,y,z) in the space a vector field '''G''' is created as follow, every component x, y and z of the vector field '''(Gx, Gy, Gz)''' is defined by a 3D perlin or simplex noise function depending onwith x, y and z as parameters. The partial derivative of Gx, Gy, and Gz respect to x, y and z is obtained with the gradient of the perlin or simplex noise by finite diferences of implicit calculation inside the simplex noise.
 
The partial derivatives are used to calculate '''F''' as the curl of '''G''' given by
Line 17:
 
== Bitangent Noise ==
This method is based in the fact that the curl of the gradient of scalar field is zero and the identity that expand the divergence of a cross product of two vectors '''A''' and '''B''' as the difference of the dot products of each vector with the curl of the other:
 
<math>\nabla \times ( \nabla \varphi ) = \mathbf{0}.</math>
Line 25:
\,-\, \mathbf{A} \cdot (\nabla {\times} \mathbf{B})</math>
 
which means that if the divergencecurl of both vector fields is zero then the productdivergence of twothe gradientsproduct of scalartwo fieldsvectors isthat zero ifare the curlgradients of both vectorscalar fields is zero too. This result in a divergence free vector field by construction only calling 2two noise functions to create the scalar fields.
 
The vector field es created as follows, two scalar fields are calculated <math>\phi</math> and <math>\psi</math> using 3D perlin or simplex noise functions, then the gradients '''A''' and '''B''' of each of this fields is calculated, the cross product of '''A''' and '''B''' gives a divergence free vector field.