EField4 Physics Example:  Forces

EField can display the force vectors acting on an object.  Five unknown charges are shown on the screen along with vectors representing the forces on each charge.  You can click-drag on any charge to change its position.  How many charges are alike?  Start


Script Example

<script language="JavaScript"> 
function forces(){
	document.EField.setAutoRefresh(false);
	document.EField.setDefault();
	document.EField.setShowTime(false);
	document.EField.setShowForce(true);
	id=document.EField.addObject("charge","x=-2,y=0,q=3");
	document.EField.setRGB(id,0,0,0);
	id=document.EField.addObject("charge","x=2,y=0,q=-2");
	document.EField.setRGB(id,0,0,0);
	id=document.EField.addObject("charge","x=0,y=2,q=-2");
	document.EField.setRGB(id,0,0,0);
	id=document.EField.addObject("charge","x=0,y=-2,q=2");
	document.EField.setRGB(id,0,0,0);
	id=document.EField.addObject("charge","x=0,y=0,q=2");
	document.EField.setRGB(id,0,0,0);
	document.EField.setAutoRefresh(true);
}
</script>