#OK to post homework #Lucy Martinez, 04-09-2024, Assignment 22 Help:=proc(): print(`To display the animation, copy and paste the following line`): print(`display([sun,planet(1,365.5,35,"Blue",1,40),NULL], lightmodel=light4, axes=none); `): print(`In general, use the following line`): print(`display([sun,planet(1,365.5,sizeOfEarth,"Blue",numberOfYears,numberOfFrames),NULL], lightmodel=light4, axes=none); `): end: # Problem 3: Start working on your chosen class final project # and report the progress so far (including the empty set, but you have to respond) # Answer: Our group has written procedures to generate cyclic linear codes [n,k] # over GF(q) up to a given size, procedures to compute the weight enumerator # polynomials for such codes, and procedures to compute the average and # standard deviation for the weight of each such code. # We are currently working on compiling data from our maple procedures, and # compiling data from Dr. Z's article. # Problem 5: Use the animate function in the plots package of Maple to illustrate # the earth moving around the sun # (where the orbit is drawn, but a point labeled E is moving around the sun). # If possible also have the moon going around the earth. # The input parameters should be an abitrary year length (365.5 for us) # and lunar sideral period (27.32 for us), as well as the center of the sun, # and the distance of the sun to the earth. You can assume that it is a circular orbit with(plots): # NOTES: The animation will show nframes frames per every 1 Earth-year. #rad: orbital radius #yearlength: time for one orbit in "days" which converts to 1 Earth-year #S: size of the planet #C: color of the planet #nyears: displays animations for "nyears" Earth-years # i.e. what does it look like in one Earth-year, if you want two years, then input 2 planet:=proc(rad,yearlength,S,C,nyears,nframes) local orbit, planet,i: orbit := spacecurve([rad*cos(t), rad*sin(t), 0], t=0..2*Pi, color="Gray"): planet := display(seq( pointplot3d([rad*cos(2*Pi*i/nframes/(yearlength/365.5)), rad*sin(2*Pi*i/nframes/(yearlength/365.5)), 0], symbol=solidsphere, symbolsize=S, color=C),i=0..nframes*nyears-1), insequence); display([orbit, planet]); end: #centers a solid sphere (the sun) sun:= pointplot3d([0,0,0], symbol=solidsphere,symbolsize=50, color="Yellow"):