Simulation of waveguiding and emitting properties of semiconductor nanowires with hexagonal or circular sections