Simulated Optical Properties of Gold Nanocubes and Nanobars by Discrete Dipole Approximation