viernes, 26 de octubre de 2007

Sun position over earth

Several months ago, I was thinking in a very special gift to a very special person and I came up with a great idea (at least for me it still is). I am a mechatronic engineer and I love to create and invent stuff. All regarding physics and the understanding of how the reality works really passionates me.
What I came up with, was to make some kind of structure that could only do certain things ONLY in an specific day and time of the year. I wanted to do something like the Mayans did in Chichen Itzá which was to show a serpent crowling over the pyramid in an specific day of the year. My idea was to show an image and with the use of electronics and some mechanics to perform somthing symbolic about that day. Also, I wanted to be 100% energy self-sufficient(no batteries or any other source besides the sunlight). The hardest part was to do the calculations for getting the exact angle at which the sun´s beams hit the earth for a specific date and time. I started reading a lot and found a great webpage where all symplifications where made and you just only needed to understand what you were using. This is the page where I got most of my calculations. http://answers.google.com/answers/threadview?id=782886
There are lots of pages which you just need to choose the day and the coordinates of the location and they´ll give you the angles you need, but I didnt want the answer just that simple so I created my own program (The position coordinates I got them from Google earth).
Because of several reasons, I didnt finish my special gift. I made the structure and havent tested yet because the day hasnt arrived yet. I made it so that it could work at a specific time and in two different cities.
I still think is a great gift and what should do is to finish it! Not for anyone but for me. I think the only one who can appreciate it and get something more than giving away is me. Still have to work in my electro-mechanic system so that I can amaze myself and I´ll change the day to my birthday so that nature has a material gift for me. =D

domingo, 21 de octubre de 2007

Random average ¿?

One day, I just thought of what the average of n numbers would give. What I thought first was that there would be no constant average thus there were random numbers, but when I did the experiment I prove myself to be wrong. I still dont know exactly the reason, but as I remember of my probability course it had to be something regarding all possibilities contained in the gauss bell.
So, the list of random numbers where possibilites not repeated inside the bell. So the Average had to be the middle of the bell; 0.5
It is a interesting thing I guess, you can try it! Just fill out n random numbers in excel and take the average of it and you'll see!!

Talking to a friend of the experiment, he found it quite courious. He then sujested me to try it with PI decimals. It bump me again the couriousity and I made a simple C++ program to see what was the result. I first needed to find a quite big amount of PI decimals(which is also of great interest of me, but still havent do it) so I downloaded a list from this page http://www.uoguelph.ca/zoology/devobio/210labs/MeiosisQuiz/pi.html which has about 100,000 decimals.
I didnt like quite much the result. I got as a result 4.49 and with a 2.87 variance. I guess if more PI numbers are introduced the average would tend to 5, but not quite sure!

With the help of my friend, he made used the Matematica software and created the following graph using 1000,000 digits of PI.This proves that it tends to 4.5 which if you analize it, it is the mean of 0-9 not 1-9(which is 5).

If you want to try it, here is the code.
(oops the variables are in spanish! sorry..!!)
mhmmmm couldnt upload the code,, if you need it,, i'll send it to you!
sorry!