Please download the file https://anaraven.bitbucket.io/eval/2018/cmb1/grav/answers.Rmd. Write your student number in the correct place at the beginning of the answer file. When you finish, send the answers.Rmd file to andres.aravena+cmb@istanbul.edu.tr. Be sure to use the correct email address and send only one file.

1 Rubber bands

Coils and rubber bands are elastic materials. If you apply a force to them, they expand. If there is no force, they have a natural size. We want to investigate what is the relation between the expansion of the elastic material and the force applied to them?

Today we will measure the relationship between the weight of the load and the rubber band’s length with an experiment like this:

1.1 Measure the rubber band length for different numbers of coins (or marbles). Write the values in a text file called rubber-band.txt.

After you finish, repeat the experiment one or more times. There should be three columns: n_coins (or n_marbles), length, and repetition. Send this file to andres.aravena+cmb@istanbul.edu.tr.

1.2 Write the code to read the rubber-band.txt file into a data frame named rubber. Plot the number of coins (or marbles) depending on the rubber band length. Coins shall be in the vertical axis, length in the horizontal.

2 Circles

2.1 We want to draw circles, ellipses and spirals. Please create a vector t with numbers from 0 to 2*pi in steps of 0.1. Then draw this graphic with cos(t) on the horizontal axis, and sin(t) in the vertical axis

2.2 Now draw the same circle but with the symbol size proportional to 1-cos(t)

2.3 This time the radius should change with t. Please draw this graphic with t*cos(2*t) on the horizontal and t*sin(2*t) in the vertical axis

3 Homework

These exercises will take more time. Do them at home and send me the answer in a separate file (on Rmarkdown format).

3.1 Read the help page of the par() command and find the correct options to plot this drawing.

3.2 Read the help page of the symbols() command and find the correct options to plot this drawing.

3.3 Obviously, these are just approximations to the real flag of Turkey. Can you find the commands to draw the flag with the correct measurements?