Simulation noise: Difference between revisions

Content deleted Content added
No edit summary
spelling, punctuation, format per MOS:SECTIONCAPS
Line 9:
Other approaches developed later that use vector calculus identities to produce divergence free fields, such as "Curl-Noise" as suggested by Robert Bridson, and "Divergence-Free Noise" due to Ivan DeWolf. These often require calculation of lattice noise gradients, which sometimes are not readily available. A naive implementation would call a lattice noise function several times to calculate its gradient, resulting in more computation than is strictly necessary. Unlike these noises, simulation noise has a geometric rationale in addition to its mathematical properties. It simulates vortices scattered in space, to produce its pleasing aesthetic.
 
== Curl Noisenoise ==
The vector field is created as follows, for eveyevery point (x,y,z) in the space a vector field '''G''' is created, every component x, y and z of the vector field '''(Gx, Gy, Gz)''' is defined by a 3D perlin or simplex noise function with 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 diferencesdifferences of implicit calculation inside the simplex noise.
 
The partial derivatives are used to calculate '''F''' as the curl of '''G''' given by
 
<math>F = (\frac{\partial Gz}{\partial y} - \frac{\partial Gy}{\partial z} ,\frac{\partial Gx}{\partial z} - \frac{\partial Gz}{\partial x},\frac{\partial Gy}{\partial x} - \frac{\partial Gx}{\partial y})</math>
 
== Bitangent Noisenoise ==
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:
 
Line 29:
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.
 
== Signed Distancedistance Noisenoise ==
The vector field is created based on a closed and differentiable implicit surface '''S = F'''(x,y,z) = 0. For every point in the space, frecuentlyfrequently outside or near the surface, we get a vector '''g''' that is normal to the surface, this is the gradient of S or the partial derivatives respect to x, y and z, this vector is not unitary, but we can get a unitary normal '''n''' by dividing each component of the point by the magnitude of the gradient '''g'''. Outside of the surface all these normals point away from the surface.
 
<math>
Line 47:
<math>SDN = (\frac{\partial Vz}{\partial y} - \frac{\partial Vy}{\partial z} ,\frac{\partial Vx}{\partial z} - \frac{\partial Vz}{\partial x},\frac{\partial Vy}{\partial x} - \frac{\partial Vx}{\partial y})</math>
 
By construction this vector SDN will point in a tangent direction to aan isosurface at the level of the signed distance to the original surface and can be used to confine the movements of the particles to stay in that surface.