An automatic viewpoint selection method based on the particle swarm optimization is proposed in this paper. The method introduces artificial intelligent techniques to design transfer function and select optimal viewpoint. By the method, the search for the transfer function and the optimal viewpoint are reformulated as a global optimization problem to decrease the reluctant interactions and computations. With this method the optimal position of the observation data is provided. This method improves the visualization efficiency by displaying as much information as possible on the screen.