Showing posts with label VPython. Show all posts
Showing posts with label VPython. Show all posts

19 March 2010

Graphing the sin(theta) and cos(theta) using the Unit Circle

The Unit Circle is a circle with a radius of 1, and which is centered at the origin (0,0).
Its equation is: x2 + y2 = 1.
Its equation is also: x = cos(theta), y = sin(theta).
HOMEWORK part one: PROVE  to yourself that x2 + y2 = 1
for every point  in the following diagram. 

For example,
(1,0) ==> x = 1 and y = 0 ==>
          x^2 = 1 and y^2 = 0 ==> 1 + 0 = 1    check
(√3/2, 1/2) ==> x = √3/2 and y = 1/2 ==>
          x^2 = 3/4 and y^2 = 1/4 ==> 3/4 + 1/4 = 1   check
(√2/2, √2/2) ==> x = √2/2 and y = √2/2 ==>
          x^2 = 2/4 and y^2 = 2/4 ==> 2/4 + 2/4 = 1  check
and so on for all the points around the circle.
HOMEWORK part two: PLAY with the following applets
for the sin(theta) 
http://www.ies.co.jp/math/java/trig/graphSinX/graphSinX.html
and cos(theta) http://www.ies.co.jp/math/java/trig/graphCosX/graphCosX.html

and PROVE that sin(theta) = y and cos(theta) = x, for all the points
in the unit circle. Note, Don't forget to rotate the cos(theta) applet
after you have drawn it !

02 March 2010

Decomposing vectors using TRIG

How can you decompose vectors into their components?
See this website to find out more:
http://www.sparknotes.com/testprep/books/sat2/physics/chapter4section5.rhtml

Solve the problems on this website for homework:
http://www.physics247.com/physics-homework-help/vector-components.php

27 January 2010

What in the world is SIGMA notation?!

This notation is used all the time in Physics and Math to represent the sum of a series of numbers.
The numbers can be as simple as 1 + 2 + 3 + 4 + 5 + ... + n,
or, in the case below, a little more complicated: 1 + 4 + 9 + 15 + ... + n^2


Write the following in Sigma notation, then write the VPython code to calculate the sum, then run the code to get the result.
(The first one is done for you..................................)

(1) Write the sum:  1 + 2 + 3 + ... + 10




IDLE 2.6.2
>>> count = 0
>>> for j in range(1,11):
        count += j

>>> print "the sum is: ", count
the sum is: 55

(Now, it's your turn....................)
(2) Write the sum:  1 + 2 + 3 + ... + 100
(3) Write the sum:  1 + 3 + 5 + ... + 99
(4) Write the sum:  1 + 2 + 4 + 16 + ... + 512
(5) Write the sum:  1 + (1/2) + (1/4) + ... + (1/1024)

Questions? send them to Dr. McCarthy ASAP.  Good luck.