I recently built a lamp from scratch, here are some pictures of the process.
The final result. I used the cover from an old iMac G4 that was lying around the lab for the shade.
1. First step of the build. It's made of two aluminium plates and a square aluminium bar.
2. The C clamp will be used to hold the lamp to a table. I chose a 1 inch clamp, that's enough for most tables.
3. the screw I used to create this first axis is threaded on only half of its length, so the top aluminium bar can rotate freely while the screw is held in place in the bottom bar.
4. This piece will hold the two bars that create the second axis, which allow the forward and backward movement.
5. you can see here the second axis, these are two 1/2 inch by 1 foot square aluminium tubes.
6. The joint between the second and third axis.
7. Just like the second axis, the third axis is made of aluminium tubes. This axis allows the up and down movement of the lamp.
8. This last piece will allow the shade to be installed. As you can see on the two pictures below, I used the cover from an old iMac G4 that was lying around the lab.