Think of a person looking out a window but at an angle at distance dp.
Note that the smaller window can be at either z=2 or z=4 and it is perpendicular to the person, not parallel to the larger window.
Let's have a smaller window not slanted in any way. More like my first diagram above.
I can measure from (0,0,0) the distance from the person to the larger window on z axis. Let's say dp=9.
As an example, since the smaller window could be at z1=2 or z2=4, the person would at a z=7 or z=5 of distance of the smaller window respectively.
I need to determine the size of the smaller window at z=2 or z=4 if a person is at z=dp
dp is measured form various points but always at axis y=0
Do you have coordinates for the eye position? That's something I've asked repeatedly. It's not enough to know only one distance.
If the "smaller window" is "perpendicular to the person" (which I take to mean perpendicular to the line from the eye to the origin) and "not parallel to the larger window", then it can't be said to "be at either z=2 or z=4", unless you are referring to only one point on it. (The plane z=2
is parallel to the rectangle.) I don't know what "not slanted in any way" means; I would have thought it meant parallel to the larger window (the xy plane), but you're saying it isn't.
What does it mean to say that dp is the distance "on z axis"? Clearly it is not along that axis, since the eye is not.
Now, if the eye were on the z-axis, all of this would be easy. The smaller window would be a rectangle proportional to the large one, in proportion to their distance from the eye.
And if you gave the coordinates of the eye and said that the smaller window is the intersection of a plane perpendicular to the ray from the eye to the origin, with rays from the larger rectangle, then we could work out anything you want to know about that shape -- which would not in general be a rectangle or even a parallelogram, but could be fully described.
What we lack is a real description of exactly what you are given, and what you really expect. Don't try to simplify things; that just makes it harder to communicate clearly.