Notes on "Image Methods in Electrostatics" (A Computer-Animated Film)

Ronald Blum

University of Chicago, Dept of Physics

May 1968

American Journal of Physics

Work performed under the auspices of the U.S. Atomic Energy Commission, while a visiting scientist in the Applied Mathematics Division, Argonne National Laboratory, Argonne, Ill. 60440.

The computation and production of a computer-animated film is described. The film depicts a point charge slowly approached by (1) a grounded conducting sphere, and (2) an ungrounded (net charge equals zero) conducting sphere.

INTRODUCTION

The human organism is not a digital machine. It continuously monitors its environment by means of its senses, notably sight, a sense which is remarkably well adapted and acute. In conceptual areas as well, we instinctively rely upon pictures to develop and coordinate ideas; extremely complicated relations can be comprehended literally in einem Augenblick through the use of a picture. In addition to these obvious formal advantages, there is a fundamental fascination with images which seems to underlie the current rapid development of computer animation. Many a scholar opens his Sunday newspaper to the colored comics section first. One may speculate that the time is not far distant when the average research scientist will be able to program complicated three-dimensional stereo representations in motion with the same ease with which he would attempt a sketch. As a possible antidote to the paper explosion, filmed computer output is already in use, while the advent of small, portable cartridge-loading film projectors may be expected to lead to vastly increased use of short film loops as education and information-storing devices.

One topic in physics which lends itself to a pictorial treatment is the concept of fields and field lines. This concept is widely used in electromagnetism and plasma physics, yet direct physical observation of field lines is generally limited to sprinkling iron filings on a bar magnet, although more sophisticated techniques exist[1]. Hence this film, Image Methods in Electrostatics, designed to demonstrate, on the level of junior-year physics, something of the nature of field lines, their elasticity, and the way in which they can form and re-form. The film, produced at Argonne National Laboratory on a Dataa Display 80A cathode-ray tube (CRT) on line with a CDC 3600 computer, depicts the familiar problem of a point charge in the vicinity of a grounded conducting sphere, and the less-familiar problem of a point charge and a conducting sphere which is not grounded, but maintains a net charge of zero.

Copies of the film will be loaned or sold at nominal cost to those interested, through the Argonne Film Center. Four-minute 8-mm loops are available as well as 16-mm film.

During the animated sequences the spheres are shown slowly moving toward the point charge - so slowly that time-depedent effects may be ignored.

I. POINT CHARGE AND GROUNDED CONDUCTING SPHERE

In the case of a grounded conducting sphere of radius a separated from a point charge Q by a distance D (see Fig. 1) one must solve Laplace's equation for electrostatic potential V, in the region outside the sphere, with a singularity at Q and vanishing potential on the boundary of the sphere. This is accomplished by replacing the sphere with an image charge Q'=-aQ/D located a distance D'=D-a2/D from Q. This is the physical equivalent of constructing Green's function for the Laplacian in this geometry. The obvious conceptual simplicity of the problem generally precludes any serious attempt to construct the field lines, so the analysis will be presented in some detail.

rN D' D N Q Q' a θ θ=θ0C r r'
Figure 1 - Grounded conducting sphere

In mks units the equation for the potential is

4 π ε 0 V = ( Q / r ) + ( Q ' / r ' ) ( 1 )

and for the electric fields E = - ∇V

4 π ε 0 E r = ( Q / r 2 ) + [ Q ' ( r - μ D ' ) / r ' 3 ] ]
4 π ε 0 E 0 = Q ' D ' σ / r ' 3 ( 2 )

where we use the notation μ = cos θ, σ = sin θ for convenience. The field-line equation

r ( d θ / d r ) = E θ / E r ( 3 )

is easily integrated by noting that, since ∇.E = 0 implies

( r 2 σ E r ) / r = - ( r σ E θ ) / θ ( 4 )

i.e., the integrating factor of the field-line equation is , its solution, for a= 1, is

F ( r , θ ) = μ + [ ( D ' - μ r ) / D r ' ] = B ( 5 )

where the constant B determines the particular field line. If the field line leaves Q at an angle θ0, then

B = μ 0 + 1 / D ( 6 )

The field-line equation gives rise to a quadratic in r which has the solution, for 0 ≤ θ ≤ π

r = D ' ( A 2 - μ 2 ) -1 [ ( A 2 - 1 ) μ + A σ ( 1 - A 2 ) 1/2 ] ( 7 )

where A=D(B-μ). If A=+μ, r=D'/2μ; if A=-μ, r= ∞. For real solutions,-1≤A≤1, or μ0≤μ≤μ0+2/D for the field line characterized by μ0; for -π≤θ≤0 replace the (+) sign before the radical in Eq. (7) with a (-) . The result is symmetric about the axis; hence this region is not shown in the film.

As r, r'→∞ , Eq. (5) shows that the field lines asymptotically approach

μ = μ 0 + ( 1 / D ) 1 - ( 1 / D ) 1 ( 8 )

implying that for some μ0≥μ0c=1-2/D the field lines never arrive at ∞, but end on the image charge instead. This is another way of saying that field lines originating in a solid angle of 4π(Q'/Q) steradians about the polar axis must end on Q' - a check on the correctness of the calculations.

The fact that there are two different types of field lines emanating from Q - those which end at infinity and those which end on the sphere - causes no embarrassment, because the explicit dependence r(θ) is known. When the dependence is only implicit the distinction is important, as is shown next. It is important to note the behavior of the limiting field line, μ0c, (see Fig. 1) which splits at N. A good tactic when dealing with problems of this sort is to look immediately for neutral points in the field. N must be such a point, and by solving the neutral-point equations Er=0=Eθ , one finds:

μ N = 1 , γ N = ( 1 + D ) [ 1 + 1 / ( D ) 1/2 ] ( 9 )

When these values are substituted back into Eq. (5), one finds that μ0=1-2/D=μ0c, as expected.

II. POINT CHARGE AND UNGROUNDED CONDUCTING SPHERE

This case is mathematically very similar to the previous case, but with a fundamental difference: the sphere is ungrounded and so must have a net charge of zero although the potential on the sphere is positive due to charge separation induced by the point charge Q. To do this we require two image charges, Q' = +aQ/D and Q"= +aQ/D.

There appears to be a transcription error in the paper in the Journal. Should Q' = +aQ/D be Q' = +aQ/D' ? See Figure 2 below.

The first charge is placed as before and serves to fix the sphere at V=0; the second charge is placed at the center of the sphere, thus achieving charge neutrality while maintaining the sphere as an equipotential at V =aQ/4πε0D. Furthermore, the net amount of electric flux entering the sphere must be zero; i.e., every time a field line is pulled into the conductor from one side it must emerge again on the other side.

D' D θ I II III r r' r" Q Q' Q" N θ=θ0C
Figure 2 - Ungrounded conducting sphere

The electric fields and the equation of the field lines are given by (see Fig. 2)

4 π ε 0 E r = Q r 2 + Q ' ( r - μ D ' ) r ' 3 + Q " ( r - μ D ) r " 3 ( 10 )
4 π ε 0 E θ = ( Q ' D ' σ / r ' 3 ) + ( Q D σ / r " 3 ) ( 11 )
F ( r , θ ) = μ + [ ( D ' - μ r ) / D r ' ] - [ ( D - μ r ) / D r " ]
= μ 0 , const ( 12 )

where μ0 determines the particular field line leaving Q at angle θ0.

From the equations Er=0= Eθ, it is not difficult to show that

γ N = ν D , γ N' = ν , γ N" = 1 ( 13 )

and

μ N = ( D 2 - 1 + ν 2 D 2 ) / 2 ν D 2 ( 14 )

where ν3=D'/D<1. Thus, the neutral point is on the surface of the sphere. Substituting into Eq. (12) shows that the critical field line is given by

μ 0c = ν μ N - ( 1 - ν 2 ) < μ N ( 15 )

and divides up the region outside the sphere into three separate portions (see Fig. 2):

(I) μ > μ0c, r < rN, containing field lines from Q which terminate on the sphere;

(II) μ > μ0c, r > rN, containing field lines leaving the sphere and going to infinity;

(III) μ < μ0c, containing field lines which do not touch the sphere but go on to infinity, although with more or less visible distortion.

Since Eq. (12) could not be solved for r(θ) directly, iterative solutions were obtained by the Newton Raphson method, using a simple predictor to hasten convergence. Consequently, it proved necessary to test for and treat the three regions separately in the computations.

III. COMPUTATION

The animated sequences were to show the distortion of field lines for varying positions of grounded and ungrounded conducting spheres relative to a point charge fixed at the origin of coordinates. It was necessary to depict the sphere slowly (quasistatically) approaching the point charge Q, lines of force emerging from Q at intervals θ =0°, 10°, 20° ... 180°, and the image charges as the sphere moved in toward Q from off screen. Instead of using some fixed value of δθ or δr as the increment for describing a field line, it was decided to take a fixed value of arc length

δ s = ( δ r 2 + r 2 δ θ 2 ) 1/2 ( 16 )

as increment to insure uniformity in the drawing and a more consistent relationship between distances on the screen and the number of iterations in the program. The increment δs was chosen small enough to give a smoothly continuous representation of field lines, but not too small. The CRT screen is divided into a mesh of 1024 × 1024 raster points; as a general rule, an arc of length less than 10-20 rasters can give rise to a jagged or lumpy effect.

A cardinal rule for economy in computer animation is to substitute intelligence for computation whenever possible. A useful tactic when changing configurations by small amounts is to avoid calling library functions by using recursion relations, identities, calculus of finite differences, and storage of frequently used function values. In the present case, trigonometric functions of θ were avoided by treating cosθ=μ as the angle variable. As the computations proceeded, the field-line equation was solved for r(μ) or μ(r), either exactly or by the Newton-Raphson method to within 0.5% accuracy, as the occasion warranted, and increments chosen from

δ μ = ± δ s [ ( δ r / δ u ) 2 + ( r / σ ) 2 ] -1/2 ( 17 )
δ r = ± δ s [ 1 + ( r / σ ) 2 ( δ μ / δ r ) 2 ] -1/2 ( 18 )

In order to begin the calculation for a given field line μ starting from Q, we note that the field lines must be approximately radial, so that the first point on the field line has coordinates (δs,μ). The variation in the cosine is second order in δs, and expanding r' and r" around the origin, retaining terms in δs2,

μ 1 = μ 0 + ( σ 0 2 δ s 2 / 2 D D' 2 ) grounded sphere
μ 1 = μ 0 + ( σ 0 2 δ s 2 / 2 D D' 2 ) ( 1 - ν 6 ) ungrounded sphere ( 19 )

The film was made in three sequences:

(a) the grounded sphere moving from D = 20 to D = 1.4 in steps of δD= -0.05, slowing down to δD= -0.025 at D=8, δs =0.3.

The CRT screen scale was chosen to be -10.1 ≤ x ≤ 10.1, -3.1 ≤ y ≤ 17.1 and plotting was restricted to the region -10.0 ≤ x ≤ 10.0. -3.0 ≤ y ≤ -17.0 by appropriate tests;

(b) the ungrounded sphere moving from D=12 to D=3 in steps of δD= -0.05. δs=0.3, with the same scale as in (a) ;

(c) the ungrounded sphere moving from D = 7 to D = 1.4 in steps of δD= -0.02, δs=0.15. At D=3 the step was changed to δD= -0.01, and the scale was shifted and enlarged to -0.4 ≤ x ≤ 8.1, -1.0 ≤ y ≤ 7.4. The time rate of change of D is irrelevant, except that it is much less than the speed of light.

In the case of the ungrounded sphere, a field line μ0 > μ0c which enters the sphere from region I must emerge again in region II, and approach a radial asymptote at angle μ0. This condition plus the condition r" = 1 yields the starting point for the continuation of the emerging field line in region II:

μ 2 = D ( μ 0 - 1 ) + 1
r 2 3 - ( 1 + D + D 2 + 2 μ 0 D 2 ) r 2 ) 2 D D' = 0 ( 20 )

where the second equation is solved for r2, by iteration, starting from

r 2 2 = 1 + 2 D + D 2 ( 2 μ 0 - 1 ) ( 21 )

as a first approximation.

Figures 3, 4, and 5 show negatives from sequences (a), (b), and (c), respectively. The effect of animation is to fill up blanks and smooth out nonuniformities, giving a more polished appearance than indicated by these figures.

Figure 3 - Sample negative, sequence (a)
Figure 4 - Sample negative, sequence (b)
Figure 5 - Sample negative, sequence (c)

IV. PRACTICAL MATTERS

The major questions which arose in making the present film were: what to do about titles; how many frames (individual pictures) to compute; how much discontinuity was tolerable between frames; how will the end result look on 8-mm film loops? It is preferable to have titles and textual material done in one strip by professionals. One is thus spared the tedium of reading in, storing, and displaying titles on the CRT, a fruitful source of programming errors. The author of a title is also apt to make only half as many frames as his audience requires for comfortable reading. All characters should be filmed at high intensity, in either medium or large size; in this film all line segments were redrawn three times, and characters from three to six times in order that they be sharp and clear after reduction to 8 mm (and they still left something to be desired). No title or text is short enough to be read in less than 5 sec.

At the beginning of each animated sequence, an establishing shot is desirable; i.e., repeating the first frame for about 5 sec or so to give the audience time to orient themselves. It is best to do this on the CRT, because doing it manually from a single frame is expensive, while the coordinates for a single frame can be stored in core or on tape and recalled each time the frame is plotted. If one wishes to have one sequence fade into another, a minimum of 20 extra frames should be left at the end of the first sequence and the beginning of the second for a lap dissolve. In this optical process the light is dimmed while exposing the end of the first sequence, turned on while exposing the beginning of the second, and the two films are overlapped and printed together.

The question of how much discontinuity is to be allowed between frames depends upon the nature of the individual motion, how long it is desired to keep the sequence before the audience, and the cost of computing each frame. The most widely used projectors are 16 mm. With sound they run at 24 frames/sec (40 frames= 1 ft of 16-mm film), silent at 16 frames/sec, as do 8-mm projectors. The faster the apparent motion, the more discontinuity one can allow. It is common practice in animation to duplicate each frame in printing (double framing), which can decrease computation time by a factor of two. However, if the motion is very slow, this may give rise to a noticeable jerkiness. For a very rapid motion one may be able to double frame twice, decreasing computation time by a factor of 4, without noticeable degradation of the continuity. Processing equipment also may allow for skip framing, printing every other frame in order to shorten a film, and every-other-frame-twice printing, which produces a sound version from a silent 16-mm film (not a recommended procedure). In the present film approximately 1000 frames were computed to total, after double framing, two minutes of viewing time (16-mm silent). If single frames are very expensive to compute, one may give the illusion of motion by duplicating, for example, a dozen separate frames enough times so that separate configurations can be connected by lap dissolves. The effect is roughly analogous to that of neon signs which simulate motion. Another tactic is to interpolate between computed configurations. If a film is to be distributed, the original should not be viewed on a projector because it will acquire scratches, sprocket wear, and other damage.

In general, a film will need processing, particularly if the original is a black line on transparent background, since black lines on the original tend to wash out in processing. One must make a reversal print or negative to obtain white lines on a black background. A colored filter can be used, as in the present case, to make the picture more attractive. The result is edited and spliced together with titles and texts to make a work print which is duplicated to make a splice-free master print and a viewing copy. If there are many splices, better quality can be obtained by making two work prints, an A and a B print. These prints show complementary alternating sequences with blank spaces between them. They are then matched up by edge numbers on the film and made into a single splice-free master print. One beneficial result of all this processing is that it increases the contrast and makes the white lines more intense.

In some installations the CRT may be unstable or the camera may not have positive or pin registration; in that case the picture will not appear to remain in the same place when viewed. One may avoid the issue by providing some small fixed marks on the frame, or a pair of fixed coordinate axes, for example, so that the film can be manually registered frame by frame when it is duplicated. This is expensive and not to be recommended, but it is possible.

One final word about esthetics: The artistic scientist or educator must keep an open mind about his mathematics. Often one may save significant amounts of time and trouble by taking advantage of the latitude which the visual process allows; accuracy must not be a sacred cow. In the present film it was found that terminating field lines at r" =0.97, rather than 1.00 (the surface of the sphere) gave a better image near the sphere, and that drawing straight lines left of the point charge in the second sequence gave results not visibly different from the correct formula. The intense glow around the point charge Q, which appeared as the result of too many field lines converging on one point, was purposely left in for dramatic effect. With a bit more courage on the part of the author, 2% accuracy would have been good enough for the Newton Raphson computations, rather than 0.5%. Pedagogically, the important point is not to draw a mathematically accurate image, but to convey a physically accurate idea.

ACKNOWLEDGMENTS

The author wishes to acknowledge the generous support extended him by the Applied Mathematics Division, Argonne National Laboratory, and particularly the assistance of Ronald Krupp of the Applied Mathematics Division and Stanley Andrews, of the Motion Picture Section. The author is also grateful to the Commission on College Physics for their considerable help and encouragement in pursuing this project.