My Poster! :) |
Today Dr. Bellis and a few of Siena's physics professors came to our poster sessions. During the poster session I shared my work with many teachers at Emma and they all seemed to be very intrigued by the simulations I made and the process of making them. I felt very accomplished and excited when I talked them about my work. I was able to answer most questions the teachers asked me, except one. More than three of the teachers asked me "do you know now long it takes for sun to orbit around the galaxy?" when I introduced them my sun and earth simulation.
So, after some search online, here's the answer to that question:
It takes ~230 million years the solar system to orbit once around the Milky Way Galaxy.
That same afternoon, I arrived at Dr. Bellis' office for our last meeting. He was chatting with another professor about how our school looks like Hogwarts and how our traditions are so funny and odd. When we returned to the office, I fixed the axis (the numbers were off) and figured out that the code for labeling Y-axis needed some change, it did not take into the information we put for yhigh and ylow which made the labels messed up.
Fixed version of the codes:
// Draw the tick-marks
textFont (f,12);
for (int i=0;i<nytick;i++)
{
int ytick_loc = yaxis_window_hi+(i*separationy_ticks)+remaindery_ticks;
line (mid_x-tick_width,ytick_loc,mid_x+tick_width,ytick_loc); //y-axis marks
float val = (yhigh - (deltay_ticks*i)); --> where the problem was.
String sval = nf(val,1,2);
text (sval,mid_x+tick_width,ytick_loc);
}
Originally we had int val= (xhigh - (deltay_ticks*i)); which caused the tick marks to be 400, 399, 399, 399, 399 etc. I figured that xhigh had to be changed to yhigh (yhigh= 0.4) because it is for the y-axis (an obvious mistake). After change, the tick makes became all zero. We then figured out that when we do "int" in front of "val" the computer automatically changed deleted the decimal points and make every value an integer (which is zero in this case because yhigh=0.4). By changing int val to float val, the computer stopped changing the tick marks to integers and the problem was fixed. Looking at the numbers, I was disturbed by the fact that the numbers had extra zeros behind their last decimal points (ex: 0.400, 0.390, 0.380, 0.000, etc.) so I decided to fix them so that they only have two decimal points. While Dr. Bellis was talking with another student, I found a code that can limit the amount of integers in front of and behind the decimal (nf(# or variable, # of decimals to the left, # of decimals to the right)). Our final plot looks like this:
Data from AMS Experiment |
Yvonne, very nice ending to ANOTHER wonderful internship. I like how you reached a moment of clear closure.
ReplyDeleteIt was terrific having your mentor on campus. Now he knows a bit more about your academic life!
Looking forward to your last post.