Saturday, October 26, 2013

graphics.h in Ubuntu 13.04


While studying in my final year, I had to deal with Graphics Lab. I was working on a program that used the library file "graphics.h". I tried to compile the program using g++ compiler with following code.

g++ midpointcircle.cpp -lgraph

But unfortunately it didn't work. It produced some kind of error. I googled the error and came to know that graphics.h is not available in the standard g++ library.

So, what's the solution.
You need to install some extra packages.
1. Run the following command in the terminal to install necessary tools.
     sudo apt-get install build-essential


2. Then install some extra packages using the command
  sudo apt-get install libsdl-image1.2 libsdl-image1.2-dev guile-1.8 guile-1.8-dev libaudiofile-dev libesd0-dev libdirectfb-dev libdirectfb-extra libfreetype6-dev libxext-dev x11proto-xext-dev libfreetype6 libaa1 libaa1-dev libslang2-dev libasound2 libasound-dev

3. Download the package "libgraph-1.0.2.tar.gz" from the given link :
download.savannah.gnu.org/releases/libgraph/
4. Extract the package to the Home Folder

5. Run the following commands to install the package
cd libgraph-1.0.2
./configure
sudo make
sudo make install

sudo cp /usr/local/lib/libgraph.* /usr/lib


Now the installation is complete.

Try executing the file again
g++ midpointcircle.cpp -lgraph

I hope it works!!!



Saturday, July 23, 2011

NASA's next mission-------send astronauts to asteroids!!!!!!!!!!!


This file image released by the Jet Propulsion Laboratory on Monday, July 18, 2011 shows the asteroid Vesta, photographed by the Dawn spacecraft on July 17, 2011. The image was taken from a distance of about 9,500 miles (15,000 kilometers) away.

With the space shuttle now history, NASA's next great mission is so audacious, the agency's best minds are wrestling with how to
The challenges are innumerable. Some old-timers are grousing about it, saying going back to the moon makes more sense. But many NASA brains are thrilled to have such an improbable assignment.
And NASA leaders say civilization may depend on it.
An asteroid is a giant that orbits the sun, like Earth. And someday one might threaten the planet.
But sending people to one won't be easy. You can't land on an asteroid because you'd bounce off - it has virtually no gravity. Reaching it might require a to harpoon it. Heck, astronauts couldn't even walk on it because they'd float away.
NASA is thinking about jetpacks, tethers, bungees, nets and spiderwebs to allow explorers to float just above the surface of it while attached to a smaller mini-spaceship.
Such a ship - something like a "Star Trek" shuttlecraft melded with a deep sea explorer with pincer-like arms- is needed just to get within working distance of the rock. That craft would have to be big enough for astronauts to live in for a week or two. They'd still need a larger habitat for the long term.
It would take half a year to reach an asteroid, based on current possible targets. The deep space propulsion system to fly such a distance isn't perfected yet. Football-field-sized would help, meaning the entire mothership complex would be fairly large. It would have to protect the from killer solar and bursts. And, they would need a crew capsule, maybe two, for traveling between the asteroid complex and Earth.
And all those parts - mini-spaceship, habitat/living area, crew capsule, and propulsion system - would have to be linked together in the middle of space, assembled in a way like the but on a smaller scale.
Beyond all those obstacles, NASA doesn't even know which asteroid would be the best place to visit.
 pull it off: Send astronauts to an asteroid in less than 15 years.
The story begins with why NASA would want to go to an asteroid. The agency has sent small spacecraft off to study asteroids over the years and even landed on one in 2001. Just last week, a space probe began orbiting a huge asteroid called Vesta, which lies beyond Mars.
Scientifically, an asteroid is a remnant from the birth of the solar system, offering clues about how our planetary system began. Logistically, NASA wants to go to Mars, but that is distant and more difficult. So the argument is that going to an asteroid is a better testing ground than returning to the moon.
The reason NASA Administrator Charles Bolden and others give is that this mission could save civilization. Every 100 million years or so an asteroid 6 miles wide - the type that killed off the dinosaurs- smacks Earth.
If NASA can get astronauts to an asteroid, they can figure out a way of changing a potential killer's orbit.
If you are going to reroute a killer asteroid, first you have to know one is coming and where it is now. And that's also a problem for NASA's mission. Astronomers figure there are about 50,000 asteroids and comets larger than 300 feet in diameter and they only know where fewer than 1 percent of them are, Yeomans said. NASA is focusing on rocks that size or larger that would come relatively close to Earth in the 2025 time frame.

At the moment, there are only a handful of asteroid options and they all have names like 1999AO10 or 2009OS5. NASA deputy exploration chief Laurie Leshin figures NASA will have to come up with, not just more targets, but better names. Getting to one will be even tougher.

Huge powerful rockets are needed to launch spacecraft and parts out of Earth orbit. NASA promises to announce its design idea for these rockets by the end of the summer and Congress has ordered that they be built by 2016. It will take two or three or maybe even more launches of these unnamed rockets to get all the needed parts into space.
The crew capsule is the farthest along because NASA is using the Orion crew ship it was already designing for the now dead moon mission and repurposing it for deep space. NASA has already spent $5 billion on Orion.

Once in space, the ship needs a propulsion system to get it to the asteroid. One way is to use traditional chemical propulsion, but that would require carrying lots of hard-to-store fuel and creation of a new storage system.

Another way is to use ion propulsion, which is efficient and requires less fuel, but it is enormously slow to rev up and gain speed. It would also require an electrical ignition source, thus the giant solar power wings.
If NASA goes to ion propulsion, the best bet would be to start the bulk of the ship on a trip to and around the moon without astronauts. That would take a while, but if no one is on it, it doesn't matter, Joosten said. Then when that ship is far from Earth, astronauts aboard Orion would dock and join the rest of the trip. By this time, the ship would have picked up sufficient speed and keep on accelerating.

Orion isn't big enough for four astronauts to live on for a year. They would need a larger space habitat, a place where they can exercise to keep from losing bone strength in zero gravity. They would need a place to store food, sleep and most importantly a storm shelter to protect them from potentially deadly and radiation-loaded solar flares.

Much of the habitat could be inflatable, launched in a lightweight form, and inflated in . On Friday, NASA announced a competition among four universities to design potential exploration habitats.

Wednesday, December 8, 2010

Mass-cut by the class!!!!!

Today, it was an exciting and enthrilling day at the college. The day started with lecture on mathematics. Maths professor came late as he was on exam duty.That didn't mind as we enjoyed by playing songs in the mobile and singing folk songs in groups. After that I came to know that the exams are postponed to 4th january, so now  i can go to my home place and meet my parents. Next lecture was of Graphics, which was very mindful subject. But sir was absent ....Another sir came, and taught as mechanics...it was a nice class. Today , all the boys in the class had decided to mass bunk the the last two periods which was Physics and Chemistry. Almost all the boys bunked the class except two or three....bhujjies...

We decided to play cricket...teams were distributed and ground was well set.. It was decided to play a 8 over match.. Our team was the first to bowl.The field was well spread and the batsman and bowler were ready... Umpire called and the play started...First bowl was a high class bouncer....It was steamy hot day with sun shining at its brightest... As the play went on , everyone feeled the sweat..First innings was over...batting team played well...we got a reasonable target of 30 runs in 8 overs...but it all seemed simple when the star batsman of the class make showed his class...He was a district level player and it showed in his batting....we easily won the game due to his well versed skills in batting. We reached the target in just 5 overs by losing just 1 wicket...As per my performance, i bowled two overs giving just 2 runs and taking 2 wickets. All an all a very nice day for me.

This didn't end here. We decided to play another match again of 8 overs each.This time we were the first to bat. This time the opposition team were high in their spirits...We lost early wickets....and our run rate suffered.... i came to bat in the 7th over and scored a few runs...i was unbeaten at 5 runs at the end...our team did reasonably well after the early hiccups....We scored 38 runs in the 8 overs.....It was a very nice opportunity to white wash the two game series.....and started well for us as we drew the first blood by taking the wicket in the very first over. Then their was a nice little patnership which didn't last long.. I bowled the 4th over and took the wicket in the very first bowl....Then came the rep of the class...a giant figure...but a nice hearted man....After some few hits he got out and they were in deep trouble....In the last over they needed 16 runs. they tried to score but didn't succeed and we won again...

It was the first time that whole class bunked the class for playing cricket...it was a nice experience...This showed the team spirit within the class... Even during the match, their were no steamy incidents or chit-chats between anyone...This showed the strength and collectiveness of our class. All played with the true sense of the game. Oh!! i should not forget some ppl (funny figures), who cracked some jokes and entertained as during the game... making it even more interesting...At the of the day, we all went to the college canteen, and had tea...

And now i am here sharing this little experience with u all, sitting in the college computer lab..

Sunday, December 5, 2010

OJO BOARD in the hostel

Yesterday was quite interesting night!!!!
11pm:

Some of my hostel mates came up with a weird idea of calling the spirits by using the OJO BOARD.....It sounds interesting but really superstitious....Anyways, a very nice way to pass the time....everyone in the hostel gathered inside the room....with candles,ojo boards,etc....everyone switched off their mobile phones and kept away all religious stuffs out of the room.Everyone looked really interested in this....Apart from those who thought its really stupid to do this kinda stuff..

 12pm :

     I have no belief in all this.So, i kept away..but i decided to see whts happening inside through the window.I too k my mobile to capture some videos and pics...
I saw the OJO BOARD was kept on the table surrounded by candles and lights were switched off....ALL these things were happening just in front of my room....Jack was the main man....he was concentrating really hard to call the spirits....As the time passed, everyone looked little bit afraid..i took some pics of this incident....After some time, jack's hands started to move on the board.....a sign that the spirit is coming...(i don't know whether it was his trick, anyways looked quite interesting)....jack tried to communicate with the spirit and succeded....

Conversation:
JACK :  WHAT's ur name??
SPIRIT : Lucifer!!
JACK : R u a good spirit?
SPIRIT: no!!

Jack was really afraid when came he came to know this....he was trembling....he lost his concentration and spirit went away.....
here ends the story of the night.....
Some said all this is just to make them fool and criticised jack. Some others believed it. But nobody except Jack knows the truth....