Direct writing in three dimensions