Modeling traffic flow at intersections is essential for the design, control, and management of intersections. A challenging feature of microscopic modeling vehicular movement at intersections is that drivers can choose among an infinite number of alternative traveling paths and speeds. This makes it fundamentally different from structured straight road sections with lanes. This study proposes a novel method to model the trajectories of vehicles in two-dimensional space and speed. Based on optimal control theory, it assumes drivers schedule their driving behavior, including the steering and acceleration, to minimize the predicted costs. The costs contain the running costs, which consist of the travel time and driving smoothness (longitudinally and laterally), and the terminal cost, which penalizes the deviations from the desired final state. Different than conventional methods, the vehicle motion dynamics are formulated in distance rather than in time. The model is solved by an iterative numerical solution algorithm based on the Minimum Principle of Pontryagin. The descriptive power, plausibility, and accuracy of the proposed model are investigated by comparing the calculated results under several cases, which can be solved from symmetry or analytically. The proposed model is further calibrated and validated using empirical trajectory data, and the quality of the predicted trajectory is confirmed. Qualitatively, the optimal trajectory changes in the range of the shortest path and smoothest path under different weights of the running cost. The proposed model can be used as a starting point and extended with more considerations of intersection operation in the real world for future applications.