An introduction to single and double-acting cylinders