Home | History | Annotate | Download | only in program

Lines Matching refs:simplex

34  * \brief C implementation of Perlin Simplex Noise over 1, 2, 3 and 4 dims.
38 * This implementation is "Simplex Noise" as presented by
140 * (The simplex noise functions as such also have different scaling.)
187 * A lookup table to traverse the simplex around a given point in 4D.
191 static unsigned char simplex[64][4] = {
211 /** 1D simplex noise */
237 /** 2D simplex noise */
246 /* Skew the input space to determine which simplex cell we're in */
263 /* For the 2D case, the simplex shape is an equilateral triangle. */
264 /* Determine which simplex we are in. */
265 int i1, j1; /* Offsets for second (middle) corner of simplex in (i,j) coords */
319 /** 3D simplex noise */
329 /* Skew the input space to determine which simplex cell we're in */
350 /* For the 3D case, the simplex shape is a slightly irregular tetrahedron. */
351 /* Determine which simplex we are in. */
352 int i1, j1, k1; /* Offsets for second corner of simplex in (i,j,k) coords */
353 int i2, j2, k2; /* Offsets for third corner of simplex in (i,j,k) coords */
476 /** 4D simplex noise */
508 /* For the 4D case, the simplex is a 4D shape I won't even try to describe.
512 * then find the correct traversal order for the simplex we're in.
525 int i1, j1, k1, l1; /* The integer offsets for the second simplex corner */
526 int i2, j2, k2, l2; /* The integer offsets for the third simplex corner */
527 int i3, j3, k3, l3; /* The integer offsets for the fourth simplex corner */
534 * simplex[c] is a 4-vector with the numbers 0, 1, 2 and 3 in some
539 * number 3 in the "simplex" array is at the position of the
542 i1 = simplex[c][0] >= 3 ? 1 : 0;
543 j1 = simplex[c][1] >= 3 ? 1 : 0;
544 k1 = simplex[c][2] >= 3 ? 1 : 0;
545 l1 = simplex[c][3] >= 3 ? 1 : 0;
546 /* The number 2 in the "simplex" array is at the second largest coordinate. */
547 i2 = simplex[c][0] >= 2 ? 1 : 0;
548 j2 = simplex[c][1] >= 2 ? 1 : 0;
549 k2 = simplex[c][2] >= 2 ? 1 : 0;
550 l2 = simplex[c][3] >= 2 ? 1 : 0;
551 /* The number 1 in the "simplex" array is at the second smallest coordinate. */
552 i3 = simplex[c][0] >= 1 ? 1 : 0;
553 j3 = simplex[c][1] >= 1 ? 1 : 0;
554 k3 = simplex[c][2] >= 1 ? 1 : 0;
555 l3 = simplex[c][3] >= 1 ? 1 : 0;