Week2 Examples: Vectors, Normal/Tangent directions, Turning, Home-In, Following a Function, and Finite State Machine: Here is the source code.

  1. Vector Components:
  2. Reflect A Vector:
  3. Elasticity and Friction:
  4. Home in to target:
  5. Gradual Turning:
  6. Almost identical to Example-4 from week1, except, at the last stage of the road, if user change the road-end-point, the car moves/rotates gradually towards the endpoint rather than rotate to face the end point immediately.
  7. Plotting and Following a Sine Function:
  8. Finite State Example: The Paddle:
  9.  

  10. Abstract Paddle -- Almost free Left/Right paddles:
  11.  

  12. The PaddleSet:
  13.  

  14. Simple Patrol:
  15. Random Patrol:

     

  16. Smooth Transition Patrol:

     

  17. Patrol That Chases: