The AcGiViewport class provides functions that give you access to the graphics pipeline, allowing you to apply each transformation explicitly and perform the mathematics yourself. If you are manipulating entities in the graphics pipeline yourself, you use different forms of the AcGi polygon and polyline depending on where you are in the graphics pipeline.
The AcGiViewportGeometry class provides three forms for polygons and polylines, in model, eye, and display coordinates. Normally, you would use the polyline() and polygon() functions, which require model coordinates. Use polylineEye() and polygonEye() if you are going to work with eye coordinates, as shown in Examples 1 and 2. Use polygonDc() and polylineDc() if you are working with display coordinates.
The following sections contain four examples. The first example draws the same entity using model, eye, and display coordinates. Its main purpose is to demonstrate how to apply each transformation in the graphics pipeline. The second example illustrates working with eye coordinates to determine the front and back faces of a pyramid. The third example illustrates working with display coordinates to draw an entity in a size relative to the size of the current window. The fourth example shows how to determine the polyline with the fewest segments that is visually indistinguishable from one with more segments.