Computer simulations of liquid crystals and polymers