How to map a room w/ ultrasonic sensor?

I have an ultrasonic sensor (HC-SR04) and I want to map its surroundings and display that info on a graphic display the same way radar works only with sound. I want to show a semi-circle on the display for the area in front of the vehicle the sensor is mounted on. The sensor will sweep back and forth from right to left to avoid obstacles and make path decisions. My question is does anyone know where I can find info on the math involved to draw the radar map correctly, or the names for the math formulas involved to aid me in my search.

Thanks.
DJ

Have a look here and here and here

You cannot accurately map anything with an ultrasonic sensor because it is not a beam, it is a cone of sound.

Look at this picture and look at the area it detects

Not only that, but if that sound hits an object at an angle, that object wont even register as being there. It only works best when the object has a flat surface facing the sensor in a perpendicular fashion.

Now if you just wanted to sweep a sensor back and forth an get a general reading of the environment, then I guess you could, but it wont be very accurate.

Although, if you are determined to use a ultrasonic sensor, then your BEST bet is to use something like the LV-EZ1 with a very narrow cone on the end...

Ps991:
You cannot accurately map anything with an ultrasonic sensor because it is not a beam, it is a cone of sound.
Not only that, but if that sound hits an object at an angle, that object wont even register as being there. It only works best when the object has a flat surface facing the sensor in a perpendicular fashion.

The first article i linked to suggests that you can detect both walls(perpendicular to beam) and (concave) corners. This can be used for mapping

Yes, but it is fairly rough, because it has a 30 degree cone read. If you were to use a narrow cone on a single sensor (like the LV-EZ1), it would be MUCH better suited to mapping a room. Thats all im saying

If you want to do some precise mapping there is a rotating laser range finder you can get for only $399:
http://www.seeedstudio.com/depot/RPLIDAR-360-degree-Laser-Scanner-Development-Kit-p-1823.html

If you were going to use a servo for sweeping anyway then a stationary laser rangefinder could be a good compromise:

They only measure out to 1.5 meters so they are best for short distances. Maybe the ultrasonic for general range can be combined with the IR for more precise range under 1.5 meters.

There is a new laser range finder on the market, for only US$ 89, with a range of 40 meters and claimed 1.5 cm precision.

I just bought one and am beginning to experiment with it, but it seems very promising. 50 Hz sample rate out of the box!

http://pulsedlight3d.com/