Spiral galaxy simulator using the density wave theory