Ejemplo n.º 1
0
 public SimplecticPoint3(SimplecticPoint2 source, long z_cell, double z_offset)
 {
     x_cell = source.x_cell;
     y_cell = source.y_cell;
     this.z_cell = z_cell;
     x_offset = source.x_offset;
     y_offset = source.y_offset;
     this.z_offset = z_offset;
 }
Ejemplo n.º 2
0
 private double gradient(SimplecticPoint2 p)
 {
     var attn = simplex_size - p.x_offset * p.x_offset - p.y_offset * p.y_offset;
     if (attn > 0.0)
     {
         var g = GradientGet2(SeedGet2(p.x_cell, p.y_cell));
         var attn2 = attn * attn;
         return attn2 * attn2 * (p.x_offset * g.X + p.y_offset * g.Y);
     }
     else
     {
         return 0.0;
     }
 }