• HOME
  • YEAR 9
    • Assessment System
    • Inheritance
    • Plants >
      • Kitchen Garden Project
    • Acids and Alkalis
    • Energetic Reactions
    • Energy Resources
    • Mechanics
    • Environmental Science
  • IGCSE
    • Forces and Motion
    • Energy and Energy Resources
    • Solids, Liquids and Gases
    • Waves
    • Astrophysics
    • Electricity
    • Magnetism
    • Nuclear Physics
    • IGCSE revision
  • Physics I
    • Kinematics >
      • Variables and Units
      • Describing Motion
      • Equations of Motion
      • Problem Solving
      • Projectiles
      • Kinematics Animations
    • Dynamics >
      • Forces
      • Static Equilibrium
      • Newton's Laws
      • Friction
      • Advanced Problems
    • Gravitation and Orbits >
      • Circular Motion
      • Vertical Circles
      • Universal Gravitation
      • Orbits
      • Circular Motion Animation
    • Energy >
      • Work
      • Springs
      • PE and KE
      • Conservation of Energy
      • Work-Energy Theorem
    • Linear Momentum >
      • Impulse
      • Conservation of Momentum
      • Types of Collision
      • 2-D Collisions
    • Simple Harmonic Motion >
      • Mass on Spring
      • Pendulums
      • SHM Animations
    • Rotational Mechanics >
      • Torque
      • Rotational Kinematics
      • Rotational Dynamics
      • Angular Momentum
      • Rotational Energy
    • Mechanical Waves >
      • Waves on a String
      • Sound
    • AP-1 Revision
    • AP Physics C (Mechanics)
  • Physics II
    • Fluid Mechanics
    • Thermal Physics
    • Electrostatics
    • Magnetic Fields >
      • EM Induction
    • Interference and Diffraction
    • Optics
    • Modern Physics
    • AP 2 Revision
  • OCEANOGRAPHY
    • The World Ocean >
      • What is Oceanography
      • History
      • Lat and Long
      • Size and Origin
      • Plate Tectonics
    • Seawater >
      • A Salty Sea
      • Measuring Salinity
      • Thermal Properties
      • Density Profiles
      • Drinking Seawater
    • Circulation and Climate >
      • Global Heating
      • Coriolis Effect
      • Surface Currents
      • Vertical Motion
      • Thermohaline Circulation
      • El Nino
      • Carbon Cycle
    • Waves and Tides >
      • Wave Motion
      • Formation of Waves
      • Beaches
      • Tsunamis
      • Tides
    • Observation Systems >
      • Challenges
      • The CTD
      • Moorings
      • Sound Waves
      • Robotics
      • Satellites
    • Weather and Navigation >
      • Weather Systems
      • Weather Forecasting
      • Hurricanes
      • Navigation
      • Life at Sea
    • Oceans and Mankind >
      • Ocean Acidification
      • Pollution
      • Fish Stocks
      • Climate Change
      • Energy Resources
    • Atlantic Explorer Cruise
    • ROVs
  • COLLEGE
    • College Physics I
    • College Physics II
  • CONTACT
Island Physics

RanDOM Ramblings

Coding Simulations

9/8/2019

0 Comments

 
Picture
I decided to start including some coding into the AP Physics I course this coming year.  The reason for it was to try to increase the level of understanding of how objects move.  Especially the idea that motion can be broken into components and that a constant acceleration can change the direction of motion.  In order to produce a realistic animation of a moving object, for example a projectile, a student must have a good understanding of the physics involved.  If the physics is wrong, then the animation will not realistic.  Fairly sure that is the basis of the Matrix and Inception?  Anyway...

So, then I started investigating and trialing a number of languages.  Ideally I wanted something that was easy to install and get to grips with as I definitely did NOT want to teach the students complicated syntax and compiling (so Fortran was out), or that costs money (ditto Matlab).  As the IT dept teaches Python, I tried that out using an online tool called Trinket.  This looked promising as a basic code could be embedded into this website and the students could modify and play with it.  The problem was that the syntax of Python, or rather Glowscript, is not terribly easy to get to grips with.

So, I found PhysGL which appears to fit the bill.  It is free and online, although I cannot embed either the code or the animations.  The syntax seems pretty intuitive, which is ideal, and the simulations look pretty nice.  There are a couple of downsides, a) there is not too much in the way of instruction manuals, so I have had to work a bit out myself using trial and error, and b) as it is online and runs through the web it can be slow.  This is especially a problem as using long time intervals can lead to errors.  I need to think more about the circular motion and SHM simulations when I am back in Bermuda and with a faster laptop.  However, for the basic kinematics stuff in both one and two dimensions (or three?!) it seems ideal.     

The idea is to focus entirely on the physics and the logic behind how animations, kinematics and dynamics work in ever shorter steps, and not the nuts and bolts of the language itself.  
The basic structure of any animation code is:
  • define parameters and variables
  • draw a background, if required
  • run the physics inside a loop
  • display vectors and/or a trace
​
​So, the plan is to include this activity along with the usual labs and problem solving in class.

0 Comments

Typing Equations

7/8/2019

0 Comments

 
Most of this past week has been spent reformatting the AP-1 section of this site.  I hadn't intended to, was just going to add some updates and shuffle some sections around to match the updated syllabus from College Board.  However, this quickly turned into a nightmare job as the weebly editor was slowing down to the point of being unusable.  After a long chat with the people at weebly, it was determined that the large pages of equations were the problem.  This was partly discovered as the older pages which I had included the equations using Codecogs were the cranky ones, while the Mathjax ones that I have been doing since last Easter were running well.  So, ended up dividing the AP-1 pages into smaller sub-pages and re-writing ALL of the equations. 

So, what are the two methods:

CodeCogs
This is a website, www.codecogs.com, that you can use to create an equation and then gives you a HTML code that you can embed into your webpage.  The equations look pretty good, if a little bit fuzzy.  It turns out that it works by calling up the website, coding the equation to form a .gif image file and then downloads it into the editor.  So the equation is actually an image that is uploaded to codecogs, and downloaded every time I edit the page.  My website user's browsers just then downloads it as an image file along with everything else.  It had been working well, but I suspect that as the codecogs server was being overwhelmed, it ran slow.  It also highlighted the fundamental inefficiencies of the system. Not to mention that in order to look right I had had to add invisible dividers above and below each equation.  As the CodeCogs system somehow didn't work on the blog pages when I was writing about Black Holes, I hunted for another method, which is far better.
Picture
Picture
MathJax
To use this system I had to install the free app into my weebly editor - which took maybe 2 minutes.  Took me a bit longer to get the hang of using it though.  The advantage is that the equations are far easier to include, the text block are not broken up, no dividers are required and the equations look far sharper when viewed on the final webpage.  A disadvantage is that it is not possible to see what the equation actually looks like in the editor.  The code that MathJax uses is not exactly the same as that from CodeCogs, but the differences are small. ​  Which is a good thing as CodeCogs is probably the easiest way to figure out the LaTex code!
Picture
This page renders really nicely when the user opens the page on their browser:
Picture
WORD
So, all this work got me thinking whether there was a more efficient way to include equations into a WORD document.  And it turns out that there is!  Using the included Equation Editor has always been a bit painful and slow, although the equations look nice when it is finished.  Turns out that if you open an equation editor box in WORD as normal, you can just type in the LaTex code directly and press ENTER when you have finished, which then compiles the equation.  A lot quicker and less fiddly than the graphical method.  This does not work on POWERPOINT though, so stuck with the normal method.
Picture
GoogleDocs
This is somewhat harder.  The built-in equation editor is very clunky, basic and doesn't produce good results, although given the advantages or sharing documents and that it is free is not a dealbreaker.  There are some third party apps that you can "ADD ON" so be able to insert LaTex code to produce better looking equations but they are not easy to use and say unhelpful things like "require access to your google account"....

Top tip for using google docs built-in editor, use the TAB key to jump from one area to another.  Especially useful as it is next to impossible to see the boxes.


0 Comments

    Archives

    August 2020
    March 2020
    February 2020
    September 2019
    August 2019
    May 2019
    April 2019
    January 2019
    December 2018

    Categories

    All

    RSS Feed

    Older Posts
  • HOME
  • YEAR 9
    • Assessment System
    • Inheritance
    • Plants >
      • Kitchen Garden Project
    • Acids and Alkalis
    • Energetic Reactions
    • Energy Resources
    • Mechanics
    • Environmental Science
  • IGCSE
    • Forces and Motion
    • Energy and Energy Resources
    • Solids, Liquids and Gases
    • Waves
    • Astrophysics
    • Electricity
    • Magnetism
    • Nuclear Physics
    • IGCSE revision
  • Physics I
    • Kinematics >
      • Variables and Units
      • Describing Motion
      • Equations of Motion
      • Problem Solving
      • Projectiles
      • Kinematics Animations
    • Dynamics >
      • Forces
      • Static Equilibrium
      • Newton's Laws
      • Friction
      • Advanced Problems
    • Gravitation and Orbits >
      • Circular Motion
      • Vertical Circles
      • Universal Gravitation
      • Orbits
      • Circular Motion Animation
    • Energy >
      • Work
      • Springs
      • PE and KE
      • Conservation of Energy
      • Work-Energy Theorem
    • Linear Momentum >
      • Impulse
      • Conservation of Momentum
      • Types of Collision
      • 2-D Collisions
    • Simple Harmonic Motion >
      • Mass on Spring
      • Pendulums
      • SHM Animations
    • Rotational Mechanics >
      • Torque
      • Rotational Kinematics
      • Rotational Dynamics
      • Angular Momentum
      • Rotational Energy
    • Mechanical Waves >
      • Waves on a String
      • Sound
    • AP-1 Revision
    • AP Physics C (Mechanics)
  • Physics II
    • Fluid Mechanics
    • Thermal Physics
    • Electrostatics
    • Magnetic Fields >
      • EM Induction
    • Interference and Diffraction
    • Optics
    • Modern Physics
    • AP 2 Revision
  • OCEANOGRAPHY
    • The World Ocean >
      • What is Oceanography
      • History
      • Lat and Long
      • Size and Origin
      • Plate Tectonics
    • Seawater >
      • A Salty Sea
      • Measuring Salinity
      • Thermal Properties
      • Density Profiles
      • Drinking Seawater
    • Circulation and Climate >
      • Global Heating
      • Coriolis Effect
      • Surface Currents
      • Vertical Motion
      • Thermohaline Circulation
      • El Nino
      • Carbon Cycle
    • Waves and Tides >
      • Wave Motion
      • Formation of Waves
      • Beaches
      • Tsunamis
      • Tides
    • Observation Systems >
      • Challenges
      • The CTD
      • Moorings
      • Sound Waves
      • Robotics
      • Satellites
    • Weather and Navigation >
      • Weather Systems
      • Weather Forecasting
      • Hurricanes
      • Navigation
      • Life at Sea
    • Oceans and Mankind >
      • Ocean Acidification
      • Pollution
      • Fish Stocks
      • Climate Change
      • Energy Resources
    • Atlantic Explorer Cruise
    • ROVs
  • COLLEGE
    • College Physics I
    • College Physics II
  • CONTACT