コード例 #1
0
 public SimplecticPoint4(SimplecticPoint3 source, long w_cell, double w_offset)
 {
     x_cell = source.x_cell;
     y_cell = source.y_cell;
     z_cell = source.z_cell;
     this.w_cell = w_cell;
     x_offset = source.x_offset;
     y_offset = source.y_offset;
     z_offset = source.z_offset;
     this.w_offset = w_offset;
 }
コード例 #2
0
 private double gradient(SimplecticPoint3 p)
 {
     var attn = simplex_size - p.x_offset * p.x_offset - p.y_offset * p.y_offset - p.z_offset * p.z_offset;
     if (attn > 0.0)
     {
         var g = GradientGet3(SeedGet3(p.x_cell, p.y_cell, p.z_cell));
         var attn2 = attn * attn;
         return attn2 * attn2 * (p.x_offset * g.X + p.y_offset * g.Y + p.z_offset * g.Z);
     }
     else
     {
         return 0.0;
     }
 }