Precious diamonds can be created when carbon atoms arrange themselves into a flawlessly repeating three-dimensional crystal. Carbon can also be arranged in flat sheets that are repeated to create the gleaming grey graphite that is used to produce pencils.