{VERSION 4 0 "IBM INTEL NT" "4.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "" -1 256 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT 256 34 "Mercury 3 - Mercury's day and year" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 73 "This workshe et animates the orbit of Mercury around the sun and indicates" }} {PARA 0 "" 0 "" {TEXT -1 110 "its rotation. This worksheet shows the m otion from the point of view of an observer on the surface of Mercury. " }}{PARA 0 "" 0 "" {TEXT -1 76 "To begin, we specify the positions of the sun (stationary at the origin) and" }}{PARA 0 "" 0 "" {TEXT -1 87 "Mercury, and of an object on the surface of Mercury that rotates a long with the planet:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "a: =3; b:=15;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "sposx := 0;\n sposy := 0;\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "mposx := a *cos(t);\nmposy := b*sin(t);\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 66 "oposx := mposx + 0.5 * cos(2*t);\noposy := mposy + 0.5 * sin(2 *t);\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 205 "Now we make circles (l arge for the sun and smaller for Mercury) and a line (from the center \+ of Mercury through the position of the object) so that we can track th e positions of things during our animation:" }{MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 183 "sun := [sposx+cos(s), sposy +sin(s), s=0..2*Pi];\n\nmercury := [mposx + 0.5*cos(s), mposy +0.5*sin (s), s=0..2*Pi];\n\nobjectline := [(1-s)*mposx + s*oposx, (1-s)*mposy \+ + s*oposy, s=0..2];\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 93 "Now we m ove Mercury to the center of the picture by subtracting its position f rom everything:" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 155 "spos2x := sposx - mposx;\nspos2y := sposy - mposy;\n \nmpos2x := mposx - mposx; \nmpos2y := mposy - mposy;\n\nopos2x := o posx - mposx;\nopos2y := oposy - mposy;\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 58 "Now we need the circles and lines for these new positions :" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 194 "sun2 := [spos2x+cos(s), spos2 y+sin(s), s=0..2*Pi];\n\nmercury2 := [mpos2x + 0.5*cos(s), mpos2y +0.5 *sin(s), s=0..2*Pi];\n\nobjectline2 := [(1-s)*mpos2x + s*opos2x, (1-s) *mpos2y + s*opos2y, s=0..2];\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 148 "Now we must compensate for the rotation of Mercury (we want the o bject to remain stationary). As indicated on the Web page, this is acc omplished by:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 275 "spos3x := cos(2*t )*spos2x + sin(2*t)*spos2y;\nspos3y := -sin(2*t)*spos2x + cos(2*t)*spo s2y;\n\nmpos3x := cos(2*t)*mpos2x + sin(2*t)*mpos2y;\nmpos3y := -sin(2 *t)*mpos2x + cos(2*t)*mpos2y;\n\nopos3x := cos(2*t)*opos2x + sin(2*t)* opos2y;\nopos3y := -sin(2*t)*opos2x + cos(2*t)*opos2y;\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 37 "and then we define our objects again:" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 194 "sun3 := [spos3x+cos(s), spos3y+sin (s), s=0..2*Pi];\n\nmercury3 := [mpos3x + 0.5*cos(s), mpos3y +0.5*sin( s), s=0..2*Pi];\n\nobjectline3 := [(1-s)*mpos3x + s*opos3x, (1-s)*mpos 3y + s*opos3y, s=0..2];\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 29 "And \+ finally we animate again:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "with(p lots,animate);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 104 "animate( \{sun3, mercury3, objectline3\}, t=0..2*Pi,color=blue, axes=none, scal ing=constrained, frames=32);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "plot([spos3x,spos3y,t=0..2*Pi]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "1 0 0" 12 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }