Plotting points along a 3D line segment
You shouldn’t need to use any trigonometry here at all. If you get the vector from v1 to v2 and divide it by the number of points you want along the line, each subsequent point is v1 + (that vector) × (the index of the point). Works in any number of dimensions, faster than the trigonometric approach.
v1 = Vector(100, 200, 300)
v2 = Vector(500, 400, 300)
steps = 25 # or however many subdivisions you want: int(length(Line(v1, v2))) if you want an equivalent to the original
stepAmount = Vector((v2.x - v1.x) / steps, (v2.y - v1.y) / steps, (v2.z - v1.z) / steps)
points = list()
for i in range(steps + 1)
    x = v1.x + stepAmount.x * i
    y = v1.y + stepAmount.y * i
    z = v1.z + stepAmount.z * i
    points.append(Vector(x, y, z))