Locate Target and Eye
Locate Target and Eye
Normal D3PLOT viewing effectively positions the model in front of a stationary camera, then rotates, pans and enlarges it to place the desired region in the field of view of the lens.
However it is possible to set the "eye" (camera) position and also the "target" point on the structure at which the camera is pointing, and D3PLOT will compute the viewing transformation required to give the image from this point.
There are three components in a "Locate target and eye" definition:
| Target position | This is the coordinate in space at which the camera is pointing. |
| Eye position | This is the coordinate in space at which the camera (eye) is located. |
| "Up" vector | This is the vector defining "which way is up". Panning the camera up and down would move it up and down this axis. |
The distance between the camera (eye) and target points is implicitly the current perspective distance, and this is reset when you the view. Perspective is switched on automatically if this is not already the case.
Both target and eye positions may be defined explicitly as coordinates in space, or you may screen-pick a node and its coordinate will be extracted.
By default D3PLOT tries to deduce the "Up" vector automatically, but you can override this by choosing a global vector, or by defining your own arbitrary vector.

The relationship between Perspective Distance and Scale
If you use the "locate target and eye" feature you will almost certainly position your eye fairly close to the structure, which will bring you much closer than the normal perspective distance set by D3PLOT which is 3x the diagonal of the bounding box around the model. When the perspective distance becomes small the fore-shortening effect it causes becomes much more obvious.
![]() | ![]() |
| In this image the target point is the dummy's nose, and eye point has been placed on the steering column just behind the wheel. | In this image the target point is the same, but the perspective distance has been increased by a factor of three, effectively moving the eye point backwards out of the paper. |
Photographers will recognise that the perspective distance is, quite literally, the distance between subject and camera, whereas the scale is the "zoom power" (or, more precisely, focal length) of the lens on the camera. Both images above show the dummy head at approximately the same scale , but the difference in perspective distance gives rise to very different images.
If you are attempting to select viewing attributes to match an existing image you may find this quite difficult to achieve by hand since there are 11 independent variables to match in such an operation:
- Camera position (x,y,z coordinate = 3 variables)
- Vector from camera to subject (vector = 3 variables)
- "Up" vector (vector = 3 variables)
- Scale (1 variable)
- Perspective distance (1 variable)
The function below will calculate this for you when given at least four points on the image and structure to match.

