A trajectory determining device comprising: acquiring means for acquiring shape data representing a shape of a three-dimensional object; generating means for generating control information on the basis of the shape data acquired by the acquiring means, the control information being information for controlling an adding device configured to add molten metal layer by layer to form the object, the control information being information representing at least one of a trajectory of the adding device and an adding condition under which the adding device adds the molten metal layer by layer, the trajectory and the adding condition both making flat an upper surface of one of a plurality of layers obtained by adding the molten metal layer by layer, the adding condition being at least one of a quantity of the molten metal supplied by the adding device and a travel speed of the adding device; and output means for outputting the control information generated by the generating means, wherein the generating means generates the control information representing the trajectory that allows adjacent beads (12a, 12b) of the molten metal to overlap to a specific overlap ratio x(%) at which the upper surface of the one of the plurality of layers has a predetermined flatness index fl, and for a trajectory segment along which adjacent beads (12a, 12b) of the molten metal do not overlap to the specific overlap ratio x(%), the trajectory segment being part of the trajectory, the generating means generates the control information representing the adding condition under which the upper surface of the one of the plurality of layers has the predetermined flatness index fl, or wherein the generating means generates the control information representing the adding condition that allows adjacent beads (12a, 12b) of the molten metal to overlap to a specific overlap ratio x(%) at which the upper surface of the one of the plurality of layers has a predetermined flatness index fl, the flatness index fl being calculated by fl = |hmax - hmin|, where hmax is the bead maximum height and hmin is the bead minimum height, and the overlap ratio x(%) being calculated by x = (ΔL/L) × 100, where L is the bead width and ΔL is the width of the overlapping portion of adjacent beads (12a, 12b). acquiring means for acquiring shape data representing a shape of a three-dimensional object; generating means for generating control information on the basis of the shape data acquired by the acquiring means, the control information being information for controlling an adding device configured to add molten metal layer by layer to form the object, the control information being information representing at least one of a trajectory of the adding device and an adding condition under which the adding device adds the molten metal layer by layer, the trajectory and the adding condition both making flat an upper surface of one of a plurality of layers obtained by adding the molten metal layer by layer, the adding condition being at least one of a quantity of the molten metal supplied by the adding device and a travel speed of the adding device; and output means for outputting the control information generated by the generating means, wherein the generating means generates the control information representing the trajectory that allows adjacent beads (12a, 12b) of the molten metal to overlap to a specific overlap ratio x(%) at which the upper surface of the one of the plurality of layers has a predetermined flatness index fl, and for a trajectory segment along which adjacent beads (12a, 12b) of the molten metal do not overlap to the specific overlap ratio x(%), the trajectory segment being part of the trajectory, the generating means generates the control information representing the adding condition under which the upper surface of the one of the plurality of layers has the predetermined flatness index fl, or wherein the generating means generates the control information representing the adding condition that allows adjacent beads (12a, 12b) of the molten metal to overlap to a specific overlap ratio x(%) at which the upper surface of the one of the plurality of layers has a predetermined flatness index fl, the flatness index fl being calculated by fl = |hmax - hmin|, where hmax is the bead maximum height and hmin is the bead minimum height, and the overlap ratio x(%) being calculated by x = (ΔL/L) × 100, where L is the bead width and ΔL is the width of the overlapping portion of adjacent beads (12a, 12b).