Plotting Vector Fields

Clear["Global`*"]

<<Calculus`VectorAnalysis`

<<Graphics`PlotField`

<<Graphics`PlotField3D`

pot2d[x_,y_] := 1/Sqrt[x^2+y^2+0.1]

plot1 = ContourPlot[ pot2d[x,y], {x,-2,2},{y,-2,2},
                     ContourShading -> False,
                     ContourSmoothing -> True ];

?ContourPlot

plot2 = PlotGradientField[ -pot2d[x,y], {x,-2,2},{y,-2,2} ];

?PlotGradientField

Show[ plot1, plot2 ];

pot3d[x_,y_,z_] := 1/Sqrt[x^2+y^2+z^2+0.1]

ContourPlot[Evaluate[pot3d[x,y,z] /. z->0 ],
                    {x,-2,2},{y,-2,2},
                    PlotPoints -> 40,
                    Contours -> 40,
                    ContourShading -> False ];

PlotGradientField3D[ -pot3d[x,y,z],
                     {x,-2,2},{y,-2,2},{z,-2,2},
                     PlotPoints -> 6,
                     VectorHeads -> True,
              Graphics`PlotField3D`ScaleFunction->(1&)];

?PlotGradientField3D

potdip[x_,y_,z_] := 1/Sqrt[(x-1)^2+y^2+z^2+0.1] -
                    1/Sqrt[(x+1)^2+y^2+z^2+0.1]

ContourPlot[Evaluate[potdip[x,y,z] /. z->0 ],
                    {x,-2,2},{y,-2,2},
                    PlotPoints -> 40,
                    Contours -> 40,
                    ContourShading -> False ];

PlotGradientField3D[ -potdip[x,y,z],
                     {x,-2,2},{y,-2,2},{z,-2,2},
                     PlotPoints -> 6,
                     VectorHeads -> True,
              Graphics`PlotField3D`ScaleFunction->(1&)];