This exercise is intended to help students to understand how to scan the relative distance of a 3D object from an infrared sensor. The quality of the result, possible artefacts and sources of error are discussed in conjunction with the results of a previous exercise on the spatial resolution of the sensor.
We use a LEGO MINDSTORMS four-wheeled vehicle on rails with a sensor facing to the side moving up and down. The infrared sensor measures the relative (not absolute) distance to an object. Since the spatial resolution of the sensor is rather limited, as demonstrated in an earlier exercise, we get a smoothed scan of the 3D object in front of the sensor.