Assuming a simplified scenario, e.g. fixed camera looking down the z-axis, it’s common to have a front and back plane. Stuff in front of the front pane (the screen) or behind the back one aren’t shown. Typically these are normalized to [0, 1], so you can check for less than 0 or more than 1 to do the filtering. Then you can calculate this normalized z as:
(z = 0 is the camera itself, Front > 0, Back > Front)
z01 = (z - Front) / (Back - Front)
You’ll want some reference, probably the front pane, where objects are the “true” size, and usually they’ll be centered around the middle of the screen (or at least all the projections will operate on them that way). The normalized z will come into play in finding the x and y positions at given depths…
Anyhow, that will be the idea, if your “100 points along the line” is trying to figure out where, depth-wise, a given point would be, for collisions and so on. Am I on the right track? I could give you a bunch of this math, but don’t want to type it all up if it’s not what you’re asking after. 