Write a program Potential that creates an array of charged particles from values given on standard input

Question:

Write a program Potential that creates an array of charged particles from values given on standard input (each charged particle is specified by its \(x\) coordinate, \(y\)-coordinate, and charge value) and produces a visualization of the electric potential in the unit square. To do so, sample points in the unit square. For each sampled point, compute the electric potential at that point (by summing the electric potentials due to each charged particle) and plot the corresponding point in a shade of gray proportional to the electric potential.

image text in transcribed

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: