An appropriate shape designing of a snowboard course (currently known as a "halfpipe") is the precondition to achieve higher scores in a competition. We divided the whole process into four procedures: Air, Transition Processes and Pump, Twist Techniques. Elliptical transition of a halfpipe was put forward instead of the traditional circular one to optimize the shape, by simplifying this problem into some dynamical partial differential equations. We proved three theorems and used numerical methods to calculate the optimal value. The optimal shape we designed is mainly based on the initial velocity and combines all the known targets into two calculable physical variables. Simulation with common parameters from FIS indicates that our results accord with the practice and gives us the optimal shape of the snowboard courses for various levels of competition with different initial velocities. Plenty of sensitivity analysis shows that our designing is robust.