segmentation chapter

segementation chapter written needs to be reviewed and formuleted
awesome also a picture of the code has been put in