A computer-implemented method of determining a direction and spacing of fiber paths for a composite ply of a composite layup relative to a defined surface of the composite ply and a fiber angle definition having one or more fiber angles, comprising the steps of: generating a surface approximation of the defined surface comprising a triangulated surface including a mesh of triangles, the composite ply having at least one of the following characteristics: the defined surface has a non-planar contour, the fiber angle definition comprises non-constant fiber angles; defining on the triangulated surface a first unit vector field establishing a 0-degree direction for each one of the triangles, the 0-degree direction being a rosette direction from which the one or more fiber angles of the fiber angle definition of the composite ply are measured; defining on the triangulated surface a second unit vector field by rotating, through the one or more fiber angles specified in the fiber angle definition, the first unit vector field about surface normals respectively corresponding to the triangles; defining on the triangulated surface a third unit vector field representing a direction of a gradient of a potential function, by rotating the second unit vector field 90° about the respective surface normals; determining a magnitude function to scale the third unit vector field over the triangulated surface to create a non-unit vector field to enable fitting the potential function to the second unit vector field, by minimizing a curl of the non-unit vector field; determining the potential function having contour lines, wherein the potential function is a first potential function that is determined by performing a least-squares fit such that the direction and magnitude of the gradient of the first potential function best approximate the direction and the magnitude function of the non-unit vector field; performing a normalization of the potential function by applying a scaling function to the potential function such that the contour lines are uniformly distributed across the triangulated surface; and using the contour lines of the normalized potential function as fiber paths for laying up courses of composite material along the fiber paths to fabricate the composite ply. generating a surface approximation of the defined surface comprising a triangulated surface including a mesh of triangles, the composite ply having at least one of the following characteristics: the defined surface has a non-planar contour, the fiber angle definition comprises non-constant fiber angles; defining on the triangulated surface a first unit vector field establishing a 0-degree direction for each one of the triangles, the 0-degree direction being a rosette direction from which the one or more fiber angles of the fiber angle definition of the composite ply are measured; defining on the triangulated surface a second unit vector field by rotating, through the one or more fiber angles specified in the fiber angle definition, the first unit vector field about surface normals respectively corresponding to the triangles; defining on the triangulated surface a third unit vector field representing a direction of a gradient of a potential function, by rotating the second unit vector field 90° about the respective surface normals; determining a magnitude function to scale the third unit vector field over the triangulated surface to create a non-unit vector field to enable fitting the potential function to the second unit vector field, by minimizing a curl of the non-unit vector field; determining the potential function having contour lines, wherein the potential function is a first potential function that is determined by performing a least-squares fit such that the direction and magnitude of the gradient of the first potential function best approximate the direction and the magnitude function of the non-unit vector field; performing a normalization of the potential function by applying a scaling function to the potential function such that the contour lines are uniformly distributed across the triangulated surface; and using the contour lines of the normalized potential function as fiber paths for laying up courses of composite material along the fiber paths to fabricate the composite ply.