Three-dimensional shaping by dot-matrix electrical discharge machining