{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Computing Electric Field Along the Axis of a Charged Ring With a Computer" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This program computes the net electric field due to a uniformly charged ring of radius $R$ and charge $Q$ at a given point in space." ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [], "source": [ "from __future__ import division, print_function\n", "from vpython import *\n", "from math import *" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
" ], "text/plain": [ "