<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.physicsbook.gatech.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Yjia67</id>
	<title>Physics Book - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://www.physicsbook.gatech.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Yjia67"/>
	<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/Special:Contributions/Yjia67"/>
	<updated>2026-05-10T18:16:45Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.7</generator>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Modelling_of_Electric_and_Magnetic_Forces&amp;diff=31005</id>
		<title>VPython Modelling of Electric and Magnetic Forces</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Modelling_of_Electric_and_Magnetic_Forces&amp;diff=31005"/>
		<updated>2017-11-30T04:42:29Z</updated>

		<summary type="html">&lt;p&gt;Yjia67: I have expanded on the specifics of mathematical and computational models of electric and magnetic forces. I made a VPython example for electric forces, and I also commented on the VPython code to show what each step actually does. Connectedness&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;VPython Modeling of Electric and Magnetic Forces&lt;br /&gt;
&lt;br /&gt;
Claimed By: Griffin Bonnett Spring 2017 4/09/2017&lt;br /&gt;
&lt;br /&gt;
Claimed by: Yunqing Jia Fall 2017 &lt;br /&gt;
&lt;br /&gt;
==The Main Idea==&lt;br /&gt;
Vpython is a programming language designed to model physics properties in a 3D simulation. It consists of the Python programming languange with an additional module called Visual that creates the environment to generate models in 3D. This section we will be focused on modeling the electric and magnetic forces in Vpython. &lt;br /&gt;
&lt;br /&gt;
===A Mathematical Model===&lt;br /&gt;
&lt;br /&gt;
When you are starting a new Vpython program, first write out all the equations and constants you might need, and then define the variables in their appropriate forms such as vectors, arrows, or spheres.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Electric Force&#039;&#039;&lt;br /&gt;
::&amp;lt;math&amp;gt;\vec F={q}_{2}\times\vec{E}_{1} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::equations for electric fields(vec{E})&lt;br /&gt;
::[[File:equationsForElectricFields.PNG]]&lt;br /&gt;
::[http://www.physicsbook.gatech.edu/Electric_Force derivation]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Magnetic Force&#039;&#039;&lt;br /&gt;
::&amp;lt;math&amp;gt;{\vec{F} = q\vec{v}\times\vec{B}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::equations for magnetic fields(vec{B})&lt;br /&gt;
::[[File:equationsForMagneticFields.PNG]]&lt;br /&gt;
::[http://www.physicsbook.gatech.edu/Magnetic_Force derivation]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The equations are the mathematical basis for computational simulations. After defining constants and initializing variables in the initial state, you can now mathematically update the position, electric/magnetic field, electric/magnetic force in the next small time step. In order to show this at different times and/or locations, you can simply iterate the same process with the new values. Since it is an iterated process, VPython can only give us an approximate model. To display time-varying electric or magnetic field, one can decrease the time increment in each step to make the approximation more accurate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===A Computational Model===&lt;br /&gt;
 &lt;br /&gt;
This is when we begin to program using Vpython. &lt;br /&gt;
&lt;br /&gt;
1. Initialize constants &lt;br /&gt;
&lt;br /&gt;
2. Set initial conditions &lt;br /&gt;
&lt;br /&gt;
3. Write a loop&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;in the loop, you will (not all steps are included depending on the problem)&#039;&#039;&lt;br /&gt;
::i. update electric / magnetic fields if they are time-variant&lt;br /&gt;
::ii. update electric / magnetic forces&lt;br /&gt;
::iii. update momentum / velocity if the observed target is a moving object&lt;br /&gt;
::iv. update particle position &lt;br /&gt;
&lt;br /&gt;
A finished and working program will give us the ability to visualize the physics of magnetic and electric forces. Vpython can be used to model any number of other physical interactions as well such as springs and gravity. Running a simulation allows us to view concepts that would not be observable any other way especially on the same timescale. We are able to visibly observe magnetic and electric fields in a dynamic situation which is difficult to visualize without a model.  This also allows for many more calculations to be performed and the ability to interpolate and extrapolate data.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Electric Force Model===&lt;br /&gt;
&lt;br /&gt;
[http://www.glowscript.org/#/user/JJ129816/folder/Private/program/electricForce ElectricForceModel]&lt;br /&gt;
&lt;br /&gt;
===Magnetic Force Model===&lt;br /&gt;
&lt;br /&gt;
[http://www.glowscript.org/#/user/griffinbonnett/folder/Public/program/vPython MagForceModel]&lt;br /&gt;
&lt;br /&gt;
[[File:MagForcePic.JPG]]&lt;br /&gt;
&lt;br /&gt;
For Magnetic forces:&lt;br /&gt;
We are going to simulate the motion of a charged particle immersed in a magnetic&lt;br /&gt;
field. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Frame the problem in fundamental ideas or equations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is where you write down anything the problem gives you. &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Equations:&#039;&#039;&#039;           &#039;&#039;&#039;Constants:&#039;&#039;&#039;&lt;br /&gt;
 F = q·v x B          Charge of the particle(q)&lt;br /&gt;
 dp/dt = Fnet         Velocity vector of the particle(v)&lt;br /&gt;
 p = ma               Magnetic field vector(B)          &lt;br /&gt;
 v= p/m               Mass of particle (m) &lt;br /&gt;
                      &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Due to our understanding of how magnetic fields cause a force on a moving charged particle, we can craft a general outline for the calculations. We can also find expected values and predict the behavior of the model. We will need to calculate the magnetic force and use it to update its position and velocity.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step2: Conceptualize the problem&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
We want to show the particle moving through space relative to time. Since computer programs only comprehend discreet values, we will want to move through time in discreet increments. We do this by using a while loop because while t is less than a certain value the loop will continue to be updated. We can put the limit of t to anytime so long as the rate is high enough to run the program reasonably fast and t is large enough to run the full length simulation. We will set the initial time to t = 0 and add a constant delta t to each iteration in the while loop.  Each new iteration of time will allow us to update the position and velocity vector. To update these values, conservation of momentum is used to relate the magnetic and the position and velocity.&lt;br /&gt;
&lt;br /&gt;
    &#039;&#039;&#039;Initialize the variables&#039;&#039;&#039;&lt;br /&gt;
     B0 = vector(0,1,0)  &#039;&#039;#initial magnetic field&#039;&#039;&lt;br /&gt;
     particle = sphere(pos=(0, 0,.3), radius = .01, color = color.red)  &#039;&#039;#create particle and set initial position&#039;&#039;&lt;br /&gt;
     velocity = vector(2e6,1e6,0)  &#039;&#039;#initial velocity&#039;&#039;&lt;br /&gt;
     q = 1.6e-19  &#039;&#039;#constant: Coulombs of charge in one particle&#039;&#039;&lt;br /&gt;
     m = 1.7e-27  &#039;&#039;#constant: mass of particle&#039;&#039;&lt;br /&gt;
     trail = curve(color=particle.color)  &#039;&#039;#establish visualization of the force&#039;&#039;&lt;br /&gt;
     deltat = 1e-11  &#039;&#039;#time increments&#039;&#039;&lt;br /&gt;
     t = 0  &#039;&#039;#initial time&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
    &#039;&#039;&#039;The Loop&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
    while t &amp;lt; 1.3e-3:&lt;br /&gt;
    rate(10000)&lt;br /&gt;
    ## Insert the necessary steps inside the loop below to update the particle&#039;s position and velocity&lt;br /&gt;
    ## a)calculate the needed quantities to update the particle&#039;s velocity&lt;br /&gt;
    p = m * velocity &lt;br /&gt;
    Fnet= q * cross(velocity, B0)&lt;br /&gt;
    p = p + Fnet*deltat&lt;br /&gt;
    &lt;br /&gt;
    ## b)update the particle&#039;s velocity&lt;br /&gt;
    velocity = p/m&lt;br /&gt;
   &lt;br /&gt;
    ## c) Update the position of the proton (movies in a straight line initially).&lt;br /&gt;
    particle.pos = particle.pos + velocity*deltat&lt;br /&gt;
    trail.append(pos=particle.pos)&lt;br /&gt;
    t=t+deltat&lt;br /&gt;
&lt;br /&gt;
The method used to simulate magnetic force would work equally well to simulate the electric force.&lt;br /&gt;
&lt;br /&gt;
==Connectedness==&lt;br /&gt;
#How is this topic connected to something that you are interested in?&lt;br /&gt;
::I am fascinated by 3D modeling. I have begun to teach my self Blender recently. Even though there is less programming involved, Blender incorporates much of the fundamentals that VPython uses such as vector math and using iterations of functions to achieve the desired output. I believe that computational models are great learning aids for people to visualize concepts in 3D, such as electric and magnetic fields and forces, especially when the path becomes complex and more mathematical iterations are required. &lt;br /&gt;
&lt;br /&gt;
#How is it connected to your major?&lt;br /&gt;
::VPython, electric and magnetic forces, and simulations are fundamental to my major as an electrical engineer. I can use Vpython to simulate how certain electrical components that would interact with a magnetic field. I could also use it to simulate the electromagnetic interactions at the quantum level. &lt;br /&gt;
&lt;br /&gt;
#Is there an interesting industrial application?&lt;br /&gt;
::Industry routinely uses VPython to simulate optimal efficiency. This can give a baseline to test the efficiency of industrial machines or processes. These simulations can help identify ways to improve the bottom line of a company. The simulations can also save money in research and development by replacing some more costly experimental testing.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
The cT programming language was created in 1985 by researchers at Carnegie Mellon University. Even though it had other applications, it was mainly a 2d graphics learning tool.&lt;br /&gt;
&lt;br /&gt;
As David Scherer began college in 1998, he was being taught physics using cT. Scherer saw some flaws in cT and set out to improve it. By 2000,Scherer, with help from David Andersen, Ruth Chabay, Ari Heitner, Ian Peters, and Bruce Sherwood,  created Visual, a module for Python that was easier than cT and could render in 3D. The name VPython comes from merging Visual and Python together. The development of VPython made cT obsolete and Vpython took its place.&lt;br /&gt;
&lt;br /&gt;
The most recent change in the VPython is the developers announced in 2016 that they will no longer be producing the classic software. Instead, the will focus on implementing the programming language in Glowscript and Jupyter.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
Are there related topics or categories in this wiki resource for the curious reader to explore?  How does this topic fit into that context?&lt;br /&gt;
&lt;br /&gt;
===Further reading===&lt;br /&gt;
&lt;br /&gt;
Books, Articles or other print media on this topic&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
&lt;br /&gt;
Internet resources on this topic&lt;br /&gt;
&lt;br /&gt;
http://www.glowscript.org/#/user/GlowScriptDemos/folder/matterandinteractions/program/MatterAndInteractions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://trinket.io/welcome&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://www.revolvy.com/main/index.php?s=VPython&amp;amp;item_type=topic&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
This section contains the the references you used while writing this page&lt;br /&gt;
&lt;br /&gt;
[[Category:Which Category did you place this in?]]&lt;br /&gt;
&lt;br /&gt;
https://www.revolvy.com/main/index.php?s=VPython&amp;amp;item_type=topic&lt;br /&gt;
&lt;br /&gt;
http://www.glowscript.org/#/user/griffinbonnett/folder/Public/program/vPython&lt;/div&gt;</summary>
		<author><name>Yjia67</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=File:MagForcePic.JPG&amp;diff=31004</id>
		<title>File:MagForcePic.JPG</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=File:MagForcePic.JPG&amp;diff=31004"/>
		<updated>2017-11-30T04:40:33Z</updated>

		<summary type="html">&lt;p&gt;Yjia67: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Yjia67</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Modelling_of_Electric_and_Magnetic_Forces&amp;diff=30981</id>
		<title>VPython Modelling of Electric and Magnetic Forces</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Modelling_of_Electric_and_Magnetic_Forces&amp;diff=30981"/>
		<updated>2017-11-30T04:28:17Z</updated>

		<summary type="html">&lt;p&gt;Yjia67: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;VPython Modeling of Electric and Magnetic Forces&lt;br /&gt;
&lt;br /&gt;
Claimed By: Griffin Bonnett Spring 2017 4/09/2017&lt;br /&gt;
&lt;br /&gt;
Claimed by: Yunqing Jia Fall 2017 &lt;br /&gt;
&lt;br /&gt;
==The Main Idea==&lt;br /&gt;
Vpython is a programming language designed to model physics properties in a 3D simulation. It consists of the Python programming languange with an additional module called Visual that creates the environment to generate models in 3D. This section we will be focused on modeling the electric and magnetic forces in Vpython. &lt;br /&gt;
&lt;br /&gt;
===A Mathematical Model===&lt;br /&gt;
&lt;br /&gt;
When you are starting a new Vpython program, first write out all the equations and constants you might need, and then define the variables in their appropriate forms such as vectors, arrows, or spheres.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Electric Force&#039;&#039;&lt;br /&gt;
::&amp;lt;math&amp;gt;\vec F={q}_{2}\times\vec{E}_{1} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::equations for electric fields(vec{E})&lt;br /&gt;
::[[File:equationsForElectricFields.PNG]]&lt;br /&gt;
::[http://www.physicsbook.gatech.edu/Electric_Force derivation]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Magnetic Force&#039;&#039;&lt;br /&gt;
::&amp;lt;math&amp;gt;{\vec{F} = q\vec{v}\times\vec{B}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::equations for magnetic fields(vec{B})&lt;br /&gt;
::[[File:equationsForMagneticFields.PNG]]&lt;br /&gt;
::[http://www.physicsbook.gatech.edu/Magnetic_Force derivation]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The equations are the mathematical basis for computational simulations. After defining constants and initializing variables in the initial state, you can now mathematically update the position, electric/magnetic field, electric/magnetic force in the next small time step. In order to show this at different times and/or locations, you can simply iterate the same process with the new values. Since it is an iterated process, VPython can only give us an approximate model. To display time-varying electric or magnetic field, one can decrease the time increment in each step to make the approximation more accurate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===A Computational Model===&lt;br /&gt;
 &lt;br /&gt;
This is when we begin to program using Vpython. &lt;br /&gt;
&lt;br /&gt;
1. Initialize constants &lt;br /&gt;
&lt;br /&gt;
2. Set initial conditions &lt;br /&gt;
&lt;br /&gt;
3. Write a loop&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;in the loop, you will (not all steps are included depending on the problem)&#039;&#039;&lt;br /&gt;
::i. update electric / magnetic fields if they are time-variant&lt;br /&gt;
::ii. update electric / magnetic forces&lt;br /&gt;
::iii. update momentum / velocity if the observed target is a moving object&lt;br /&gt;
::iv. update particle position &lt;br /&gt;
&lt;br /&gt;
A finished and working program will give us the ability to visualize the physics of magnetic and electric forces. Vpython can be used to model any number of other physical interactions as well such as springs and gravity. Running a simulation allows us to view concepts that would not be observable any other way especially on the same timescale. We are able to visibly observe magnetic and electric fields in a dynamic situation which is difficult to visualize without a model.  This also allows for many more calculations to be performed and the ability to interpolate and extrapolate data.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Magnetic Force Model===&lt;br /&gt;
&lt;br /&gt;
[http://www.glowscript.org/#/user/griffinbonnett/folder/Public/program/vPython MagForceModel]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For Magnetic forces:&lt;br /&gt;
We are going to simulate the motion of a charged particle immersed in a magnetic&lt;br /&gt;
field. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Frame the problem in fundamental ideas or equations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is where you write down anything the problem gives you. &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Equations:&#039;&#039;&#039;           &#039;&#039;&#039;Constants:&#039;&#039;&#039;&lt;br /&gt;
 F = q·v x B          Charge of the particle(q)&lt;br /&gt;
 dp/dt = Fnet         Velocity vector of the particle(v)&lt;br /&gt;
 p = ma               Magnetic field vector(B)          &lt;br /&gt;
 v= p/m               Mass of particle (m) &lt;br /&gt;
                      &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Due to our understanding of how magnetic fields cause a force on a moving charged particle, we can craft a general outline for the calculations. We can also find expected values and predict the behavior of the model. We will need to calculate the magnetic force and use it to update its position and velocity.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step2: Conceptualize the problem&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
We want to show the particle moving through space relative to time. Since computer programs only comprehend discreet values, we will want to move through time in discreet increments. We do this by using a while loop because while t is less than a certain value the loop will continue to be updated. We can put the limit of t to anytime so long as the rate is high enough to run the program reasonably fast and t is large enough to run the full length simulation. We will set the initial time to t = 0 and add a constant delta t to each iteration in the while loop.  Each new iteration of time will allow us to update the position and velocity vector. To update these values, conservation of momentum is used to relate the magnetic and the position and velocity.&lt;br /&gt;
&lt;br /&gt;
    &#039;&#039;&#039;Initialize the variables&#039;&#039;&#039;&lt;br /&gt;
     B0 = vector(0,1,0)&lt;br /&gt;
     particle = sphere(pos=(0, 0,.3), radius = .01, color = color.red)&lt;br /&gt;
     velocity = vector(2e6,1e6,0)&lt;br /&gt;
     q = 1.6e-19&lt;br /&gt;
     m = 1.7e-27&lt;br /&gt;
     trail = curve(color=particle.color)&lt;br /&gt;
     deltat = 1e-11&lt;br /&gt;
     t = 0 &lt;br /&gt;
&lt;br /&gt;
    &#039;&#039;&#039;The Loop&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
    while t &amp;lt; 1.3e-3:&lt;br /&gt;
    rate(10000)&lt;br /&gt;
    ## Insert the necessary steps inside the loop below to update the particle&#039;s position and velocity&lt;br /&gt;
    ## a)calculate the needed quantities to update the particle&#039;s velocity&lt;br /&gt;
    p = m * velocity&lt;br /&gt;
    Fnet= q * cross(velocity, B0)&lt;br /&gt;
    p = p + Fnet*deltat&lt;br /&gt;
    &lt;br /&gt;
    ## b)update the particle&#039;s velocity&lt;br /&gt;
    velocity = p/m&lt;br /&gt;
   &lt;br /&gt;
    ## c) Update the position of the proton (movies in a straight line initially).&lt;br /&gt;
    particle.pos = particle.pos + velocity*deltat&lt;br /&gt;
    trail.append(pos=particle.pos)&lt;br /&gt;
    t=t+deltat&lt;br /&gt;
&lt;br /&gt;
The method used to simulate magnetic force would work equally well to simulate the electric force.&lt;br /&gt;
&lt;br /&gt;
==Connectedness==&lt;br /&gt;
#How is this topic connected to something that you are interested in?&lt;br /&gt;
I am fascinated by 3D modeling. I have begun to teach my self Blender recently. Even though there is less programming involved, Blender incorporates much of the fundamentals that VPython uses such as vector math and using iterations of functions to achieve the desired output.  &lt;br /&gt;
&lt;br /&gt;
#How is it connected to your major?&lt;br /&gt;
VPython, electric and magnetic forces, and simulations are fundamental to my major as an electrical engineer. I can use Vpython to simulate how certain electrical components that would interact in an magnetic field. I could also use it to simulate the electromagnetic interactions at the quantum level. &lt;br /&gt;
&lt;br /&gt;
#Is there an interesting industrial application?&lt;br /&gt;
Industry routinely uses VPython to simulate optimal efficiency. This can give a baseline to test the efficiency of industrial machines or processes. These simulations can help identify ways to improve the bottom line of a company. The simulations can also save money in research and development by replacing some more costly experimental testing.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
The cT programming language was created in 1985 by researchers at Carnegie Mellon University. Even though it had other applications, it was mainly a 2d graphics learning tool.&lt;br /&gt;
&lt;br /&gt;
As David Scherer began college in 1998, he was being taught physics using cT. Scherer saw some flaws in cT and set out to improve it. By 2000,Scherer, with help from David Andersen, Ruth Chabay, Ari Heitner, Ian Peters, and Bruce Sherwood,  created Visual, a module for Python that was easier than cT and could render in 3D. The name VPython comes from merging Visual and Python together. The development of VPython made cT obsolete and Vpython took its place.&lt;br /&gt;
&lt;br /&gt;
The most recent change in the VPython is the developers announced in 2016 that they will no longer be producing the classic software. Instead, the will focus on implementing the programming language in Glowscript and Jupyter.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
Are there related topics or categories in this wiki resource for the curious reader to explore?  How does this topic fit into that context?&lt;br /&gt;
&lt;br /&gt;
===Further reading===&lt;br /&gt;
&lt;br /&gt;
Books, Articles or other print media on this topic&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
&lt;br /&gt;
Internet resources on this topic&lt;br /&gt;
&lt;br /&gt;
http://www.glowscript.org/#/user/GlowScriptDemos/folder/matterandinteractions/program/MatterAndInteractions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://trinket.io/welcome&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://www.revolvy.com/main/index.php?s=VPython&amp;amp;item_type=topic&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
This section contains the the references you used while writing this page&lt;br /&gt;
&lt;br /&gt;
[[Category:Which Category did you place this in?]]&lt;br /&gt;
&lt;br /&gt;
https://www.revolvy.com/main/index.php?s=VPython&amp;amp;item_type=topic&lt;br /&gt;
&lt;br /&gt;
http://www.glowscript.org/#/user/griffinbonnett/folder/Public/program/vPython&lt;/div&gt;</summary>
		<author><name>Yjia67</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Modelling_of_Electric_and_Magnetic_Forces&amp;diff=30971</id>
		<title>VPython Modelling of Electric and Magnetic Forces</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Modelling_of_Electric_and_Magnetic_Forces&amp;diff=30971"/>
		<updated>2017-11-30T04:25:56Z</updated>

		<summary type="html">&lt;p&gt;Yjia67: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;VPython Modeling of Electric and Magnetic Forces&lt;br /&gt;
&lt;br /&gt;
Claimed By: Griffin Bonnett Spring 2017 4/09/2017&lt;br /&gt;
&lt;br /&gt;
Claimed by: Yunqing Jia Fall 2017 &lt;br /&gt;
&lt;br /&gt;
==The Main Idea==&lt;br /&gt;
Vpython is a programming language designed to model physics properties in a 3D simulation. It consists of the Python programming languange with an additional module called Visual that creates the environment to generate models in 3D. This section we will be focused on modeling the electric and magnetic forces in Vpython. &lt;br /&gt;
&lt;br /&gt;
===A Mathematical Model===&lt;br /&gt;
&lt;br /&gt;
When you are starting a new Vpython program, first write out all the equations and constants you might need, and then define the variables in their appropriate forms such as vectors, arrows, or spheres.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Electric Force&#039;&#039;&lt;br /&gt;
::&amp;lt;math&amp;gt;\vec F={q}_{2}\times\vec{E}_{1} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::equations for electric fields(vec{E})&lt;br /&gt;
::[[File:equationsForElectricFields.PNG]]&lt;br /&gt;
::[http://www.physicsbook.gatech.edu/Electric_Force derivation]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Magnetic Force&#039;&#039;&lt;br /&gt;
::&amp;lt;math&amp;gt;{\vec{F} = q\vec{v}\times\vec{B}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::equations for magnetic fields(vec{B})&lt;br /&gt;
::[[File:equationsForMagneticFields.PNG]]&lt;br /&gt;
::[http://www.physicsbook.gatech.edu/Magnetic_Force derivation]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The equations are the mathematical basis for computational simulations. After defining constants and initializing variables in the initial state, you can now mathematically update the position, electric/magnetic field, electric/magnetic force in the next small time step. In order to show this at different times and/or locations, you can simply iterate the same process with the new values. Since it is an iterated process, VPython can only give us an approximate model. To display time-varying electric or magnetic field, one can decrease the time increment in each step to make the approximation more accurate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===A Computational Model===&lt;br /&gt;
 &lt;br /&gt;
This is when we begin to program using Vpython. &lt;br /&gt;
&lt;br /&gt;
1. Initialize constants &lt;br /&gt;
&lt;br /&gt;
2. Set initial conditions &lt;br /&gt;
&lt;br /&gt;
3. Write a loop&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;in the loop, you will (not all steps are included depending on the problem)&#039;&#039;&lt;br /&gt;
::1. update electric / magnetic fields if they are time-variant&lt;br /&gt;
::2. update electric / magnetic forces&lt;br /&gt;
::3. update momentum / velocity if the observed target is a moving object&lt;br /&gt;
::4. update particle position &lt;br /&gt;
&lt;br /&gt;
A finished and working program will give us the ability to visualize the physics of magnetic and electric forces. Vpython can be used to model any number of other physical interactions as well such as springs and gravity. Running a simulation allows us to view concepts that would not be observable any other way especially on the same timescale. We are able to visibly observe magnetic and electric fields in a dynamic situation which is difficult to visualize without a model.  This also allows for many more calculations to be performed and the ability to interpolate and extrapolate data.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Magnetic Force Model===&lt;br /&gt;
&lt;br /&gt;
[http://www.glowscript.org/#/user/griffinbonnett/folder/Public/program/vPython MagForceModel]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For Magnetic forces:&lt;br /&gt;
We are going to simulate the motion of a charged particle immersed in a magnetic&lt;br /&gt;
field. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Frame the problem in fundamental ideas or equations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is where you write down anything the problem gives you. &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Equations:&#039;&#039;&#039;           &#039;&#039;&#039;Constants:&#039;&#039;&#039;&lt;br /&gt;
 F = q·v x B          Charge of the particle(q)&lt;br /&gt;
 dp/dt = Fnet         Velocity vector of the particle(v)&lt;br /&gt;
 p = ma               Magnetic field vector(B)          &lt;br /&gt;
 v= p/m               Mass of particle (m) &lt;br /&gt;
                      &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Due to our understanding of how magnetic fields cause a force on a moving charged particle, we can craft a general outline for the calculations. We can also find expected values and predict the behavior of the model. We will need to calculate the magnetic force and use it to update its position and velocity.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step2: Conceptualize the problem&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
We want to show the particle moving through space relative to time. Since computer programs only comprehend discreet values, we will want to move through time in discreet increments. We do this by using a while loop because while t is less than a certain value the loop will continue to be updated. We can put the limit of t to anytime so long as the rate is high enough to run the program reasonably fast and t is large enough to run the full length simulation. We will set the initial time to t = 0 and add a constant delta t to each iteration in the while loop.  Each new iteration of time will allow us to update the position and velocity vector. To update these values, conservation of momentum is used to relate the magnetic and the position and velocity.&lt;br /&gt;
&lt;br /&gt;
    &#039;&#039;&#039;Initialize the variables&#039;&#039;&#039;&lt;br /&gt;
     B0 = vector(0,1,0)&lt;br /&gt;
     particle = sphere(pos=(0, 0,.3), radius = .01, color = color.red)&lt;br /&gt;
     velocity = vector(2e6,1e6,0)&lt;br /&gt;
     q = 1.6e-19&lt;br /&gt;
     m = 1.7e-27&lt;br /&gt;
     trail = curve(color=particle.color)&lt;br /&gt;
     deltat = 1e-11&lt;br /&gt;
     t = 0 &lt;br /&gt;
&lt;br /&gt;
    &#039;&#039;&#039;The Loop&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
    while t &amp;lt; 1.3e-3:&lt;br /&gt;
    rate(10000)&lt;br /&gt;
    ## Insert the necessary steps inside the loop below to update the particle&#039;s position and velocity&lt;br /&gt;
    ## a)calculate the needed quantities to update the particle&#039;s velocity&lt;br /&gt;
    p = m * velocity&lt;br /&gt;
    Fnet= q * cross(velocity, B0)&lt;br /&gt;
    p = p + Fnet*deltat&lt;br /&gt;
    &lt;br /&gt;
    ## b)update the particle&#039;s velocity&lt;br /&gt;
    velocity = p/m&lt;br /&gt;
   &lt;br /&gt;
    ## c) Update the position of the proton (movies in a straight line initially).&lt;br /&gt;
    particle.pos = particle.pos + velocity*deltat&lt;br /&gt;
    trail.append(pos=particle.pos)&lt;br /&gt;
    t=t+deltat&lt;br /&gt;
&lt;br /&gt;
The method used to simulate magnetic force would work equally well to simulate the electric force.&lt;br /&gt;
&lt;br /&gt;
==Connectedness==&lt;br /&gt;
#How is this topic connected to something that you are interested in?&lt;br /&gt;
I am fascinated by 3D modeling. I have begun to teach my self Blender recently. Even though there is less programming involved, Blender incorporates much of the fundamentals that VPython uses such as vector math and using iterations of functions to achieve the desired output.  &lt;br /&gt;
&lt;br /&gt;
#How is it connected to your major?&lt;br /&gt;
VPython, electric and magnetic forces, and simulations are fundamental to my major as an electrical engineer. I can use Vpython to simulate how certain electrical components that would interact in an magnetic field. I could also use it to simulate the electromagnetic interactions at the quantum level. &lt;br /&gt;
&lt;br /&gt;
#Is there an interesting industrial application?&lt;br /&gt;
Industry routinely uses VPython to simulate optimal efficiency. This can give a baseline to test the efficiency of industrial machines or processes. These simulations can help identify ways to improve the bottom line of a company. The simulations can also save money in research and development by replacing some more costly experimental testing.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
The cT programming language was created in 1985 by researchers at Carnegie Mellon University. Even though it had other applications, it was mainly a 2d graphics learning tool.&lt;br /&gt;
&lt;br /&gt;
As David Scherer began college in 1998, he was being taught physics using cT. Scherer saw some flaws in cT and set out to improve it. By 2000,Scherer, with help from David Andersen, Ruth Chabay, Ari Heitner, Ian Peters, and Bruce Sherwood,  created Visual, a module for Python that was easier than cT and could render in 3D. The name VPython comes from merging Visual and Python together. The development of VPython made cT obsolete and Vpython took its place.&lt;br /&gt;
&lt;br /&gt;
The most recent change in the VPython is the developers announced in 2016 that they will no longer be producing the classic software. Instead, the will focus on implementing the programming language in Glowscript and Jupyter.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
Are there related topics or categories in this wiki resource for the curious reader to explore?  How does this topic fit into that context?&lt;br /&gt;
&lt;br /&gt;
===Further reading===&lt;br /&gt;
&lt;br /&gt;
Books, Articles or other print media on this topic&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
&lt;br /&gt;
Internet resources on this topic&lt;br /&gt;
&lt;br /&gt;
http://www.glowscript.org/#/user/GlowScriptDemos/folder/matterandinteractions/program/MatterAndInteractions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://trinket.io/welcome&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://www.revolvy.com/main/index.php?s=VPython&amp;amp;item_type=topic&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
This section contains the the references you used while writing this page&lt;br /&gt;
&lt;br /&gt;
[[Category:Which Category did you place this in?]]&lt;br /&gt;
&lt;br /&gt;
https://www.revolvy.com/main/index.php?s=VPython&amp;amp;item_type=topic&lt;br /&gt;
&lt;br /&gt;
http://www.glowscript.org/#/user/griffinbonnett/folder/Public/program/vPython&lt;/div&gt;</summary>
		<author><name>Yjia67</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Modelling_of_Electric_and_Magnetic_Forces&amp;diff=30405</id>
		<title>VPython Modelling of Electric and Magnetic Forces</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Modelling_of_Electric_and_Magnetic_Forces&amp;diff=30405"/>
		<updated>2017-11-29T22:50:27Z</updated>

		<summary type="html">&lt;p&gt;Yjia67: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;VPython Modeling of Electric and Magnetic Forces&lt;br /&gt;
&lt;br /&gt;
Claimed By: Griffin Bonnett Spring 2017 4/09/2017&lt;br /&gt;
&lt;br /&gt;
Claimed by: Yunqing Jia Fall 2017 &lt;br /&gt;
&lt;br /&gt;
==The Main Idea==&lt;br /&gt;
Vpython is a programming language designed to model physics properties in a 3D simulation. It consists of the Python programming languange with an additional module called Visual that creates the environment to generate models in 3D. This section we will be focused on modeling the electric and magnetic forces in Vpython. &lt;br /&gt;
&lt;br /&gt;
===A Mathematical Model===&lt;br /&gt;
&lt;br /&gt;
When you are starting a new Vpython program, first write out all the equations and constants you might need, and then define the variables in their appropriate forms such as vectors, arrows, or spheres.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Electric Force&#039;&#039;&lt;br /&gt;
::&amp;lt;math&amp;gt;\vec F={q}_{2}\times\vec{E}_{1} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::equations for electric fields(vec{E})&lt;br /&gt;
::[[File:equationsForElectricFields.PNG]]&lt;br /&gt;
::[http://www.physicsbook.gatech.edu/Electric_Force derivation]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Magnetic Force&#039;&#039;&lt;br /&gt;
::&amp;lt;math&amp;gt;{\vec{F} = q\vec{v}\times\vec{B}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::equations for magnetic fields(vec{B})&lt;br /&gt;
::[[File:equationsForMagneticFields.PNG]]&lt;br /&gt;
::[http://www.physicsbook.gatech.edu/Magnetic_Force derivation]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The equations are the mathematical basis for computational simulations. After defining constants and initializing variables in the initial state, you can now mathematically update the position, electric/magnetic field, electric/magnetic force in the next small time step. In order to show this at different times and/or locations, you can simply iterate the same process with the new values. Since it is an iterated process, VPython can only give us an approximate model. To display time-varying electric or magnetic field, one can decrease the time increment in each step to make the approximation more accurate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===A Computational Model===&lt;br /&gt;
 &lt;br /&gt;
This is when we begin to program using Vpython. A finished and working program will give us the ability to visualize the physics of magnetic and electric forces. Vpython can be used to model any number of other physical interactions as well such as springs and gravity. Running a simulation allows us to view concepts that would not be observable any other way especially on the same time scale. We are able to visibly observe magnetic and electric fields in a dynamic situation which is difficult to visualize without a model.  This also allows for many more calculations to be preformed and the ability to interpolate and extrapolate data.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Magnetic Force Model===&lt;br /&gt;
&lt;br /&gt;
[http://www.glowscript.org/#/user/griffinbonnett/folder/Public/program/vPython MagForceModel]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For Magnetic forces:&lt;br /&gt;
We are going to simulate the motion of a charged particle immersed in a magnetic&lt;br /&gt;
field. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Frame the problem in fundamental ideas or equations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is where you write down anything the problem gives you. &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Equations:&#039;&#039;&#039;           &#039;&#039;&#039;Constants:&#039;&#039;&#039;&lt;br /&gt;
 F = q·v x B          Charge of the particle(q)&lt;br /&gt;
 dp/dt = Fnet         Velocity vector of the particle(v)&lt;br /&gt;
 p = ma               Magnetic field vector(B)          &lt;br /&gt;
 v= p/m               Mass of particle (m) &lt;br /&gt;
                      &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Due to our understanding of how magnetic fields cause a force on a moving charged particle, we can craft a general outline for the calculations. We can also find expected values and predict the behavior of the model. We will need to calculate the magnetic force and use it to update its position and velocity.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step2: Conceptualize the problem&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
We want to show the particle moving through space relative to time. Since computer programs only comprehend discreet values, we will want to move through time in discreet increments. We do this by using a while loop because while t is less than a certain value the loop will continue to be updated. We can put the limit of t to anytime so long as the rate is high enough to run the program reasonably fast and t is large enough to run the full length simulation. We will set the initial time to t = 0 and add a constant delta t to each iteration in the while loop.  Each new iteration of time will allow us to update the position and velocity vector. To update these values, conservation of momentum is used to relate the magnetic and the position and velocity.&lt;br /&gt;
&lt;br /&gt;
    &#039;&#039;&#039;Initialize the variables&#039;&#039;&#039;&lt;br /&gt;
     B0 = vector(0,1,0)&lt;br /&gt;
     particle = sphere(pos=(0, 0,.3), radius = .01, color = color.red)&lt;br /&gt;
     velocity = vector(2e6,1e6,0)&lt;br /&gt;
     q = 1.6e-19&lt;br /&gt;
     m = 1.7e-27&lt;br /&gt;
     trail = curve(color=particle.color)&lt;br /&gt;
     deltat = 1e-11&lt;br /&gt;
     t = 0 &lt;br /&gt;
&lt;br /&gt;
    &#039;&#039;&#039;The Loop&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
    while t &amp;lt; 1.3e-3:&lt;br /&gt;
    rate(10000)&lt;br /&gt;
    ## Insert the necessary steps inside the loop below to update the particle&#039;s position and velocity&lt;br /&gt;
    ## a)calculate the needed quantities to update the particle&#039;s velocity&lt;br /&gt;
    p = m * velocity&lt;br /&gt;
    Fnet= q * cross(velocity, B0)&lt;br /&gt;
    p = p + Fnet*deltat&lt;br /&gt;
    &lt;br /&gt;
    ## b)update the particle&#039;s velocity&lt;br /&gt;
    velocity = p/m&lt;br /&gt;
   &lt;br /&gt;
    ## c) Update the position of the proton (movies in a straight line initially).&lt;br /&gt;
    particle.pos = particle.pos + velocity*deltat&lt;br /&gt;
    trail.append(pos=particle.pos)&lt;br /&gt;
    t=t+deltat&lt;br /&gt;
&lt;br /&gt;
The method used to simulate magnetic force would work equally well to simulate the electric force.&lt;br /&gt;
&lt;br /&gt;
==Connectedness==&lt;br /&gt;
#How is this topic connected to something that you are interested in?&lt;br /&gt;
I am fascinated by 3D modeling. I have begun to teach my self Blender recently. Even though there is less programming involved, Blender incorporates much of the fundamentals that VPython uses such as vector math and using iterations of functions to achieve the desired output.  &lt;br /&gt;
&lt;br /&gt;
#How is it connected to your major?&lt;br /&gt;
VPython, electric and magnetic forces, and simulations are fundamental to my major as an electrical engineer. I can use Vpython to simulate how certain electrical components that would interact in an magnetic field. I could also use it to simulate the electromagnetic interactions at the quantum level. &lt;br /&gt;
&lt;br /&gt;
#Is there an interesting industrial application?&lt;br /&gt;
Industry routinely uses VPython to simulate optimal efficiency. This can give a baseline to test the efficiency of industrial machines or processes. These simulations can help identify ways to improve the bottom line of a company. The simulations can also save money in research and development by replacing some more costly experimental testing.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
The cT programming language was created in 1985 by researchers at Carnegie Mellon University. Even though it had other applications, it was mainly a 2d graphics learning tool.&lt;br /&gt;
&lt;br /&gt;
As David Scherer began college in 1998, he was being taught physics using cT. Scherer saw some flaws in cT and set out to improve it. By 2000,Scherer, with help from David Andersen, Ruth Chabay, Ari Heitner, Ian Peters, and Bruce Sherwood,  created Visual, a module for Python that was easier than cT and could render in 3D. The name VPython comes from merging Visual and Python together. The development of VPython made cT obsolete and Vpython took its place.&lt;br /&gt;
&lt;br /&gt;
The most recent change in the VPython is the developers announced in 2016 that they will no longer be producing the classic software. Instead, the will focus on implementing the programming language in Glowscript and Jupyter.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
Are there related topics or categories in this wiki resource for the curious reader to explore?  How does this topic fit into that context?&lt;br /&gt;
&lt;br /&gt;
===Further reading===&lt;br /&gt;
&lt;br /&gt;
Books, Articles or other print media on this topic&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
&lt;br /&gt;
Internet resources on this topic&lt;br /&gt;
&lt;br /&gt;
http://www.glowscript.org/#/user/GlowScriptDemos/folder/matterandinteractions/program/MatterAndInteractions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://trinket.io/welcome&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://www.revolvy.com/main/index.php?s=VPython&amp;amp;item_type=topic&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
This section contains the the references you used while writing this page&lt;br /&gt;
&lt;br /&gt;
[[Category:Which Category did you place this in?]]&lt;br /&gt;
&lt;br /&gt;
https://www.revolvy.com/main/index.php?s=VPython&amp;amp;item_type=topic&lt;br /&gt;
&lt;br /&gt;
http://www.glowscript.org/#/user/griffinbonnett/folder/Public/program/vPython&lt;/div&gt;</summary>
		<author><name>Yjia67</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Modelling_of_Electric_and_Magnetic_Forces&amp;diff=30381</id>
		<title>VPython Modelling of Electric and Magnetic Forces</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Modelling_of_Electric_and_Magnetic_Forces&amp;diff=30381"/>
		<updated>2017-11-29T22:34:47Z</updated>

		<summary type="html">&lt;p&gt;Yjia67: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;VPython Modeling of Electric and Magnetic Forces&lt;br /&gt;
&lt;br /&gt;
Claimed By: Griffin Bonnett Spring 2017 4/09/2017&lt;br /&gt;
&lt;br /&gt;
Claimed by: Yunqing Jia Fall 2017 &lt;br /&gt;
&lt;br /&gt;
==The Main Idea==&lt;br /&gt;
Vpython is a programming language designed to model physics properties in a 3D simulation. It consists of the Python programming languange with an additional module called Visual that creates the environment to generate models in 3D. This section we will be focused on modeling the electric and magnetic forces in Vpython. &lt;br /&gt;
&lt;br /&gt;
===A Mathematical Model===&lt;br /&gt;
When starting a new Vpython program, first write out all the equations and constants you might need. Define the variables in their appropriate forms such as vectors, arrows, or spheres.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Electric Force&#039;&#039;&lt;br /&gt;
::&amp;lt;math&amp;gt;\vec F={q}_{2}\times\vec{E}_{1} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::[[File:equationsForElectricFields.PNG|thumb|equations for electric fields(vec{E})]]&lt;br /&gt;
::[http://www.physicsbook.gatech.edu/Electric_Force derivation]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Magnetic Force&#039;&#039;&lt;br /&gt;
::&amp;lt;math&amp;gt;{\vec{F} = q\vec{v}\times\vec{B}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::[[File:equationsForMagneticFields.PNG|thumb|equations for magnetic fields(vec{B})]]&lt;br /&gt;
::[http://www.physicsbook.gatech.edu/Magnetic_Force derivation]&lt;br /&gt;
&lt;br /&gt;
The equations above are the mathematical basis for the VPython code and simulations. &lt;br /&gt;
&lt;br /&gt;
===A Computational Model===&lt;br /&gt;
 &lt;br /&gt;
This is when we begin to program using Vpython. A finished and working program will give us the ability to visualize the physics of magnetic and electric forces. Vpython can be used to model any number of other physical interactions as well such as springs and gravity. Running a simulation allows us to view concepts that would not be observable any other way especially on the same time scale. We are able to visibly observe magnetic and electric fields in a dynamic situation which is difficult to visualize without a model.  This also allows for many more calculations to be preformed and the ability to interpolate and extrapolate data.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Magnetic Force Model===&lt;br /&gt;
&lt;br /&gt;
[http://www.glowscript.org/#/user/griffinbonnett/folder/Public/program/vPython MagForceModel]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For Magnetic forces:&lt;br /&gt;
We are going to simulate the motion of a charged particle immersed in a magnetic&lt;br /&gt;
field. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Frame the problem in fundamental ideas or equations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is where you write down anything the problem gives you. &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Equations:&#039;&#039;&#039;           &#039;&#039;&#039;Constants:&#039;&#039;&#039;&lt;br /&gt;
 F = q·v x B          Charge of the particle(q)&lt;br /&gt;
 dp/dt = Fnet         Velocity vector of the particle(v)&lt;br /&gt;
 p = ma               Magnetic field vector(B)          &lt;br /&gt;
 v= p/m               Mass of particle (m) &lt;br /&gt;
                      &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Due to our understanding of how magnetic fields cause a force on a moving charged particle, we can craft a general outline for the calculations. We can also find expected values and predict the behavior of the model. We will need to calculate the magnetic force and use it to update its position and velocity.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step2: Conceptualize the problem&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
We want to show the particle moving through space relative to time. Since computer programs only comprehend discreet values, we will want to move through time in discreet increments. We do this by using a while loop because while t is less than a certain value the loop will continue to be updated. We can put the limit of t to anytime so long as the rate is high enough to run the program reasonably fast and t is large enough to run the full length simulation. We will set the initial time to t = 0 and add a constant delta t to each iteration in the while loop.  Each new iteration of time will allow us to update the position and velocity vector. To update these values, conservation of momentum is used to relate the magnetic and the position and velocity.&lt;br /&gt;
&lt;br /&gt;
    &#039;&#039;&#039;Initialize the variables&#039;&#039;&#039;&lt;br /&gt;
     B0 = vector(0,1,0)&lt;br /&gt;
     particle = sphere(pos=(0, 0,.3), radius = .01, color = color.red)&lt;br /&gt;
     velocity = vector(2e6,1e6,0)&lt;br /&gt;
     q = 1.6e-19&lt;br /&gt;
     m = 1.7e-27&lt;br /&gt;
     trail = curve(color=particle.color)&lt;br /&gt;
     deltat = 1e-11&lt;br /&gt;
     t = 0 &lt;br /&gt;
&lt;br /&gt;
    &#039;&#039;&#039;The Loop&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
    while t &amp;lt; 1.3e-3:&lt;br /&gt;
    rate(10000)&lt;br /&gt;
    ## Insert the necessary steps inside the loop below to update the particle&#039;s position and velocity&lt;br /&gt;
    ## a)calculate the needed quantities to update the particle&#039;s velocity&lt;br /&gt;
    p = m * velocity&lt;br /&gt;
    Fnet= q * cross(velocity, B0)&lt;br /&gt;
    p = p + Fnet*deltat&lt;br /&gt;
    &lt;br /&gt;
    ## b)update the particle&#039;s velocity&lt;br /&gt;
    velocity = p/m&lt;br /&gt;
   &lt;br /&gt;
    ## c) Update the position of the proton (movies in a straight line initially).&lt;br /&gt;
    particle.pos = particle.pos + velocity*deltat&lt;br /&gt;
    trail.append(pos=particle.pos)&lt;br /&gt;
    t=t+deltat&lt;br /&gt;
&lt;br /&gt;
The method used to simulate magnetic force would work equally well to simulate the electric force.&lt;br /&gt;
&lt;br /&gt;
==Connectedness==&lt;br /&gt;
#How is this topic connected to something that you are interested in?&lt;br /&gt;
I am fascinated by 3D modeling. I have begun to teach my self Blender recently. Even though there is less programming involved, Blender incorporates much of the fundamentals that VPython uses such as vector math and using iterations of functions to achieve the desired output.  &lt;br /&gt;
&lt;br /&gt;
#How is it connected to your major?&lt;br /&gt;
VPython, electric and magnetic forces, and simulations are fundamental to my major as an electrical engineer. I can use Vpython to simulate how certain electrical components that would interact in an magnetic field. I could also use it to simulate the electromagnetic interactions at the quantum level. &lt;br /&gt;
&lt;br /&gt;
#Is there an interesting industrial application?&lt;br /&gt;
Industry routinely uses VPython to simulate optimal efficiency. This can give a baseline to test the efficiency of industrial machines or processes. These simulations can help identify ways to improve the bottom line of a company. The simulations can also save money in research and development by replacing some more costly experimental testing.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
The cT programming language was created in 1985 by researchers at Carnegie Mellon University. Even though it had other applications, it was mainly a 2d graphics learning tool.&lt;br /&gt;
&lt;br /&gt;
As David Scherer began college in 1998, he was being taught physics using cT. Scherer saw some flaws in cT and set out to improve it. By 2000,Scherer, with help from David Andersen, Ruth Chabay, Ari Heitner, Ian Peters, and Bruce Sherwood,  created Visual, a module for Python that was easier than cT and could render in 3D. The name VPython comes from merging Visual and Python together. The development of VPython made cT obsolete and Vpython took its place.&lt;br /&gt;
&lt;br /&gt;
The most recent change in the VPython is the developers announced in 2016 that they will no longer be producing the classic software. Instead, the will focus on implementing the programming language in Glowscript and Jupyter.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
Are there related topics or categories in this wiki resource for the curious reader to explore?  How does this topic fit into that context?&lt;br /&gt;
&lt;br /&gt;
===Further reading===&lt;br /&gt;
&lt;br /&gt;
Books, Articles or other print media on this topic&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
&lt;br /&gt;
Internet resources on this topic&lt;br /&gt;
&lt;br /&gt;
http://www.glowscript.org/#/user/GlowScriptDemos/folder/matterandinteractions/program/MatterAndInteractions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://trinket.io/welcome&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://www.revolvy.com/main/index.php?s=VPython&amp;amp;item_type=topic&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
This section contains the the references you used while writing this page&lt;br /&gt;
&lt;br /&gt;
[[Category:Which Category did you place this in?]]&lt;br /&gt;
&lt;br /&gt;
https://www.revolvy.com/main/index.php?s=VPython&amp;amp;item_type=topic&lt;br /&gt;
&lt;br /&gt;
http://www.glowscript.org/#/user/griffinbonnett/folder/Public/program/vPython&lt;/div&gt;</summary>
		<author><name>Yjia67</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=File:EquationsForElectricFields.PNG&amp;diff=30380</id>
		<title>File:EquationsForElectricFields.PNG</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=File:EquationsForElectricFields.PNG&amp;diff=30380"/>
		<updated>2017-11-29T22:34:42Z</updated>

		<summary type="html">&lt;p&gt;Yjia67: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Yjia67</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=File:EquationsForMagneticFields.PNG&amp;diff=30377</id>
		<title>File:EquationsForMagneticFields.PNG</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=File:EquationsForMagneticFields.PNG&amp;diff=30377"/>
		<updated>2017-11-29T22:32:30Z</updated>

		<summary type="html">&lt;p&gt;Yjia67: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Yjia67</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Modelling_of_Electric_and_Magnetic_Forces&amp;diff=30362</id>
		<title>VPython Modelling of Electric and Magnetic Forces</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Modelling_of_Electric_and_Magnetic_Forces&amp;diff=30362"/>
		<updated>2017-11-29T22:21:07Z</updated>

		<summary type="html">&lt;p&gt;Yjia67: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;VPython Modeling of Electric and Magnetic Forces&lt;br /&gt;
&lt;br /&gt;
Claimed By: Griffin Bonnett Spring 2017 4/09/2017&lt;br /&gt;
&lt;br /&gt;
Claimed by: Yunqing Jia Fall 2017 &lt;br /&gt;
&lt;br /&gt;
==The Main Idea==&lt;br /&gt;
Vpython is a programming language designed to model physics properties in a 3D simulation. It consists of the Python programming languange with an additional module called Visual that creates the environment to generate models in 3D. This section we will be focused on modeling the electric and magnetic forces in Vpython. &lt;br /&gt;
&lt;br /&gt;
===A Mathematical Model===&lt;br /&gt;
When starting a new Vpython program, first write out all the equations and constants you might need. Define the variables in their appropriate forms such as vectors, arrows, or spheres.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Electric Force&#039;&#039;&lt;br /&gt;
::&amp;lt;math&amp;gt;\vec F={q}_{2}\times\vec{E}_{1} &amp;lt;/math&amp;gt;&lt;br /&gt;
::[http://www.physicsbook.gatech.edu/Electric_Force derivation]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Magnetic Force&#039;&#039;&lt;br /&gt;
::&amp;lt;math&amp;gt;{\vec{F} = q\vec{v}\times\vec{B}}&amp;lt;/math&amp;gt; &lt;br /&gt;
::[http://www.physicsbook.gatech.edu/Magnetic_Force derivation]&lt;br /&gt;
&lt;br /&gt;
===A Computational Model===&lt;br /&gt;
 &lt;br /&gt;
This is when we begin to program using Vpython. A finished and working program will give us the ability to visualize the physics of magnetic and electric forces. Vpython can be used to model any number of other physical interactions as well such as springs and gravity. Running a simulation allows us to view concepts that would not be observable any other way especially on the same time scale. We are able to visibly observe magnetic and electric fields in a dynamic situation which is difficult to visualize without a model.  This also allows for many more calculations to be preformed and the ability to interpolate and extrapolate data.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Magnetic Force Model===&lt;br /&gt;
&lt;br /&gt;
[http://www.glowscript.org/#/user/griffinbonnett/folder/Public/program/vPython MagForceModel]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For Magnetic forces:&lt;br /&gt;
We are going to simulate the motion of a charged particle immersed in a magnetic&lt;br /&gt;
field. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Frame the problem in fundamental ideas or equations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is where you write down anything the problem gives you. &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Equations:&#039;&#039;&#039;           &#039;&#039;&#039;Constants:&#039;&#039;&#039;&lt;br /&gt;
 F = q·v x B          Charge of the particle(q)&lt;br /&gt;
 dp/dt = Fnet         Velocity vector of the particle(v)&lt;br /&gt;
 p = ma               Magnetic field vector(B)          &lt;br /&gt;
 v= p/m               Mass of particle (m) &lt;br /&gt;
                      &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Due to our understanding of how magnetic fields cause a force on a moving charged particle, we can craft a general outline for the calculations. We can also find expected values and predict the behavior of the model. We will need to calculate the magnetic force and use it to update its position and velocity.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step2: Conceptualize the problem&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
We want to show the particle moving through space relative to time. Since computer programs only comprehend discreet values, we will want to move through time in discreet increments. We do this by using a while loop because while t is less than a certain value the loop will continue to be updated. We can put the limit of t to anytime so long as the rate is high enough to run the program reasonably fast and t is large enough to run the full length simulation. We will set the initial time to t = 0 and add a constant delta t to each iteration in the while loop.  Each new iteration of time will allow us to update the position and velocity vector. To update these values, conservation of momentum is used to relate the magnetic and the position and velocity.&lt;br /&gt;
&lt;br /&gt;
    &#039;&#039;&#039;Initialize the variables&#039;&#039;&#039;&lt;br /&gt;
     B0 = vector(0,1,0)&lt;br /&gt;
     particle = sphere(pos=(0, 0,.3), radius = .01, color = color.red)&lt;br /&gt;
     velocity = vector(2e6,1e6,0)&lt;br /&gt;
     q = 1.6e-19&lt;br /&gt;
     m = 1.7e-27&lt;br /&gt;
     trail = curve(color=particle.color)&lt;br /&gt;
     deltat = 1e-11&lt;br /&gt;
     t = 0 &lt;br /&gt;
&lt;br /&gt;
    &#039;&#039;&#039;The Loop&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
    while t &amp;lt; 1.3e-3:&lt;br /&gt;
    rate(10000)&lt;br /&gt;
    ## Insert the necessary steps inside the loop below to update the particle&#039;s position and velocity&lt;br /&gt;
    ## a)calculate the needed quantities to update the particle&#039;s velocity&lt;br /&gt;
    p = m * velocity&lt;br /&gt;
    Fnet= q * cross(velocity, B0)&lt;br /&gt;
    p = p + Fnet*deltat&lt;br /&gt;
    &lt;br /&gt;
    ## b)update the particle&#039;s velocity&lt;br /&gt;
    velocity = p/m&lt;br /&gt;
   &lt;br /&gt;
    ## c) Update the position of the proton (movies in a straight line initially).&lt;br /&gt;
    particle.pos = particle.pos + velocity*deltat&lt;br /&gt;
    trail.append(pos=particle.pos)&lt;br /&gt;
    t=t+deltat&lt;br /&gt;
&lt;br /&gt;
The method used to simulate magnetic force would work equally well to simulate the electric force.&lt;br /&gt;
&lt;br /&gt;
==Connectedness==&lt;br /&gt;
#How is this topic connected to something that you are interested in?&lt;br /&gt;
I am fascinated by 3D modeling. I have begun to teach my self Blender recently. Even though there is less programming involved, Blender incorporates much of the fundamentals that VPython uses such as vector math and using iterations of functions to achieve the desired output.  &lt;br /&gt;
&lt;br /&gt;
#How is it connected to your major?&lt;br /&gt;
VPython, electric and magnetic forces, and simulations are fundamental to my major as an electrical engineer. I can use Vpython to simulate how certain electrical components that would interact in an magnetic field. I could also use it to simulate the electromagnetic interactions at the quantum level. &lt;br /&gt;
&lt;br /&gt;
#Is there an interesting industrial application?&lt;br /&gt;
Industry routinely uses VPython to simulate optimal efficiency. This can give a baseline to test the efficiency of industrial machines or processes. These simulations can help identify ways to improve the bottom line of a company. The simulations can also save money in research and development by replacing some more costly experimental testing.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
The cT programming language was created in 1985 by researchers at Carnegie Mellon University. Even though it had other applications, it was mainly a 2d graphics learning tool.&lt;br /&gt;
&lt;br /&gt;
As David Scherer began college in 1998, he was being taught physics using cT. Scherer saw some flaws in cT and set out to improve it. By 2000,Scherer, with help from David Andersen, Ruth Chabay, Ari Heitner, Ian Peters, and Bruce Sherwood,  created Visual, a module for Python that was easier than cT and could render in 3D. The name VPython comes from merging Visual and Python together. The development of VPython made cT obsolete and Vpython took its place.&lt;br /&gt;
&lt;br /&gt;
The most recent change in the VPython is the developers announced in 2016 that they will no longer be producing the classic software. Instead, the will focus on implementing the programming language in Glowscript and Jupyter.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
Are there related topics or categories in this wiki resource for the curious reader to explore?  How does this topic fit into that context?&lt;br /&gt;
&lt;br /&gt;
===Further reading===&lt;br /&gt;
&lt;br /&gt;
Books, Articles or other print media on this topic&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
&lt;br /&gt;
Internet resources on this topic&lt;br /&gt;
&lt;br /&gt;
http://www.glowscript.org/#/user/GlowScriptDemos/folder/matterandinteractions/program/MatterAndInteractions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://trinket.io/welcome&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://www.revolvy.com/main/index.php?s=VPython&amp;amp;item_type=topic&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
This section contains the the references you used while writing this page&lt;br /&gt;
&lt;br /&gt;
[[Category:Which Category did you place this in?]]&lt;br /&gt;
&lt;br /&gt;
https://www.revolvy.com/main/index.php?s=VPython&amp;amp;item_type=topic&lt;br /&gt;
&lt;br /&gt;
http://www.glowscript.org/#/user/griffinbonnett/folder/Public/program/vPython&lt;/div&gt;</summary>
		<author><name>Yjia67</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Modelling_of_Electric_and_Magnetic_Forces&amp;diff=30361</id>
		<title>VPython Modelling of Electric and Magnetic Forces</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Modelling_of_Electric_and_Magnetic_Forces&amp;diff=30361"/>
		<updated>2017-11-29T22:20:52Z</updated>

		<summary type="html">&lt;p&gt;Yjia67: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;VPython Modeling of Electric and Magnetic Forces&lt;br /&gt;
&lt;br /&gt;
Claimed By: Griffin Bonnett Spring 2017 4/09/2017&lt;br /&gt;
&lt;br /&gt;
Claimed by: Yunqing Jia Fall 2017 &lt;br /&gt;
&lt;br /&gt;
==The Main Idea==&lt;br /&gt;
Vpython is a programming language designed to model physics properties in a 3D simulation. It consists of the Python programming languange with an additional module called Visual that creates the environment to generate models in 3D. This section we will be focused on modeling the electric and magnetic forces in Vpython. &lt;br /&gt;
&lt;br /&gt;
===A Mathematical Model===&lt;br /&gt;
When starting a new Vpython program, first write out all the equations and constants you might need. Define the variables in their appropriate forms such as vectors, arrows, or spheres.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Electric Force&#039;&#039;&lt;br /&gt;
::&amp;lt;math&amp;gt;\vec F={q}_{2}\vec{E}_{1} &amp;lt;/math&amp;gt;&lt;br /&gt;
::[http://www.physicsbook.gatech.edu/Electric_Force derivation]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Magnetic Force&#039;&#039;&lt;br /&gt;
::&amp;lt;math&amp;gt;{\vec{F} = q\vec{v}\times\vec{B}}&amp;lt;/math&amp;gt; &lt;br /&gt;
::[http://www.physicsbook.gatech.edu/Magnetic_Force derivation]&lt;br /&gt;
&lt;br /&gt;
===A Computational Model===&lt;br /&gt;
 &lt;br /&gt;
This is when we begin to program using Vpython. A finished and working program will give us the ability to visualize the physics of magnetic and electric forces. Vpython can be used to model any number of other physical interactions as well such as springs and gravity. Running a simulation allows us to view concepts that would not be observable any other way especially on the same time scale. We are able to visibly observe magnetic and electric fields in a dynamic situation which is difficult to visualize without a model.  This also allows for many more calculations to be preformed and the ability to interpolate and extrapolate data.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Magnetic Force Model===&lt;br /&gt;
&lt;br /&gt;
[http://www.glowscript.org/#/user/griffinbonnett/folder/Public/program/vPython MagForceModel]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For Magnetic forces:&lt;br /&gt;
We are going to simulate the motion of a charged particle immersed in a magnetic&lt;br /&gt;
field. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Frame the problem in fundamental ideas or equations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is where you write down anything the problem gives you. &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Equations:&#039;&#039;&#039;           &#039;&#039;&#039;Constants:&#039;&#039;&#039;&lt;br /&gt;
 F = q·v x B          Charge of the particle(q)&lt;br /&gt;
 dp/dt = Fnet         Velocity vector of the particle(v)&lt;br /&gt;
 p = ma               Magnetic field vector(B)          &lt;br /&gt;
 v= p/m               Mass of particle (m) &lt;br /&gt;
                      &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Due to our understanding of how magnetic fields cause a force on a moving charged particle, we can craft a general outline for the calculations. We can also find expected values and predict the behavior of the model. We will need to calculate the magnetic force and use it to update its position and velocity.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step2: Conceptualize the problem&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
We want to show the particle moving through space relative to time. Since computer programs only comprehend discreet values, we will want to move through time in discreet increments. We do this by using a while loop because while t is less than a certain value the loop will continue to be updated. We can put the limit of t to anytime so long as the rate is high enough to run the program reasonably fast and t is large enough to run the full length simulation. We will set the initial time to t = 0 and add a constant delta t to each iteration in the while loop.  Each new iteration of time will allow us to update the position and velocity vector. To update these values, conservation of momentum is used to relate the magnetic and the position and velocity.&lt;br /&gt;
&lt;br /&gt;
    &#039;&#039;&#039;Initialize the variables&#039;&#039;&#039;&lt;br /&gt;
     B0 = vector(0,1,0)&lt;br /&gt;
     particle = sphere(pos=(0, 0,.3), radius = .01, color = color.red)&lt;br /&gt;
     velocity = vector(2e6,1e6,0)&lt;br /&gt;
     q = 1.6e-19&lt;br /&gt;
     m = 1.7e-27&lt;br /&gt;
     trail = curve(color=particle.color)&lt;br /&gt;
     deltat = 1e-11&lt;br /&gt;
     t = 0 &lt;br /&gt;
&lt;br /&gt;
    &#039;&#039;&#039;The Loop&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
    while t &amp;lt; 1.3e-3:&lt;br /&gt;
    rate(10000)&lt;br /&gt;
    ## Insert the necessary steps inside the loop below to update the particle&#039;s position and velocity&lt;br /&gt;
    ## a)calculate the needed quantities to update the particle&#039;s velocity&lt;br /&gt;
    p = m * velocity&lt;br /&gt;
    Fnet= q * cross(velocity, B0)&lt;br /&gt;
    p = p + Fnet*deltat&lt;br /&gt;
    &lt;br /&gt;
    ## b)update the particle&#039;s velocity&lt;br /&gt;
    velocity = p/m&lt;br /&gt;
   &lt;br /&gt;
    ## c) Update the position of the proton (movies in a straight line initially).&lt;br /&gt;
    particle.pos = particle.pos + velocity*deltat&lt;br /&gt;
    trail.append(pos=particle.pos)&lt;br /&gt;
    t=t+deltat&lt;br /&gt;
&lt;br /&gt;
The method used to simulate magnetic force would work equally well to simulate the electric force.&lt;br /&gt;
&lt;br /&gt;
==Connectedness==&lt;br /&gt;
#How is this topic connected to something that you are interested in?&lt;br /&gt;
I am fascinated by 3D modeling. I have begun to teach my self Blender recently. Even though there is less programming involved, Blender incorporates much of the fundamentals that VPython uses such as vector math and using iterations of functions to achieve the desired output.  &lt;br /&gt;
&lt;br /&gt;
#How is it connected to your major?&lt;br /&gt;
VPython, electric and magnetic forces, and simulations are fundamental to my major as an electrical engineer. I can use Vpython to simulate how certain electrical components that would interact in an magnetic field. I could also use it to simulate the electromagnetic interactions at the quantum level. &lt;br /&gt;
&lt;br /&gt;
#Is there an interesting industrial application?&lt;br /&gt;
Industry routinely uses VPython to simulate optimal efficiency. This can give a baseline to test the efficiency of industrial machines or processes. These simulations can help identify ways to improve the bottom line of a company. The simulations can also save money in research and development by replacing some more costly experimental testing.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
The cT programming language was created in 1985 by researchers at Carnegie Mellon University. Even though it had other applications, it was mainly a 2d graphics learning tool.&lt;br /&gt;
&lt;br /&gt;
As David Scherer began college in 1998, he was being taught physics using cT. Scherer saw some flaws in cT and set out to improve it. By 2000,Scherer, with help from David Andersen, Ruth Chabay, Ari Heitner, Ian Peters, and Bruce Sherwood,  created Visual, a module for Python that was easier than cT and could render in 3D. The name VPython comes from merging Visual and Python together. The development of VPython made cT obsolete and Vpython took its place.&lt;br /&gt;
&lt;br /&gt;
The most recent change in the VPython is the developers announced in 2016 that they will no longer be producing the classic software. Instead, the will focus on implementing the programming language in Glowscript and Jupyter.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
Are there related topics or categories in this wiki resource for the curious reader to explore?  How does this topic fit into that context?&lt;br /&gt;
&lt;br /&gt;
===Further reading===&lt;br /&gt;
&lt;br /&gt;
Books, Articles or other print media on this topic&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
&lt;br /&gt;
Internet resources on this topic&lt;br /&gt;
&lt;br /&gt;
http://www.glowscript.org/#/user/GlowScriptDemos/folder/matterandinteractions/program/MatterAndInteractions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://trinket.io/welcome&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://www.revolvy.com/main/index.php?s=VPython&amp;amp;item_type=topic&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
This section contains the the references you used while writing this page&lt;br /&gt;
&lt;br /&gt;
[[Category:Which Category did you place this in?]]&lt;br /&gt;
&lt;br /&gt;
https://www.revolvy.com/main/index.php?s=VPython&amp;amp;item_type=topic&lt;br /&gt;
&lt;br /&gt;
http://www.glowscript.org/#/user/griffinbonnett/folder/Public/program/vPython&lt;/div&gt;</summary>
		<author><name>Yjia67</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Modelling_of_Electric_and_Magnetic_Forces&amp;diff=30360</id>
		<title>VPython Modelling of Electric and Magnetic Forces</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Modelling_of_Electric_and_Magnetic_Forces&amp;diff=30360"/>
		<updated>2017-11-29T22:19:48Z</updated>

		<summary type="html">&lt;p&gt;Yjia67: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;VPython Modeling of Electric and Magnetic Forces&lt;br /&gt;
&lt;br /&gt;
Claimed By: Griffin Bonnett Spring 2017 4/09/2017&lt;br /&gt;
&lt;br /&gt;
Claimed by: Yunqing Jia Fall 2017 &lt;br /&gt;
&lt;br /&gt;
==The Main Idea==&lt;br /&gt;
Vpython is a programming language designed to model physics properties in a 3D simulation. It consists of the Python programming languange with an additional module called Visual that creates the environment to generate models in 3D. This section we will be focused on modeling the electric and magnetic forces in Vpython. &lt;br /&gt;
&lt;br /&gt;
===A Mathematical Model===&lt;br /&gt;
When starting a new Vpython program, first write out all the equations and constants you might need. Define the variables in their appropriate forms such as vectors, arrows, or spheres.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Electric Force&#039;&#039;&lt;br /&gt;
::&amp;lt;math&amp;gt;|\vec F|=\frac{1}{4 \pi \epsilon_0 } \frac{|{q}_{1}{q}_{2}|}{r^2}=|{q}_{2}|\frac{1}{4 \pi \epsilon_0 } \frac{|{q}_{1}|}{r^2}=|{q}_{2}||\vec{E}_{1}| &amp;lt;/math&amp;gt;&lt;br /&gt;
::[http://www.physicsbook.gatech.edu/Electric_Force derivation]&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Magnetic Force&#039;&#039;&lt;br /&gt;
::&amp;lt;math&amp;gt;{\vec{F} = q\vec{v}\times\vec{B}}&amp;lt;/math&amp;gt; &lt;br /&gt;
::[http://www.physicsbook.gatech.edu/Magnetic_Force derivation]&lt;br /&gt;
&lt;br /&gt;
===A Computational Model===&lt;br /&gt;
 &lt;br /&gt;
This is when we begin to program using Vpython. A finished and working program will give us the ability to visualize the physics of magnetic and electric forces. Vpython can be used to model any number of other physical interactions as well such as springs and gravity. Running a simulation allows us to view concepts that would not be observable any other way especially on the same time scale. We are able to visibly observe magnetic and electric fields in a dynamic situation which is difficult to visualize without a model.  This also allows for many more calculations to be preformed and the ability to interpolate and extrapolate data.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Magnetic Force Model===&lt;br /&gt;
&lt;br /&gt;
[http://www.glowscript.org/#/user/griffinbonnett/folder/Public/program/vPython MagForceModel]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For Magnetic forces:&lt;br /&gt;
We are going to simulate the motion of a charged particle immersed in a magnetic&lt;br /&gt;
field. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Frame the problem in fundamental ideas or equations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is where you write down anything the problem gives you. &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Equations:&#039;&#039;&#039;           &#039;&#039;&#039;Constants:&#039;&#039;&#039;&lt;br /&gt;
 F = q·v x B          Charge of the particle(q)&lt;br /&gt;
 dp/dt = Fnet         Velocity vector of the particle(v)&lt;br /&gt;
 p = ma               Magnetic field vector(B)          &lt;br /&gt;
 v= p/m               Mass of particle (m) &lt;br /&gt;
                      &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Due to our understanding of how magnetic fields cause a force on a moving charged particle, we can craft a general outline for the calculations. We can also find expected values and predict the behavior of the model. We will need to calculate the magnetic force and use it to update its position and velocity.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step2: Conceptualize the problem&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
We want to show the particle moving through space relative to time. Since computer programs only comprehend discreet values, we will want to move through time in discreet increments. We do this by using a while loop because while t is less than a certain value the loop will continue to be updated. We can put the limit of t to anytime so long as the rate is high enough to run the program reasonably fast and t is large enough to run the full length simulation. We will set the initial time to t = 0 and add a constant delta t to each iteration in the while loop.  Each new iteration of time will allow us to update the position and velocity vector. To update these values, conservation of momentum is used to relate the magnetic and the position and velocity.&lt;br /&gt;
&lt;br /&gt;
    &#039;&#039;&#039;Initialize the variables&#039;&#039;&#039;&lt;br /&gt;
     B0 = vector(0,1,0)&lt;br /&gt;
     particle = sphere(pos=(0, 0,.3), radius = .01, color = color.red)&lt;br /&gt;
     velocity = vector(2e6,1e6,0)&lt;br /&gt;
     q = 1.6e-19&lt;br /&gt;
     m = 1.7e-27&lt;br /&gt;
     trail = curve(color=particle.color)&lt;br /&gt;
     deltat = 1e-11&lt;br /&gt;
     t = 0 &lt;br /&gt;
&lt;br /&gt;
    &#039;&#039;&#039;The Loop&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
    while t &amp;lt; 1.3e-3:&lt;br /&gt;
    rate(10000)&lt;br /&gt;
    ## Insert the necessary steps inside the loop below to update the particle&#039;s position and velocity&lt;br /&gt;
    ## a)calculate the needed quantities to update the particle&#039;s velocity&lt;br /&gt;
    p = m * velocity&lt;br /&gt;
    Fnet= q * cross(velocity, B0)&lt;br /&gt;
    p = p + Fnet*deltat&lt;br /&gt;
    &lt;br /&gt;
    ## b)update the particle&#039;s velocity&lt;br /&gt;
    velocity = p/m&lt;br /&gt;
   &lt;br /&gt;
    ## c) Update the position of the proton (movies in a straight line initially).&lt;br /&gt;
    particle.pos = particle.pos + velocity*deltat&lt;br /&gt;
    trail.append(pos=particle.pos)&lt;br /&gt;
    t=t+deltat&lt;br /&gt;
&lt;br /&gt;
The method used to simulate magnetic force would work equally well to simulate the electric force.&lt;br /&gt;
&lt;br /&gt;
==Connectedness==&lt;br /&gt;
#How is this topic connected to something that you are interested in?&lt;br /&gt;
I am fascinated by 3D modeling. I have begun to teach my self Blender recently. Even though there is less programming involved, Blender incorporates much of the fundamentals that VPython uses such as vector math and using iterations of functions to achieve the desired output.  &lt;br /&gt;
&lt;br /&gt;
#How is it connected to your major?&lt;br /&gt;
VPython, electric and magnetic forces, and simulations are fundamental to my major as an electrical engineer. I can use Vpython to simulate how certain electrical components that would interact in an magnetic field. I could also use it to simulate the electromagnetic interactions at the quantum level. &lt;br /&gt;
&lt;br /&gt;
#Is there an interesting industrial application?&lt;br /&gt;
Industry routinely uses VPython to simulate optimal efficiency. This can give a baseline to test the efficiency of industrial machines or processes. These simulations can help identify ways to improve the bottom line of a company. The simulations can also save money in research and development by replacing some more costly experimental testing.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
The cT programming language was created in 1985 by researchers at Carnegie Mellon University. Even though it had other applications, it was mainly a 2d graphics learning tool.&lt;br /&gt;
&lt;br /&gt;
As David Scherer began college in 1998, he was being taught physics using cT. Scherer saw some flaws in cT and set out to improve it. By 2000,Scherer, with help from David Andersen, Ruth Chabay, Ari Heitner, Ian Peters, and Bruce Sherwood,  created Visual, a module for Python that was easier than cT and could render in 3D. The name VPython comes from merging Visual and Python together. The development of VPython made cT obsolete and Vpython took its place.&lt;br /&gt;
&lt;br /&gt;
The most recent change in the VPython is the developers announced in 2016 that they will no longer be producing the classic software. Instead, the will focus on implementing the programming language in Glowscript and Jupyter.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
Are there related topics or categories in this wiki resource for the curious reader to explore?  How does this topic fit into that context?&lt;br /&gt;
&lt;br /&gt;
===Further reading===&lt;br /&gt;
&lt;br /&gt;
Books, Articles or other print media on this topic&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
&lt;br /&gt;
Internet resources on this topic&lt;br /&gt;
&lt;br /&gt;
http://www.glowscript.org/#/user/GlowScriptDemos/folder/matterandinteractions/program/MatterAndInteractions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://trinket.io/welcome&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://www.revolvy.com/main/index.php?s=VPython&amp;amp;item_type=topic&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
This section contains the the references you used while writing this page&lt;br /&gt;
&lt;br /&gt;
[[Category:Which Category did you place this in?]]&lt;br /&gt;
&lt;br /&gt;
https://www.revolvy.com/main/index.php?s=VPython&amp;amp;item_type=topic&lt;br /&gt;
&lt;br /&gt;
http://www.glowscript.org/#/user/griffinbonnett/folder/Public/program/vPython&lt;/div&gt;</summary>
		<author><name>Yjia67</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Modelling_of_Electric_and_Magnetic_Forces&amp;diff=30355</id>
		<title>VPython Modelling of Electric and Magnetic Forces</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Modelling_of_Electric_and_Magnetic_Forces&amp;diff=30355"/>
		<updated>2017-11-29T22:13:40Z</updated>

		<summary type="html">&lt;p&gt;Yjia67: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;VPython Modeling of Electric and Magnetic Forces&lt;br /&gt;
&lt;br /&gt;
Claimed By: Griffin Bonnett Spring 2017 4/09/2017&lt;br /&gt;
&lt;br /&gt;
Claimed by: Yunqing Jia Fall 2017 &lt;br /&gt;
&lt;br /&gt;
==The Main Idea==&lt;br /&gt;
Vpython is a programming language designed to model physics properties in a 3D simulation. It consists of the Python programming languange with an additional module called Visual that creates the environment to generate models in 3D. This section we will be focused on modeling the electric and magnetic forces in Vpython. &lt;br /&gt;
&lt;br /&gt;
===A Mathematical Model===&lt;br /&gt;
When starting a new Vpython program, first write out all the equations and constants you might need. Define the variables in their appropriate forms such as vectors, arrows, or spheres.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===A Computational Model===&lt;br /&gt;
 &lt;br /&gt;
This is when we begin to program using Vpython. A finished and working program will give us the ability to visualize the physics of magnetic and electric forces. Vpython can be used to model any number of other physical interactions as well such as springs and gravity. Running a simulation allows us to view concepts that would not be observable any other way especially on the same time scale. We are able to visibly observe magnetic and electric fields in a dynamic situation which is difficult to visualize without a model.  This also allows for many more calculations to be preformed and the ability to interpolate and extrapolate data.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Magnetic Force Model===&lt;br /&gt;
&lt;br /&gt;
[http://www.glowscript.org/#/user/griffinbonnett/folder/Public/program/vPython MagForceModel]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For Magnetic forces:&lt;br /&gt;
We are going to simulate the motion of a charged particle immersed in a magnetic&lt;br /&gt;
field. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Frame the problem in fundamental ideas or equations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is where you write down anything the problem gives you. &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Equations:&#039;&#039;&#039;           &#039;&#039;&#039;Constants:&#039;&#039;&#039;&lt;br /&gt;
 F = q·v x B          Charge of the particle(q)&lt;br /&gt;
 dp/dt = Fnet         Velocity vector of the particle(v)&lt;br /&gt;
 p = ma               Magnetic field vector(B)          &lt;br /&gt;
 v= p/m               Mass of particle (m) &lt;br /&gt;
                      &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Due to our understanding of how magnetic fields cause a force on a moving charged particle, we can craft a general outline for the calculations. We can also find expected values and predict the behavior of the model. We will need to calculate the magnetic force and use it to update its position and velocity.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step2: Conceptualize the problem&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
We want to show the particle moving through space relative to time. Since computer programs only comprehend discreet values, we will want to move through time in discreet increments. We do this by using a while loop because while t is less than a certain value the loop will continue to be updated. We can put the limit of t to anytime so long as the rate is high enough to run the program reasonably fast and t is large enough to run the full length simulation. We will set the initial time to t = 0 and add a constant delta t to each iteration in the while loop.  Each new iteration of time will allow us to update the position and velocity vector. To update these values, conservation of momentum is used to relate the magnetic and the position and velocity.&lt;br /&gt;
&lt;br /&gt;
    &#039;&#039;&#039;Initialize the variables&#039;&#039;&#039;&lt;br /&gt;
     B0 = vector(0,1,0)&lt;br /&gt;
     particle = sphere(pos=(0, 0,.3), radius = .01, color = color.red)&lt;br /&gt;
     velocity = vector(2e6,1e6,0)&lt;br /&gt;
     q = 1.6e-19&lt;br /&gt;
     m = 1.7e-27&lt;br /&gt;
     trail = curve(color=particle.color)&lt;br /&gt;
     deltat = 1e-11&lt;br /&gt;
     t = 0 &lt;br /&gt;
&lt;br /&gt;
    &#039;&#039;&#039;The Loop&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
    while t &amp;lt; 1.3e-3:&lt;br /&gt;
    rate(10000)&lt;br /&gt;
    ## Insert the necessary steps inside the loop below to update the particle&#039;s position and velocity&lt;br /&gt;
    ## a)calculate the needed quantities to update the particle&#039;s velocity&lt;br /&gt;
    p = m * velocity&lt;br /&gt;
    Fnet= q * cross(velocity, B0)&lt;br /&gt;
    p = p + Fnet*deltat&lt;br /&gt;
    &lt;br /&gt;
    ## b)update the particle&#039;s velocity&lt;br /&gt;
    velocity = p/m&lt;br /&gt;
   &lt;br /&gt;
    ## c) Update the position of the proton (movies in a straight line initially).&lt;br /&gt;
    particle.pos = particle.pos + velocity*deltat&lt;br /&gt;
    trail.append(pos=particle.pos)&lt;br /&gt;
    t=t+deltat&lt;br /&gt;
&lt;br /&gt;
The method used to simulate magnetic force would work equally well to simulate the electric force.&lt;br /&gt;
&lt;br /&gt;
==Connectedness==&lt;br /&gt;
#How is this topic connected to something that you are interested in?&lt;br /&gt;
I am fascinated by 3D modeling. I have begun to teach my self Blender recently. Even though there is less programming involved, Blender incorporates much of the fundamentals that VPython uses such as vector math and using iterations of functions to achieve the desired output.  &lt;br /&gt;
&lt;br /&gt;
#How is it connected to your major?&lt;br /&gt;
VPython, electric and magnetic forces, and simulations are fundamental to my major as an electrical engineer. I can use Vpython to simulate how certain electrical components that would interact in an magnetic field. I could also use it to simulate the electromagnetic interactions at the quantum level. &lt;br /&gt;
&lt;br /&gt;
#Is there an interesting industrial application?&lt;br /&gt;
Industry routinely uses VPython to simulate optimal efficiency. This can give a baseline to test the efficiency of industrial machines or processes. These simulations can help identify ways to improve the bottom line of a company. The simulations can also save money in research and development by replacing some more costly experimental testing.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
The cT programming language was created in 1985 by researchers at Carnegie Mellon University. Even though it had other applications, it was mainly a 2d graphics learning tool.&lt;br /&gt;
&lt;br /&gt;
As David Scherer began college in 1998, he was being taught physics using cT. Scherer saw some flaws in cT and set out to improve it. By 2000,Scherer, with help from David Andersen, Ruth Chabay, Ari Heitner, Ian Peters, and Bruce Sherwood,  created Visual, a module for Python that was easier than cT and could render in 3D. The name VPython comes from merging Visual and Python together. The development of VPython made cT obsolete and Vpython took its place.&lt;br /&gt;
&lt;br /&gt;
The most recent change in the VPython is the developers announced in 2016 that they will no longer be producing the classic software. Instead, the will focus on implementing the programming language in Glowscript and Jupyter.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
Are there related topics or categories in this wiki resource for the curious reader to explore?  How does this topic fit into that context?&lt;br /&gt;
&lt;br /&gt;
===Further reading===&lt;br /&gt;
&lt;br /&gt;
Books, Articles or other print media on this topic&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
&lt;br /&gt;
Internet resources on this topic&lt;br /&gt;
&lt;br /&gt;
http://www.glowscript.org/#/user/GlowScriptDemos/folder/matterandinteractions/program/MatterAndInteractions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://trinket.io/welcome&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://www.revolvy.com/main/index.php?s=VPython&amp;amp;item_type=topic&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
This section contains the the references you used while writing this page&lt;br /&gt;
&lt;br /&gt;
[[Category:Which Category did you place this in?]]&lt;br /&gt;
&lt;br /&gt;
https://www.revolvy.com/main/index.php?s=VPython&amp;amp;item_type=topic&lt;br /&gt;
&lt;br /&gt;
http://www.glowscript.org/#/user/griffinbonnett/folder/Public/program/vPython&lt;/div&gt;</summary>
		<author><name>Yjia67</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Modelling_of_Electric_and_Magnetic_Forces&amp;diff=30353</id>
		<title>VPython Modelling of Electric and Magnetic Forces</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Modelling_of_Electric_and_Magnetic_Forces&amp;diff=30353"/>
		<updated>2017-11-29T22:07:08Z</updated>

		<summary type="html">&lt;p&gt;Yjia67: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;VPython Modeling of Electric and Magnetic Forces&lt;br /&gt;
&lt;br /&gt;
Claimed By: Griffin Bonnett Spring 2017 4/09/2017&lt;br /&gt;
&lt;br /&gt;
Claimed by: Yunqing Jia Fall 2017 &lt;br /&gt;
&lt;br /&gt;
==The Main Idea==&lt;br /&gt;
Vpython is a programming language designed to model physics properties in a 3D simulation. It consists of the Python programming languange with an additional module called Visual that creates the environment to generate models in 3D. This section we will be focused on modeling the electric and magnetic forces in Vpython. &lt;br /&gt;
&lt;br /&gt;
===A Mathematical Model===&lt;br /&gt;
When you start a new Vpython program, you should first write out all the equations and constants you might need.You should also define any variables you use in their appropriate forms such as vectors, arrows, or spheres. Then, you should get a rough outline of what values need to be calculated and how the constants and equations can be best applied for the calculations.&lt;br /&gt;
&lt;br /&gt;
===A Computational Model===&lt;br /&gt;
 &lt;br /&gt;
This is when we begin to program using Vpython. A finished and working program will give us the ability to visualize the physics of magnetic and electric forces. Vpython can be used to model any number of other physical interactions as well such as springs and gravity. Running a simulation allows us to view concepts that would not be observable any other way especially on the same time scale. We are able to visibly observe magnetic and electric fields in a dynamic situation which is difficult to visualize without a model.  This also allows for many more calculations to be preformed and the ability to interpolate and extrapolate data.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Magnetic Force Model===&lt;br /&gt;
&lt;br /&gt;
[http://www.glowscript.org/#/user/griffinbonnett/folder/Public/program/vPython MagForceModel]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For Magnetic forces:&lt;br /&gt;
We are going to simulate the motion of a charged particle immersed in a magnetic&lt;br /&gt;
field. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Frame the problem in fundamental ideas or equations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is where you write down anything the problem gives you. &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Equations:&#039;&#039;&#039;           &#039;&#039;&#039;Constants:&#039;&#039;&#039;&lt;br /&gt;
 F = q·v x B          Charge of the particle(q)&lt;br /&gt;
 dp/dt = Fnet         Velocity vector of the particle(v)&lt;br /&gt;
 p = ma               Magnetic field vector(B)          &lt;br /&gt;
 v= p/m               Mass of particle (m) &lt;br /&gt;
                      &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Due to our understanding of how magnetic fields cause a force on a moving charged particle, we can craft a general outline for the calculations. We can also find expected values and predict the behavior of the model. We will need to calculate the magnetic force and use it to update its position and velocity.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step2: Conceptualize the problem&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
We want to show the particle moving through space relative to time. Since computer programs only comprehend discreet values, we will want to move through time in discreet increments. We do this by using a while loop because while t is less than a certain value the loop will continue to be updated. We can put the limit of t to anytime so long as the rate is high enough to run the program reasonably fast and t is large enough to run the full length simulation. We will set the initial time to t = 0 and add a constant delta t to each iteration in the while loop.  Each new iteration of time will allow us to update the position and velocity vector. To update these values, conservation of momentum is used to relate the magnetic and the position and velocity.&lt;br /&gt;
&lt;br /&gt;
    &#039;&#039;&#039;Initialize the variables&#039;&#039;&#039;&lt;br /&gt;
     B0 = vector(0,1,0)&lt;br /&gt;
     particle = sphere(pos=(0, 0,.3), radius = .01, color = color.red)&lt;br /&gt;
     velocity = vector(2e6,1e6,0)&lt;br /&gt;
     q = 1.6e-19&lt;br /&gt;
     m = 1.7e-27&lt;br /&gt;
     trail = curve(color=particle.color)&lt;br /&gt;
     deltat = 1e-11&lt;br /&gt;
     t = 0 &lt;br /&gt;
&lt;br /&gt;
    &#039;&#039;&#039;The Loop&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
    while t &amp;lt; 1.3e-3:&lt;br /&gt;
    rate(10000)&lt;br /&gt;
    ## Insert the necessary steps inside the loop below to update the particle&#039;s position and velocity&lt;br /&gt;
    ## a)calculate the needed quantities to update the particle&#039;s velocity&lt;br /&gt;
    p = m * velocity&lt;br /&gt;
    Fnet= q * cross(velocity, B0)&lt;br /&gt;
    p = p + Fnet*deltat&lt;br /&gt;
    &lt;br /&gt;
    ## b)update the particle&#039;s velocity&lt;br /&gt;
    velocity = p/m&lt;br /&gt;
   &lt;br /&gt;
    ## c) Update the position of the proton (movies in a straight line initially).&lt;br /&gt;
    particle.pos = particle.pos + velocity*deltat&lt;br /&gt;
    trail.append(pos=particle.pos)&lt;br /&gt;
    t=t+deltat&lt;br /&gt;
&lt;br /&gt;
The method used to simulate magnetic force would work equally well to simulate the electric force.&lt;br /&gt;
&lt;br /&gt;
==Connectedness==&lt;br /&gt;
#How is this topic connected to something that you are interested in?&lt;br /&gt;
I am fascinated by 3D modeling. I have begun to teach my self Blender recently. Even though there is less programming involved, Blender incorporates much of the fundamentals that VPython uses such as vector math and using iterations of functions to achieve the desired output.  &lt;br /&gt;
&lt;br /&gt;
#How is it connected to your major?&lt;br /&gt;
VPython, electric and magnetic forces, and simulations are fundamental to my major as an electrical engineer. I can use Vpython to simulate how certain electrical components that would interact in an magnetic field. I could also use it to simulate the electromagnetic interactions at the quantum level. &lt;br /&gt;
&lt;br /&gt;
#Is there an interesting industrial application?&lt;br /&gt;
Industry routinely uses VPython to simulate optimal efficiency. This can give a baseline to test the efficiency of industrial machines or processes. These simulations can help identify ways to improve the bottom line of a company. The simulations can also save money in research and development by replacing some more costly experimental testing.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
The cT programming language was created in 1985 by researchers at Carnegie Mellon University. Even though it had other applications, it was mainly a 2d graphics learning tool.&lt;br /&gt;
&lt;br /&gt;
As David Scherer began college in 1998, he was being taught physics using cT. Scherer saw some flaws in cT and set out to improve it. By 2000,Scherer, with help from David Andersen, Ruth Chabay, Ari Heitner, Ian Peters, and Bruce Sherwood,  created Visual, a module for Python that was easier than cT and could render in 3D. The name VPython comes from merging Visual and Python together. The development of VPython made cT obsolete and Vpython took its place.&lt;br /&gt;
&lt;br /&gt;
The most recent change in the VPython is the developers announced in 2016 that they will no longer be producing the classic software. Instead, the will focus on implementing the programming language in Glowscript and Jupyter.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
Are there related topics or categories in this wiki resource for the curious reader to explore?  How does this topic fit into that context?&lt;br /&gt;
&lt;br /&gt;
===Further reading===&lt;br /&gt;
&lt;br /&gt;
Books, Articles or other print media on this topic&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
&lt;br /&gt;
Internet resources on this topic&lt;br /&gt;
&lt;br /&gt;
http://www.glowscript.org/#/user/GlowScriptDemos/folder/matterandinteractions/program/MatterAndInteractions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://trinket.io/welcome&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://www.revolvy.com/main/index.php?s=VPython&amp;amp;item_type=topic&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
This section contains the the references you used while writing this page&lt;br /&gt;
&lt;br /&gt;
[[Category:Which Category did you place this in?]]&lt;br /&gt;
&lt;br /&gt;
https://www.revolvy.com/main/index.php?s=VPython&amp;amp;item_type=topic&lt;br /&gt;
&lt;br /&gt;
http://www.glowscript.org/#/user/griffinbonnett/folder/Public/program/vPython&lt;/div&gt;</summary>
		<author><name>Yjia67</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Modelling_of_Electric_and_Magnetic_Forces&amp;diff=30352</id>
		<title>VPython Modelling of Electric and Magnetic Forces</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Modelling_of_Electric_and_Magnetic_Forces&amp;diff=30352"/>
		<updated>2017-11-29T22:06:46Z</updated>

		<summary type="html">&lt;p&gt;Yjia67: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;VPython Modeling of Electric and Magnetic Forces&lt;br /&gt;
Claimed By: Griffin Bonnett Spring 2017 4/09/2017&lt;br /&gt;
Claimed by: Yunqing Jia Fall 2017 &lt;br /&gt;
&lt;br /&gt;
==The Main Idea==&lt;br /&gt;
Vpython is a programming language designed to model physics properties in a 3D simulation. It consists of the Python programming languange with an additional module called Visual that creates the environment to generate models in 3D. This section we will be focused on modeling the electric and magnetic forces in Vpython. &lt;br /&gt;
&lt;br /&gt;
===A Mathematical Model===&lt;br /&gt;
When you start a new Vpython program, you should first write out all the equations and constants you might need.You should also define any variables you use in their appropriate forms such as vectors, arrows, or spheres. Then, you should get a rough outline of what values need to be calculated and how the constants and equations can be best applied for the calculations.&lt;br /&gt;
&lt;br /&gt;
===A Computational Model===&lt;br /&gt;
 &lt;br /&gt;
This is when we begin to program using Vpython. A finished and working program will give us the ability to visualize the physics of magnetic and electric forces. Vpython can be used to model any number of other physical interactions as well such as springs and gravity. Running a simulation allows us to view concepts that would not be observable any other way especially on the same time scale. We are able to visibly observe magnetic and electric fields in a dynamic situation which is difficult to visualize without a model.  This also allows for many more calculations to be preformed and the ability to interpolate and extrapolate data.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Magnetic Force Model===&lt;br /&gt;
&lt;br /&gt;
[http://www.glowscript.org/#/user/griffinbonnett/folder/Public/program/vPython MagForceModel]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For Magnetic forces:&lt;br /&gt;
We are going to simulate the motion of a charged particle immersed in a magnetic&lt;br /&gt;
field. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Frame the problem in fundamental ideas or equations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is where you write down anything the problem gives you. &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Equations:&#039;&#039;&#039;           &#039;&#039;&#039;Constants:&#039;&#039;&#039;&lt;br /&gt;
 F = q·v x B          Charge of the particle(q)&lt;br /&gt;
 dp/dt = Fnet         Velocity vector of the particle(v)&lt;br /&gt;
 p = ma               Magnetic field vector(B)          &lt;br /&gt;
 v= p/m               Mass of particle (m) &lt;br /&gt;
                      &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Due to our understanding of how magnetic fields cause a force on a moving charged particle, we can craft a general outline for the calculations. We can also find expected values and predict the behavior of the model. We will need to calculate the magnetic force and use it to update its position and velocity.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step2: Conceptualize the problem&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
We want to show the particle moving through space relative to time. Since computer programs only comprehend discreet values, we will want to move through time in discreet increments. We do this by using a while loop because while t is less than a certain value the loop will continue to be updated. We can put the limit of t to anytime so long as the rate is high enough to run the program reasonably fast and t is large enough to run the full length simulation. We will set the initial time to t = 0 and add a constant delta t to each iteration in the while loop.  Each new iteration of time will allow us to update the position and velocity vector. To update these values, conservation of momentum is used to relate the magnetic and the position and velocity.&lt;br /&gt;
&lt;br /&gt;
    &#039;&#039;&#039;Initialize the variables&#039;&#039;&#039;&lt;br /&gt;
     B0 = vector(0,1,0)&lt;br /&gt;
     particle = sphere(pos=(0, 0,.3), radius = .01, color = color.red)&lt;br /&gt;
     velocity = vector(2e6,1e6,0)&lt;br /&gt;
     q = 1.6e-19&lt;br /&gt;
     m = 1.7e-27&lt;br /&gt;
     trail = curve(color=particle.color)&lt;br /&gt;
     deltat = 1e-11&lt;br /&gt;
     t = 0 &lt;br /&gt;
&lt;br /&gt;
    &#039;&#039;&#039;The Loop&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
    while t &amp;lt; 1.3e-3:&lt;br /&gt;
    rate(10000)&lt;br /&gt;
    ## Insert the necessary steps inside the loop below to update the particle&#039;s position and velocity&lt;br /&gt;
    ## a)calculate the needed quantities to update the particle&#039;s velocity&lt;br /&gt;
    p = m * velocity&lt;br /&gt;
    Fnet= q * cross(velocity, B0)&lt;br /&gt;
    p = p + Fnet*deltat&lt;br /&gt;
    &lt;br /&gt;
    ## b)update the particle&#039;s velocity&lt;br /&gt;
    velocity = p/m&lt;br /&gt;
   &lt;br /&gt;
    ## c) Update the position of the proton (movies in a straight line initially).&lt;br /&gt;
    particle.pos = particle.pos + velocity*deltat&lt;br /&gt;
    trail.append(pos=particle.pos)&lt;br /&gt;
    t=t+deltat&lt;br /&gt;
&lt;br /&gt;
The method used to simulate magnetic force would work equally well to simulate the electric force.&lt;br /&gt;
&lt;br /&gt;
==Connectedness==&lt;br /&gt;
#How is this topic connected to something that you are interested in?&lt;br /&gt;
I am fascinated by 3D modeling. I have begun to teach my self Blender recently. Even though there is less programming involved, Blender incorporates much of the fundamentals that VPython uses such as vector math and using iterations of functions to achieve the desired output.  &lt;br /&gt;
&lt;br /&gt;
#How is it connected to your major?&lt;br /&gt;
VPython, electric and magnetic forces, and simulations are fundamental to my major as an electrical engineer. I can use Vpython to simulate how certain electrical components that would interact in an magnetic field. I could also use it to simulate the electromagnetic interactions at the quantum level. &lt;br /&gt;
&lt;br /&gt;
#Is there an interesting industrial application?&lt;br /&gt;
Industry routinely uses VPython to simulate optimal efficiency. This can give a baseline to test the efficiency of industrial machines or processes. These simulations can help identify ways to improve the bottom line of a company. The simulations can also save money in research and development by replacing some more costly experimental testing.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
The cT programming language was created in 1985 by researchers at Carnegie Mellon University. Even though it had other applications, it was mainly a 2d graphics learning tool.&lt;br /&gt;
&lt;br /&gt;
As David Scherer began college in 1998, he was being taught physics using cT. Scherer saw some flaws in cT and set out to improve it. By 2000,Scherer, with help from David Andersen, Ruth Chabay, Ari Heitner, Ian Peters, and Bruce Sherwood,  created Visual, a module for Python that was easier than cT and could render in 3D. The name VPython comes from merging Visual and Python together. The development of VPython made cT obsolete and Vpython took its place.&lt;br /&gt;
&lt;br /&gt;
The most recent change in the VPython is the developers announced in 2016 that they will no longer be producing the classic software. Instead, the will focus on implementing the programming language in Glowscript and Jupyter.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
Are there related topics or categories in this wiki resource for the curious reader to explore?  How does this topic fit into that context?&lt;br /&gt;
&lt;br /&gt;
===Further reading===&lt;br /&gt;
&lt;br /&gt;
Books, Articles or other print media on this topic&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
&lt;br /&gt;
Internet resources on this topic&lt;br /&gt;
&lt;br /&gt;
http://www.glowscript.org/#/user/GlowScriptDemos/folder/matterandinteractions/program/MatterAndInteractions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://trinket.io/welcome&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://www.revolvy.com/main/index.php?s=VPython&amp;amp;item_type=topic&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
This section contains the the references you used while writing this page&lt;br /&gt;
&lt;br /&gt;
[[Category:Which Category did you place this in?]]&lt;br /&gt;
&lt;br /&gt;
https://www.revolvy.com/main/index.php?s=VPython&amp;amp;item_type=topic&lt;br /&gt;
&lt;br /&gt;
http://www.glowscript.org/#/user/griffinbonnett/folder/Public/program/vPython&lt;/div&gt;</summary>
		<author><name>Yjia67</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=Work_Done_By_A_Nonconstant_Force&amp;diff=28950</id>
		<title>Work Done By A Nonconstant Force</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=Work_Done_By_A_Nonconstant_Force&amp;diff=28950"/>
		<updated>2017-04-10T03:17:59Z</updated>

		<summary type="html">&lt;p&gt;Yjia67: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Claimed by Yunqing Jia (Spring 2017)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This page explains the significance and fundamental calculations of work done by non-constant forces. In addition, it provides multiple worked examples and analytical models will help readers develop a more thorough understanding.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The Main Idea==&lt;br /&gt;
&lt;br /&gt;
[https://www.youtube.com/watch?v=RJgf4kvov9g]&lt;br /&gt;
[[https://www.youtube.com/watch?v=RJgf4kvov9g]]&lt;br /&gt;
Work done by constant force of magnitude &#039;F&#039; on a point that moves a displacement &#039;d&#039; in the directional of the force is the product: W=F*d. The SI unit for work is the joule (J) which is equivalent to newton meter. Force is a relationship of the product of mass*acceleration of the object, while displace is a result of the change in final and starting position. It is important to note that no matter how large or small the magnitude of the force is, no work is done if there is no displacement. The formula W=F*d only holds true when a constant force is applied to the system. &lt;br /&gt;
&lt;br /&gt;
When will we have to deal with non-constant forces? Why can&#039;t we just use the average force to make predictions? &lt;br /&gt;
&lt;br /&gt;
Well, two common examples of non-constant forces are gravity and springs. Both forces depend on the position of the object and change constantly while the object is moving. For example, if we tried to calculate the Earth&#039;s orbital path around the sun using only the force and momentum from a single data point, the Earth would be moving away from the sun rather than circling around it, and humans would not have made it this far. If we tried to predict the behavior of a spring-mass system with a constant force, the spring would be either compressing or stretching forever instead of osillating between the two states. Therefore, we need a method to calculate the work done by non-constant forces in order to make preditions about the system. &lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:YJIA Iteration.jpg|thumb|Iterative Prediction of Non-Constant Force Motion]]&lt;br /&gt;
&lt;br /&gt;
[[Iterative Prediction of Spring-Mass System|Iterative calculations]] are used in order to calculate non-constant forces and predict an object&#039;s motion. Given initial and final states of a system under non-constant force, small displacement intervals should be used to calculate the object&#039;s trajectory. As mentioned in [[Work|previous sections]], the total amount of work done on a system equals the sum of works done by all individual forces, therefore, the total amount of work done can be calculated by the summation of the force on an object multiplied by the change in position in small increments. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;{{W}_{total} = {W}_{1} + {W}_{2} + {W}_{3} + ... + {W}_{n} = \overrightarrow{F}_{1}\bullet\overrightarrow{dr}_{1} + \overrightarrow{F}_{2}\bullet\overrightarrow{dr}_{2} + \overrightarrow{F}_{3}\bullet\overrightarrow{dr}_{3} + ... + \overrightarrow{F}_{n}\bullet\overrightarrow{dr}_{n}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;{{W}_{total} = \sum\overrightarrow{F}\bullet\Delta\overrightarrow{r}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, this process is very repetitive and the calculation gets unnecessarily tedious. If we make the displacement intervals infinitesimally small, we are essentially taking the integral of force with respect to displacement, or finding the area under the curve of force by displacement.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;{{W}_{total} = \int\limits_{i}^{f}\overrightarrow{F}\bullet\overrightarrow{dr}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Computational Model===&lt;br /&gt;
&lt;br /&gt;
[[File:Spring-Mass Motion along an axis.jpg|thumb|Spring-Mass Motion along an axis]]&lt;br /&gt;
[&amp;lt;https://trinket.io/glowscript/49f7c0f35f&amp;gt; Model of an Oscilating Spring]&lt;br /&gt;
&lt;br /&gt;
This model shows both the total work and the work done by a spring on a ball attached to a vertical spring. The work done by the spring oscillates because the work is negative when the ball is moving away from the resting state and is positive when the ball moves towards it.&lt;br /&gt;
&lt;br /&gt;
Because gravity causes the ball’s minimum position to be further from the spring’s resting length than its maximum position could be, the work is more negative when the ball approaches its minimum height.&lt;br /&gt;
&lt;br /&gt;
The code works by using small time steps of 0.01 seconds and finding the work done in each time step. Work is the summation of all of the work done in each time step, so another step makes sure the value for work is cumulative.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Modeling Non-Constant Forces in VPython====&lt;br /&gt;
&lt;br /&gt;
[[File:Spring-Mass Motion in a 2-D plane.jpg|thumb|Spring-Mass Motion in a 2-D plane]]&lt;br /&gt;
As shown in this trinket model, [https://trinket.io/glowscript/c26c4c2637 Planer Motion of a Spring-Mass System], computational models can also be used in predicting non-constant forces in multiple directions. &lt;br /&gt;
&lt;br /&gt;
 #intialize conditions&lt;br /&gt;
 #calculation loop&lt;br /&gt;
   #calculate/update force at every time step&lt;br /&gt;
     L = ball.pos - spring.pos&lt;br /&gt;
     Lhat = norm(L)&lt;br /&gt;
     s = mag(L) - L0&lt;br /&gt;
     Fspring = -(ks * s) * Lhat&lt;br /&gt;
   #apply momentum principle&lt;br /&gt;
     ball.p = ball.p + (Fspring + Fgravity) * deltat&lt;br /&gt;
  #update positions&lt;br /&gt;
  #update time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
 A box is pushed to the East, 5 meters by a force of 40 N, then it is pushed to the north 7 meters by a force of 60 N. Calculate the work done on the box.&lt;br /&gt;
&lt;br /&gt;
￼￼￼&amp;lt;math&amp;gt; W = \sum\overrightarrow{F}\bullet\Delta\overrightarrow{r} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
￼￼￼&amp;lt;math&amp;gt; W = 40N \bullet\ 5m + 60N \bullet\ 7m &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
￼￼￼&amp;lt;math&amp;gt; W = 40N \bullet\ 5m + 60N \bullet\ 7m &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
￼￼￼&amp;lt;math&amp;gt; W = 620 J &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
 We know that the formula for force is &amp;lt;math&amp;gt; F=ks &amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt; s &amp;lt;/math&amp;gt; is the distance the spring is stretched. If we integrate this with respect to &amp;lt;math&amp;gt; s &amp;lt;/math&amp;gt;, we find that &amp;lt;math&amp;gt; W=.5ks^2 &amp;lt;/math&amp;gt; is the formula for work.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; W=\int\limits_{i}^{f}\overrightarrow{k}\bullet\overrightarrow{ds} = .5ks^2 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Say that we want to find the work done by a horizontal spring with spring constant k=100 N/m as it moves an object 15 cm. Using the formula W=.5ks2 that we derived from F=ks, we can calculate that the work done by the spring is 1.125 J.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; W=\int\limits_{0}^{15}100\bullet\overrightarrow{ds}=.5ks^2=.5(100)(0.15^2)=1.125 J &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 3===&lt;br /&gt;
 The earth does work on an asteroid approaching from an initial distance r. How much work is done on the asteroid by gravity before it hits the earth’s surface?&lt;br /&gt;
&lt;br /&gt;
First, we must recall the formula for gravitational force.&lt;br /&gt;
&lt;br /&gt;
Because &amp;lt;math&amp;gt; G &amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt; M &amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt; m &amp;lt;/math&amp;gt; are constants, we can remove them from the integral. We also know that the integral of &amp;lt;math&amp;gt; -1\over r^2 &amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt; 1\over r &amp;lt;/math&amp;gt;. We then must calculate the integral of &amp;lt;math&amp;gt; –GMm\over r^2 &amp;lt;/math&amp;gt; from the initial radius of the asteroid, &amp;lt;math&amp;gt; R &amp;lt;/math&amp;gt;, to the radius of the earth, &amp;lt;math&amp;gt; r &amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; W=-GMm\bullet\int\limits_{R}^{r}{-1\over r^2}\bullet dr &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; W=-GMm\bullet({1\over r}-{1\over R}) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our answer will be positive because the forces done by the earth on the asteroid and the direction of the asteroid&#039;s displacement are the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Connectedness==&lt;br /&gt;
I am most interested in the types of physics problems that accurately model real world situations. Some forces, like gravity near the surface of the earth and some machine-applied forces, are constant. However, most forces in the real world are not. &lt;br /&gt;
&lt;br /&gt;
Because of this, calculating work for non-constant forces is essential to mechanical engineering. For example, when calculating work done by an engine over a distance, the force applied by the engine can vary depending on factors such as user controls.&lt;br /&gt;
&lt;br /&gt;
On an industrial level, the work needed to fill empty tanks depends on the weight of the liquid, which varies as the tanks fill and empty. Energy conversion in hydroelectric dams depends on the work done by water against turbines, which depends on the flow of water. Windmills work in the same way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Gaspard-Gustave de Coriolis, famous for discoveries such as the Coriolis effect, is credited with naming the term “work” to define force applied over a distance. Later physicists combined this concept with Newtonian calculus to find work for non-constant forces. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Further Reading&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Work]]&lt;br /&gt;
&lt;br /&gt;
[[Iterative Prediction of Spring-Mass System]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;External Links&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/watch?v=jTkknXVjBl4&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/watch?v=9Be81qfgBVc&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[http://www.britannica.com/biography/Gustave-Gaspard-Coriolis]&lt;br /&gt;
[http://www.math.northwestern.edu]&lt;br /&gt;
&lt;br /&gt;
[[Category:Energy]]&lt;br /&gt;
&lt;br /&gt;
Created by Justin Vuong&lt;br /&gt;
&lt;br /&gt;
Edited by Chris Mickas&lt;br /&gt;
&lt;br /&gt;
Edited by Yunqing Jia&lt;/div&gt;</summary>
		<author><name>Yjia67</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=Work_Done_By_A_Nonconstant_Force&amp;diff=28917</id>
		<title>Work Done By A Nonconstant Force</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=Work_Done_By_A_Nonconstant_Force&amp;diff=28917"/>
		<updated>2017-04-10T03:08:46Z</updated>

		<summary type="html">&lt;p&gt;Yjia67: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Claimed by Yunqing Jia (Spring 2017)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This page explains the significance and fundamental calculations of work done by non-constant forces. In addition, it provides multiple worked examples and analytical models will help readers develop a more thorough understanding.&lt;br /&gt;
&lt;br /&gt;
==The Main Idea==&lt;br /&gt;
&lt;br /&gt;
[https://www.youtube.com/watch?v=RJgf4kvov9g]&lt;br /&gt;
[[https://www.youtube.com/watch?v=RJgf4kvov9g]]&lt;br /&gt;
Work done by constant force of magnitude &#039;F&#039; on a point that moves a displacement &#039;d&#039; in the directional of the force is the product: W=F*d. The SI unit for work is the joule (J) which is equivalent to newton meter. Force is a relationship of the product of mass*acceleration of the object, while displace is a result of the change in final and starting position. It is important to note that no matter how large or small the magnitude of the force is, no work is done if there is no displacement. The formula W=F*d only holds true when a constant force is applied to the system. &lt;br /&gt;
&lt;br /&gt;
When will we have to deal with non-constant forces? Why can&#039;t we just use the average force to make predictions? &lt;br /&gt;
&lt;br /&gt;
Well, two common examples of non-constant forces are gravity and springs. Both forces depend on the position of the object and change constantly while the object is moving. For example, if we tried to calculate the Earth&#039;s orbital path around the sun using only the force and momentum from a single data point, the Earth would be moving away from the sun rather than circling around it, and humans would not have made it this far. If we tried to predict the behavior of a spring-mass system with a constant force, the spring would be either compressing or stretching forever instead of osillating between the two states. Therefore, we need a method to calculate the work done by non-constant forces in order to make preditions about the system. &lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:YJIA Iteration.jpg|thumb|Iterative Prediction of Non-Constant Force Motion]]&lt;br /&gt;
&lt;br /&gt;
[[Iterative Prediction of Spring-Mass System|Iterative calculations]] are used in order to calculate non-constant forces and predict an object&#039;s motion. Given initial and final states of a system under non-constant force, small displacement intervals should be used to calculate the object&#039;s trajectory. As mentioned in [[Work|previous sections]], the total amount of work done on a system equals the sum of works done by all individual forces, therefore, the total amount of work done can be calculated by the summation of the force on an object multiplied by the change in position in small increments. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;{{W}_{total} = {W}_{1} + {W}_{2} + {W}_{3} + ... + {W}_{n} = \overrightarrow{F}_{1}\bullet\overrightarrow{dr}_{1} + \overrightarrow{F}_{2}\bullet\overrightarrow{dr}_{2} + \overrightarrow{F}_{3}\bullet\overrightarrow{dr}_{3} + ... + \overrightarrow{F}_{n}\bullet\overrightarrow{dr}_{n}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;{{W}_{total} = \sum\overrightarrow{F}\bullet\Delta\overrightarrow{r}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, this process is very repetitive and the calculation gets unnecessarily tedious. If we make the displacement intervals infinitesimally small, we are essentially taking the integral of force with respect to displacement, or finding the area under the curve of force by displacement.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;{{W}_{total} = \int\limits_{i}^{f}\overrightarrow{F}\bullet\overrightarrow{dr}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Computational Model===&lt;br /&gt;
&lt;br /&gt;
[[File:Spring-Mass Motion along an axis.jpg|thumb|Spring-Mass Motion along an axis]]&lt;br /&gt;
[&amp;lt;https://trinket.io/glowscript/49f7c0f35f&amp;gt; Model of an Oscilating Spring]&lt;br /&gt;
&lt;br /&gt;
This model shows both the total work and the work done by a spring on a ball attached to a vertical spring. The work done by the spring oscillates because the work is negative when the ball is moving away from the resting state and is positive when the ball moves towards it.&lt;br /&gt;
&lt;br /&gt;
Because gravity causes the ball’s minimum position to be further from the spring’s resting length than its maximum position could be, the work is more negative when the ball approaches its minimum height.&lt;br /&gt;
&lt;br /&gt;
The code works by using small time steps of 0.01 seconds and finding the work done in each time step. Work is the summation of all of the work done in each time step, so another step makes sure the value for work is cumulative.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Modeling Non-Constant Forces in VPython====&lt;br /&gt;
&lt;br /&gt;
[[File:Spring-Mass Motion in a 2-D plane.jpg|thumb|Spring-Mass Motion in a 2-D plane]]&lt;br /&gt;
As shown in this trinket model, [https://trinket.io/glowscript/c26c4c2637 Planer Motion of a Spring-Mass System], computational models can also be used in predicting non-constant forces in multiple directions. &lt;br /&gt;
&lt;br /&gt;
 #intialize conditions&lt;br /&gt;
 #calculation loop&lt;br /&gt;
   #calculate/update force at every time step&lt;br /&gt;
     L = ball.pos - spring.pos&lt;br /&gt;
     Lhat = norm(L)&lt;br /&gt;
     s = mag(L) - L0&lt;br /&gt;
     Fspring = -(ks * s) * Lhat&lt;br /&gt;
   #apply momentum principle&lt;br /&gt;
     ball.p = ball.p + (Fspring + Fgravity) * deltat&lt;br /&gt;
  #update positions&lt;br /&gt;
  #update time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
 A box is pushed to the East, 5 meters by a force of 40 N, then it is pushed to the north 7 meters by a force of 60 N. Calculate the work done on the box.&lt;br /&gt;
&lt;br /&gt;
￼￼￼&amp;lt;math&amp;gt; W = \sum\overrightarrow{F}\bullet\Delta\overrightarrow{r} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
￼￼￼&amp;lt;math&amp;gt; W = 40N \bullet\ 5m + 60N \bullet\ 7m &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
￼￼￼&amp;lt;math&amp;gt; W = 40N \bullet\ 5m + 60N \bullet\ 7m &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
￼￼￼&amp;lt;math&amp;gt; W = 620 J &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
 We know that the formula for force is &amp;lt;math&amp;gt; F=ks &amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt; s &amp;lt;/math&amp;gt; is the distance the spring is stretched. If we integrate this with respect to &amp;lt;math&amp;gt; s &amp;lt;/math&amp;gt;, we find that &amp;lt;math&amp;gt; W=.5ks^2 &amp;lt;/math&amp;gt; is the formula for work.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; W=\int\limits_{i}^{f}\overrightarrow{k}\bullet\overrightarrow{ds} = .5ks^2 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Say that we want to find the work done by a horizontal spring with spring constant k=100 N/m as it moves an object 15 cm. Using the formula W=.5ks2 that we derived from F=ks, we can calculate that the work done by the spring is 1.125 J.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; W=\int\limits_{0}^{15}100\bullet\overrightarrow{ds}=.5ks^2=.5(100)(0.15^2)=1.125 J &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 3===&lt;br /&gt;
 The earth does work on an asteroid approaching from an initial distance r. How much work is done on the asteroid by gravity before it hits the earth’s surface?&lt;br /&gt;
&lt;br /&gt;
First, we must recall the formula for gravitational force.&lt;br /&gt;
&lt;br /&gt;
Because &amp;lt;math&amp;gt; G &amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt; M &amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt; m &amp;lt;/math&amp;gt; are constants, we can remove them from the integral. We also know that the integral of &amp;lt;math&amp;gt; -1\over r^2 &amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt; 1\over r &amp;lt;/math&amp;gt;. We then must calculate the integral of &amp;lt;math&amp;gt; –GMm\over r^2 &amp;lt;/math&amp;gt; from the initial radius of the asteroid, &amp;lt;math&amp;gt; R &amp;lt;/math&amp;gt;, to the radius of the earth, &amp;lt;math&amp;gt; r &amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; W=-GMm\bullet\int\limits_{R}^{r}{-1\over r^2}\bullet dr &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; W=-GMm\bullet({1\over r}-{1\over R}) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our answer will be positive because the force done by the earth on the asteroid and the direction of the asteroid&#039;s displacement are the same.&lt;br /&gt;
&lt;br /&gt;
==Connectedness==&lt;br /&gt;
I am most interested in the types of physics problems that accurately model real world situations. Some forces, like gravity near the surface of the earth and some machine-applied forces, are constant. However, most forces in the real world are not. &lt;br /&gt;
&lt;br /&gt;
Because of this, calculating work for non-constant forces is essential to mechanical engineering. For example, when calculating work done by an engine over a distance, the force applied by the engine can vary depending on factors such as user controls.&lt;br /&gt;
&lt;br /&gt;
On an industrial level, the work needed to fill and empty tanks depends on the weight of the liquid, which varies as the tanks fill and empty. Energy conversion in hydroelectric dams depends on the work done by water against turbines, which depends on the flow of water. Windmills work in the same way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Gaspard-Gustave de Coriolis, famous for discoveries such as the Coriolis effect, is credited with naming the term “work” to define force applied over a distance. Later physicists combined this concept with Newtonian calculus to find work for non-constant forces.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Further Reading&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Work]]&lt;br /&gt;
&lt;br /&gt;
[[Iterative Prediction of Spring-Mass System]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;External Links&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/watch?v=jTkknXVjBl4&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/watch?v=9Be81qfgBVc&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[http://www.britannica.com/biography/Gustave-Gaspard-Coriolis]&lt;br /&gt;
[http://www.math.northwestern.edu]&lt;br /&gt;
&lt;br /&gt;
[[Category:Energy]]&lt;br /&gt;
&lt;br /&gt;
Created by Justin Vuong&lt;br /&gt;
&lt;br /&gt;
Edited by Chris Mickas&lt;br /&gt;
&lt;br /&gt;
Edited by Yunqing Jia&lt;/div&gt;</summary>
		<author><name>Yjia67</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=Work_Done_By_A_Nonconstant_Force&amp;diff=28753</id>
		<title>Work Done By A Nonconstant Force</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=Work_Done_By_A_Nonconstant_Force&amp;diff=28753"/>
		<updated>2017-04-10T02:37:16Z</updated>

		<summary type="html">&lt;p&gt;Yjia67: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Claimed by Yunqing Jia (Spring 2017)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This page explains the significance and fundamental calculations of work done by non-constant forces. In addition, it provides multiple worked examples and analytical models will help readers develop a more thorough understanding.&lt;br /&gt;
&lt;br /&gt;
==The Main Idea==&lt;br /&gt;
&lt;br /&gt;
[https://www.youtube.com/watch?v=RJgf4kvov9g]&lt;br /&gt;
[[https://www.youtube.com/watch?v=RJgf4kvov9g]]&lt;br /&gt;
Work done by constant force of magnitude &#039;F&#039; on a point that moves a displacement &#039;d&#039; in the directional of the force is the product: W=F*d. The SI unit for work is the joule (J) which is equivalent to newton meter. Force is a relationship of the product of mass*acceleration of the object, while displace is a result of the change in final and starting position. It is important to note that no matter how large or small the magnitude of the force is, no work is done if there is no displacement. The formula W=F*d only holds true when a constant force is applied to the system. &lt;br /&gt;
&lt;br /&gt;
When will we have to deal with non-constant forces? Why can&#039;t we just use the average force to make predictions? &lt;br /&gt;
&lt;br /&gt;
Well, two common examples of non-constant forces are gravity and springs. Both forces depend on the position of the object and change constantly while the object is moving. For example, if we tried to calculate the Earth&#039;s orbital path around the sun using only the force and momentum from a single data point, the Earth would be moving away from the sun rather than circling around it, and humans would not have made it this far. If we tried to predict the behavior of a spring-mass system with a constant force, the spring would be either compressing or stretching forever instead of osillating between the two states. Therefore, we need a method to calculate the work done by non-constant forces in order to make preditions about the system. &lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&lt;br /&gt;
[[Iterative Prediction of Spring-Mass System|Iterative calculations]] are used in order to calculate non-constant forces and predict an object&#039;s motion. Given initial and final states of a system under non-constant force, small displacement intervals should be used to calculate the object&#039;s trajectory. As mentioned in [[Work|previous sections]], the total amount of work done on a system equals the sum of works done by all individual forces, therefore, the total amount of work done can be calculated by the summation of the force on an object multiplied by the change in position in small increments. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;{{W}_{total} = {W}_{1} + {W}_{2} + {W}_{3} + ... + {W}_{n} = \overrightarrow{F}_{1}\bullet\overrightarrow{dr}_{1} + \overrightarrow{F}_{2}\bullet\overrightarrow{dr}_{2} + \overrightarrow{F}_{3}\bullet\overrightarrow{dr}_{3} + ... + \overrightarrow{F}_{n}\bullet\overrightarrow{dr}_{n}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;{{W}_{total} = \sum\overrightarrow{F}\bullet\Delta\overrightarrow{r}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, this process is very repetitive and the calculation gets unnecessarily tedious. If we make the displacement intervals infinitesimally small, we are essentially taking the integral of force with respect to displacement, or finding the area under the curve of force by displacement.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;{{W}_{total} = \int\limits_{i}^{f}\overrightarrow{F}\bullet\overrightarrow{dr}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Computational Model===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;https://trinket.io/glowscript/49f7c0f35f&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This model shows both the total work and the work done by a spring on a ball attached to a vertical spring. The work done by the spring oscillates because the work is negative when the ball is moving away from the resting state and is positive when the ball moves towards it.&lt;br /&gt;
&lt;br /&gt;
Because gravity causes the ball’s minimum position to be further from the spring’s resting length than its maximum position could be, the work is more negative when the ball approaches its minimum height.&lt;br /&gt;
&lt;br /&gt;
The code works by using small time steps of 0.01 seconds and finding the work done in each time step. Work is the summation of all of the work done in each time step, so another step makes sure the value for work is cumulative.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Modeling Non-Constant Forces in VPython====&lt;br /&gt;
&lt;br /&gt;
example: a spring-mass system moving in a plane &lt;br /&gt;
&lt;br /&gt;
[[&amp;lt;iframe src=&amp;quot;https://trinket.io/embed/glowscript/c26c4c2637&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;356&amp;quot; frameborder=&amp;quot;0&amp;quot; marginwidth=&amp;quot;0&amp;quot; marginheight=&amp;quot;0&amp;quot; allowfullscreen&amp;gt;&amp;lt;/iframe&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
 #intialize conditions&lt;br /&gt;
 #calculation loop&lt;br /&gt;
   #calculate/update force at every time step&lt;br /&gt;
     L = ball.pos - spring.pos&lt;br /&gt;
     Lhat = norm(L)&lt;br /&gt;
     s = mag(L) - L0&lt;br /&gt;
     Fspring = -(ks * s) * Lhat&lt;br /&gt;
   #apply momentum principle&lt;br /&gt;
     ball.p = ball.p + (Fspring + Fgravity) * deltat&lt;br /&gt;
  #update positions&lt;br /&gt;
  #update time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
 A box is pushed to the East, 5 meters by a force of 40 N, then it is pushed to the north 7 meters by a force of 60 N. Calculate the work done on the box.&lt;br /&gt;
&lt;br /&gt;
￼￼￼&amp;lt;math&amp;gt; W = \sum\overrightarrow{F}\bullet\Delta\overrightarrow{r} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
￼￼￼&amp;lt;math&amp;gt; W = 40N \bullet\ 5m + 60N \bullet\ 7m &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
￼￼￼&amp;lt;math&amp;gt; W = 40N \bullet\ 5m + 60N \bullet\ 7m &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
￼￼￼&amp;lt;math&amp;gt; W = 620 J &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
 We know that the formula for force is &amp;lt;math&amp;gt; F=ks &amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt; s &amp;lt;/math&amp;gt; is the distance the spring is stretched. If we integrate this with respect to &amp;lt;math&amp;gt; s &amp;lt;/math&amp;gt;, we find that &amp;lt;math&amp;gt; W=.5ks^2 &amp;lt;/math&amp;gt; is the formula for work.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; W=\int\limits_{i}^{f}\overrightarrow{k}\bullet\overrightarrow{ds} = .5ks^2 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Say that we want to find the work done by a horizontal spring with spring constant k=100 N/m as it moves an object 15 cm. Using the formula W=.5ks2 that we derived from F=ks, we can calculate that the work done by the spring is 1.125 J.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; W=\int\limits_{0}^{15}100\bullet\overrightarrow{ds}=.5ks^2=.5(100)(0.15^2)=1.125 J &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 3===&lt;br /&gt;
 The earth does work on an asteroid approaching from an initial distance r. How much work is done on the asteroid by gravity before it hits the earth’s surface?&lt;br /&gt;
&lt;br /&gt;
First, we must recall the formula for gravitational force.&lt;br /&gt;
&lt;br /&gt;
Because &amp;lt;math&amp;gt; G &amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt; M &amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt; m &amp;lt;/math&amp;gt; are constants, we can remove them from the integral. We also know that the integral of &amp;lt;math&amp;gt; -1\over r^2 &amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt; 1\over r &amp;lt;/math&amp;gt;. We then must calculate the integral of &amp;lt;math&amp;gt; –GMm\over r^2 &amp;lt;/math&amp;gt; from the initial radius of the asteroid, &amp;lt;math&amp;gt; R &amp;lt;/math&amp;gt;, to the radius of the earth, &amp;lt;math&amp;gt; r &amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; W=-GMm\bullet\int\limits_{R}^{r}{-1\over r^2}\bullet dr &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; W=-GMm\bullet({1\over r}-{1\over R}) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our answer will be positive because the force done by the earth on the asteroid and the direction of the asteroid&#039;s displacement are the same.&lt;br /&gt;
&lt;br /&gt;
==Connectedness==&lt;br /&gt;
I am most interested in the types of physics problems that accurately model real world situations. Some forces, like gravity near the surface of the earth and some machine-applied forces, are constant. However, most forces in the real world are not. &lt;br /&gt;
&lt;br /&gt;
Because of this, calculating work for non-constant forces is essential to mechanical engineering. For example, when calculating work done by an engine over a distance, the force applied by the engine can vary depending on factors such as user controls.&lt;br /&gt;
&lt;br /&gt;
On an industrial level, the work needed to fill and empty tanks depends on the weight of the liquid, which varies as the tanks fill and empty. Energy conversion in hydroelectric dams depends on the work done by water against turbines, which depends on the flow of water. Windmills work in the same way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Gaspard-Gustave de Coriolis, famous for discoveries such as the Coriolis effect, is credited with naming the term “work” to define force applied over a distance. Later physicists combined this concept with Newtonian calculus to find work for non-constant forces.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Further Reading&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Work]]&lt;br /&gt;
&lt;br /&gt;
[[Iterative Prediction of Spring-Mass System]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;External Links&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/watch?v=jTkknXVjBl4&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/watch?v=9Be81qfgBVc&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[http://www.britannica.com/biography/Gustave-Gaspard-Coriolis]&lt;br /&gt;
[http://www.math.northwestern.edu]&lt;br /&gt;
&lt;br /&gt;
[[Category:Energy]]&lt;br /&gt;
&lt;br /&gt;
Created by Justin Vuong&lt;br /&gt;
&lt;br /&gt;
Edited by Chris Mickas&lt;br /&gt;
&lt;br /&gt;
Edited by Yunqing Jia&lt;/div&gt;</summary>
		<author><name>Yjia67</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=Work_Done_By_A_Nonconstant_Force&amp;diff=28630</id>
		<title>Work Done By A Nonconstant Force</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=Work_Done_By_A_Nonconstant_Force&amp;diff=28630"/>
		<updated>2017-04-10T01:40:02Z</updated>

		<summary type="html">&lt;p&gt;Yjia67: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Claimed by Yunqing Jia (Spring 2017)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This page explains the significance and fundamental calculations of work done by non-constant forces. In addition, it provides multiple worked examples and analytical models will help readers develop a more thorough understanding.&lt;br /&gt;
&lt;br /&gt;
==The Main Idea==&lt;br /&gt;
&lt;br /&gt;
[https://www.youtube.com/watch?v=RJgf4kvov9g]&lt;br /&gt;
[[https://www.youtube.com/watch?v=RJgf4kvov9g]]&lt;br /&gt;
Work done by constant force of magnitude &#039;F&#039; on a point that moves a displacement &#039;d&#039; in the directional of the force is the product: W=F*d. The SI unit for work is the joule (J) which is equivalent to newton meter. Force is a relationship of the product of mass*acceleration of the object, while displace is a result of the change in final and starting position. It is important to note that no matter how large or small the magnitude of the force is, no work is done if there is no displacement. The formula W=F*d only holds true when a constant force is applied to the system.  &lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&lt;br /&gt;
[[Iterative Prediction of Spring-Mass System|Iterative calculations]] are used in order to calculate non-constant forces and predict an object&#039;s motion. Given initial and final states of a system under non-constant force, small displacement intervals should be used to calculate the object&#039;s trajectory. As mentioned in [[Work|previous sections]], the total amount of work done on a system equals the sum of works done by all individual forces, therefore, the total amount of work done can be calculated by summing the works calculated from small chunks along the path. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;{{W}_{total} = {W}_{1} + {W}_{2} + {W}_{3} + ... + {W}_{n} = \overrightarrow{F}_{1}\bullet\overrightarrow{dr}_{1} + \overrightarrow{F}_{2}\bullet\overrightarrow{dr}_{2} + \overrightarrow{F}_{3}\bullet\overrightarrow{dr}_{3} + ... + \overrightarrow{F}_{n}\bullet\overrightarrow{dr}_{n}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;{{W}_{total} = \sum\overrightarrow{F}\bullet\Delta\overrightarrow{r}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, this process is very repetitive and the calculation gets tedious. If we make the displacement intervals infinitestimally small, we are essentially taking the integral of force with respect to displacement:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;{{W}_{total} = \int\limits_{i}^{f}\overrightarrow{F}\bullet\overrightarrow{dr}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
wiki format reference:: &amp;lt;math&amp;gt;{{&amp;amp;Delta;p}_{system}} = {\vec{F}_{net}{&amp;amp;Delta;t}}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
 Common systems that deal with non-constant force are with springs and gravity. This is due to the change in spring force and gravitational force respectively. The work done on the system is found by integrating, or finding the area under the curve of force by displacement, we can calculate work without having to use inaccurate approximations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
￼￼￼&amp;lt;math&amp;gt; W=\int\limits_{i}^{f}\overrightarrow{F}\bullet\overrightarrow{dr} = \sum\overrightarrow{F}\bullet\Delta\overrightarrow{r} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This means that the work is equal to the integral of the function of the force with respect to the change in the objects position. This is also the same as the summation of the force on an object multiplied by the change in position.&lt;br /&gt;
&lt;br /&gt;
===A Computational Model===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;https://trinket.io/glowscript/49f7c0f35f&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This model shows both the total work and the work done by a spring on a ball attached to a vertical spring. The work done by the spring oscillates because the work is negative when the ball is moving away from the resting state and is positive when the ball moves towards it.&lt;br /&gt;
&lt;br /&gt;
Because gravity causes the ball’s minimum position to be further from the spring’s resting length than its maximum position could be, the work is more negative when the ball approaches its minimum height.&lt;br /&gt;
&lt;br /&gt;
The code works by using small time steps of 0.01 seconds and finding the work done in each time step. Work is the summation of all of the work done in each time step, so another step makes sure the value for work is cumulative.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
A box is pushed to the East, 5 meters by a force of 40 N, then it is pushed to the north 7 meters by a force of 60 N. Calculate the work done on the box.&lt;br /&gt;
&lt;br /&gt;
￼￼￼&amp;lt;math&amp;gt; W = \sum\overrightarrow{F}\bullet\Delta\overrightarrow{r} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
￼￼￼&amp;lt;math&amp;gt; W = 40N \bullet\ 5m + 60N \bullet\ 7m &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
￼￼￼&amp;lt;math&amp;gt; W = 40N \bullet\ 5m + 60N \bullet\ 7m &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
￼￼￼&amp;lt;math&amp;gt; W = 620 J &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
We know that the formula for force is &amp;lt;math&amp;gt; F=ks &amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt; s &amp;lt;/math&amp;gt; is the distance the spring is stretched. If we integrate this with respect to &amp;lt;math&amp;gt; s &amp;lt;/math&amp;gt;, we find that &amp;lt;math&amp;gt; W=.5ks^2 &amp;lt;/math&amp;gt; is the formula for work.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; W=\int\limits_{i}^{f}\overrightarrow{k}\bullet\overrightarrow{ds} = .5ks^2 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Say that we want to find the work done by a horizontal spring with spring constant k=100 N/m as it moves an object 15 cm. Using the formula W=.5ks2 that we derived from F=ks, we can calculate that the work done by the spring is 1.125 J.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; W=\int\limits_{0}^{15}100\bullet\overrightarrow{ds}=.5ks^2=.5(100)(0.15^2)=1.125 J &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 3===&lt;br /&gt;
The earth does work on an asteroid approaching from an initial distance r. How much work is done on the asteroid by gravity before it hits the earth’s surface?&lt;br /&gt;
&lt;br /&gt;
First, we must recall the formula for gravitational force.&lt;br /&gt;
&lt;br /&gt;
Because &amp;lt;math&amp;gt; G &amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt; M &amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt; m &amp;lt;/math&amp;gt; are constants, we can remove them from the integral. We also know that the integral of &amp;lt;math&amp;gt; -1\over r^2 &amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt; 1\over r &amp;lt;/math&amp;gt;. We then must calculate the integral of &amp;lt;math&amp;gt; –GMm\over r^2 &amp;lt;/math&amp;gt; from the initial radius of the asteroid, &amp;lt;math&amp;gt; R &amp;lt;/math&amp;gt;, to the radius of the earth, &amp;lt;math&amp;gt; r &amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; W=-GMm\bullet\int\limits_{R}^{r}{-1\over r^2}\bullet dr &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; W=-GMm\bullet({1\over r}-{1\over R}) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our answer will be positive because the force done by the earth on the asteroid and the direction of the asteroid&#039;s displacement are the same.&lt;br /&gt;
&lt;br /&gt;
==Connectedness==&lt;br /&gt;
I am most interested in the types of physics problems that accurately model real world situations. Some forces, like gravity near the surface of the earth and some machine-applied forces, are constant. However, most forces in the real world are not. &lt;br /&gt;
&lt;br /&gt;
Because of this, calculating work for non-constant forces is essential to mechanical engineering. For example, when calculating work done by an engine over a distance, the force applied by the engine can vary depending on factors such as user controls.&lt;br /&gt;
&lt;br /&gt;
On an industrial level, the work needed to fill and empty tanks depends on the weight of the liquid, which varies as the tanks fill and empty. Energy conversion in hydroelectric dams depends on the work done by water against turbines, which depends on the flow of water. Windmills work in the same way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Gaspard-Gustave de Coriolis, famous for discoveries such as the Coriolis effect, is credited with naming the term “work” to define force applied over a distance. Later physicists combined this concept with Newtonian calculus to find work for non-constant forces.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Further Reading&#039;&#039;&#039;&lt;br /&gt;
[[Work]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;External Links&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/watch?v=jTkknXVjBl4&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/watch?v=9Be81qfgBVc&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[http://www.britannica.com/biography/Gustave-Gaspard-Coriolis]&lt;br /&gt;
[http://www.math.northwestern.edu]&lt;br /&gt;
&lt;br /&gt;
[[Category:Energy]]&lt;br /&gt;
&lt;br /&gt;
Created by Justin Vuong&lt;br /&gt;
Edited by Chris Mickas&lt;/div&gt;</summary>
		<author><name>Yjia67</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=Work_Done_By_A_Nonconstant_Force&amp;diff=28611</id>
		<title>Work Done By A Nonconstant Force</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=Work_Done_By_A_Nonconstant_Force&amp;diff=28611"/>
		<updated>2017-04-10T01:31:06Z</updated>

		<summary type="html">&lt;p&gt;Yjia67: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Claimed by Yunqing Jia (Spring 2017)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This page explains the significance and fundamental calculations of work done by non-constant forces. In addition it provides multiple worked examples and analytical models will help readers develop a more thorough understanding.&lt;br /&gt;
&lt;br /&gt;
==The Main Idea==&lt;br /&gt;
&lt;br /&gt;
[https://www.youtube.com/watch?v=RJgf4kvov9g]&lt;br /&gt;
[[https://www.youtube.com/watch?v=RJgf4kvov9g]]&lt;br /&gt;
Work done by constant force of magnitude &#039;F&#039; on a point that moves a displacement &#039;d&#039; in the directional of the force is the product: W=F*d. The SI unit for work is the joule (J) which is equivalent to newton meter. Force is a relationship of the product of mass*acceleration of the object, while displace is a result of the change in final and starting position. It is important to note thatno matter how large or small the magnitude of the force is, no work is done if there is no displacement. The formula W=F*d only holds true when constant force is applied to the system.  &lt;br /&gt;
&lt;br /&gt;
[[Iterative Prediction of Spring-Mass System|Iterative calculations]] are used in order to calculate non-constant forces and predict an object&#039;s motion. Given initial and final states of a system under non-constant force, small displacement intervals should be used to calculate the object&#039;s trajectory. As mentioned in [[Work|previous sections]], the total amount of work done on a system equals the sum of works done by all individual forces, therefore, the total amount of work done at a specific instance can be calculated by summing all previous ones.&lt;br /&gt;
&amp;lt;math&amp;gt;{{W}_{total} = {W}_{1} + {W}_{2} + {W}_{3} + ... + {W}_{n} = \overrightarrow{F}_{1}\bullet\overrightarrow{dr}_{1} + \overrightarrow{F}_{2}\bullet\overrightarrow{dr}_{2} + \overrightarrow{F}_{3}\bullet\overrightarrow{dr}_{3} + ... + \overrightarrow{F}_{n}\bullet\overrightarrow{dr}_{n}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
wiki format reference:: &amp;lt;math&amp;gt;{{&amp;amp;Delta;p}_{system}} = {\vec{F}_{net}{&amp;amp;Delta;t}}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
 Common systems that deal with non-constant force are with springs and gravity. This is due to the change in spring force and gravitational force respectively. The work done on the system is found by integrating, or finding the area under the curve of force by displacement, we can calculate work without having to use inaccurate approximations.&lt;br /&gt;
&lt;br /&gt;
===A Mathematical Model===&lt;br /&gt;
&lt;br /&gt;
￼￼￼&amp;lt;math&amp;gt; W=\int\limits_{i}^{f}\overrightarrow{F}\bullet\overrightarrow{dr} = \sum\overrightarrow{F}\bullet\Delta\overrightarrow{r} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This means that the work is equal to the integral of the function of the force with respect to the change in the objects position. This is also the same as the summation of the force on an object multiplied by the change in position.&lt;br /&gt;
&lt;br /&gt;
===A Computational Model===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;https://trinket.io/glowscript/49f7c0f35f&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This model shows both the total work and the work done by a spring on a ball attached to a vertical spring. The work done by the spring oscillates because the work is negative when the ball is moving away from the resting state and is positive when the ball moves towards it.&lt;br /&gt;
&lt;br /&gt;
Because gravity causes the ball’s minimum position to be further from the spring’s resting length than its maximum position could be, the work is more negative when the ball approaches its minimum height.&lt;br /&gt;
&lt;br /&gt;
The code works by using small time steps of 0.01 seconds and finding the work done in each time step. Work is the summation of all of the work done in each time step, so another step makes sure the value for work is cumulative.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
A box is pushed to the East, 5 meters by a force of 40 N, then it is pushed to the north 7 meters by a force of 60 N. Calculate the work done on the box.&lt;br /&gt;
&lt;br /&gt;
￼￼￼&amp;lt;math&amp;gt; W = \sum\overrightarrow{F}\bullet\Delta\overrightarrow{r} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
￼￼￼&amp;lt;math&amp;gt; W = 40N \bullet\ 5m + 60N \bullet\ 7m &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
￼￼￼&amp;lt;math&amp;gt; W = 40N \bullet\ 5m + 60N \bullet\ 7m &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
￼￼￼&amp;lt;math&amp;gt; W = 620 J &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
We know that the formula for force is &amp;lt;math&amp;gt; F=ks &amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt; s &amp;lt;/math&amp;gt; is the distance the spring is stretched. If we integrate this with respect to &amp;lt;math&amp;gt; s &amp;lt;/math&amp;gt;, we find that &amp;lt;math&amp;gt; W=.5ks^2 &amp;lt;/math&amp;gt; is the formula for work.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; W=\int\limits_{i}^{f}\overrightarrow{k}\bullet\overrightarrow{ds} = .5ks^2 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Say that we want to find the work done by a horizontal spring with spring constant k=100 N/m as it moves an object 15 cm. Using the formula W=.5ks2 that we derived from F=ks, we can calculate that the work done by the spring is 1.125 J.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; W=\int\limits_{0}^{15}100\bullet\overrightarrow{ds}=.5ks^2=.5(100)(0.15^2)=1.125 J &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 3===&lt;br /&gt;
The earth does work on an asteroid approaching from an initial distance r. How much work is done on the asteroid by gravity before it hits the earth’s surface?&lt;br /&gt;
&lt;br /&gt;
First, we must recall the formula for gravitational force.&lt;br /&gt;
&lt;br /&gt;
Because &amp;lt;math&amp;gt; G &amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt; M &amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt; m &amp;lt;/math&amp;gt; are constants, we can remove them from the integral. We also know that the integral of &amp;lt;math&amp;gt; -1\over r^2 &amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt; 1\over r &amp;lt;/math&amp;gt;. We then must calculate the integral of &amp;lt;math&amp;gt; –GMm\over r^2 &amp;lt;/math&amp;gt; from the initial radius of the asteroid, &amp;lt;math&amp;gt; R &amp;lt;/math&amp;gt;, to the radius of the earth, &amp;lt;math&amp;gt; r &amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; W=-GMm\bullet\int\limits_{R}^{r}{-1\over r^2}\bullet dr &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; W=-GMm\bullet({1\over r}-{1\over R}) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our answer will be positive because the force done by the earth on the asteroid and the direction of the asteroid&#039;s displacement are the same.&lt;br /&gt;
&lt;br /&gt;
==Connectedness==&lt;br /&gt;
I am most interested in the types of physics problems that accurately model real world situations. Some forces, like gravity near the surface of the earth and some machine-applied forces, are constant. However, most forces in the real world are not. &lt;br /&gt;
&lt;br /&gt;
Because of this, calculating work for non-constant forces is essential to mechanical engineering. For example, when calculating work done by an engine over a distance, the force applied by the engine can vary depending on factors such as user controls.&lt;br /&gt;
&lt;br /&gt;
On an industrial level, the work needed to fill and empty tanks depends on the weight of the liquid, which varies as the tanks fill and empty. Energy conversion in hydroelectric dams depends on the work done by water against turbines, which depends on the flow of water. Windmills work in the same way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Gaspard-Gustave de Coriolis, famous for discoveries such as the Coriolis effect, is credited with naming the term “work” to define force applied over a distance. Later physicists combined this concept with Newtonian calculus to find work for non-constant forces.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Further Reading&#039;&#039;&#039;&lt;br /&gt;
[[Work]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;External Links&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/watch?v=jTkknXVjBl4&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/watch?v=9Be81qfgBVc&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[http://www.britannica.com/biography/Gustave-Gaspard-Coriolis]&lt;br /&gt;
[http://www.math.northwestern.edu]&lt;br /&gt;
&lt;br /&gt;
[[Category:Energy]]&lt;br /&gt;
&lt;br /&gt;
Created by Justin Vuong&lt;br /&gt;
Edited by Chris Mickas&lt;/div&gt;</summary>
		<author><name>Yjia67</name></author>
	</entry>
</feed>