Electric field of point charge, charged sphere and charged, spherical conductor using Gauss’s law.
Edit and compile if you like:
% Author: Izaak Neutelings (Februari, 2020)% page 8 https://archive.org/details/StaticAndDynamicElectricity% https://tex.stackexchange.com/questions/56353/extract-x-y-coordinate-of-an-arbitrary-point-on-curve-in-tikz% https://tex.stackexchange.com/questions/412899/tikz-calculate-and-store-the-euclidian-distance-between-two-coordinates\documentclass[border=3pt,tikz]{standalone}\usepackage{amsmath} % for \dfrac\usepackage{bm}\usepackage{physics}\usepackage{tikz,pgfplots}\usepackage[outline]{contour} % glow around text\usetikzlibrary{angles,quotes} % for pic (angle labels)\usetikzlibrary{decorations.markings}\usetikzlibrary{shapes,intersections} % for path name\tikzset{>=latex} % for LaTeX arrow head\contourlength{1.8pt}\usepackage{xcolor}\colorlet{Ecol}{orange!90!black}\colorlet{EcolFL}{orange!80!black}\colorlet{veccol}{green!45!black}\colorlet{EFcol}{red!60!black}\colorlet{pluscol}{red!60!black}\colorlet{minuscol}{blue!60!black}\colorlet{gausscol}{green!50!black!80}\tikzstyle{charged}=[top color=blue!20,bottom color=blue!40,shading angle=10]\tikzstyle{charge+}=[very thin,draw=black,top color=red!80,bottom color=red!80!black,shading angle=-5]\tikzstyle{charge-}=[very thin,draw=black,top color=blue!50,bottom color=blue!70!white!90!black,shading angle=10]\tikzstyle{darkcharged}=[very thin,top color=blue!60,bottom color=blue!80,shading angle=10]\tikzstyle{gauss surf}=[green!40!black,top color=green!2,bottom color=green!80!black!70,shading angle=5,fill opacity=0.6]\tikzstyle{gauss dark}=[green!40!black,fill=green!40!black!70,fill opacity=0.8]\tikzstyle{gauss line}=[green!40!black]\tikzstyle{gauss dashed line}=[green!60!black!80,dashed,line width=0.2]\tikzstyle{vector}=[->,thick,veccol]\tikzstyle{normalvec}=[->,thick,blue!80!black!80]\tikzstyle{EField}=[->,thick,Ecol]\tikzstyle{EField dashed}=[dashed,Ecol,line width=0.6]\tikzset{EFieldLine/.style={thick,EcolFL,decoration={markings,mark=at position #1 with {\arrow{latex}}},postaction={decorate}},
Click to download: electric_field_sphere.tex • electric_field_sphere.pdf
Open in Overleaf: electric_field_sphere.tex