Download QCChart3D 3D Charting Tools for .Net - Quinn

Transcript
4. Scaling and Coordinate Systems
ChartScale
LinearScale
LogScale
TimeScale
Transform3D
UserCoordinates
WorldCoordinates
WorkingCoordinates
PhysicalCoordinates
CartesianCoordinates
TimeCoordinates
The starting point for all drawing in a window is the .Net 2D device coordinate system.
The coordinate system uses a default device resolution of the underlying .Net window. A
.Net window maintains a viewport for the client area of the window, controlling the
position and size of the drawing area in the window. Graphics output is clipped to the
viewport, preventing graphics output in one window from over-writing graphics in
another window. The user coordinate system for the window starts at (0,0) in the upper
left corner and extends in the positive direction down and to the right.
This software maps a 3D physical coordinate system on the .Net 2D device coordinate
system. The 3D transformation pipeline looks something like this:
3D Physical Coordinates ->3D User/Device Coordinates -> 2D Screen Coordinates
The position and size of all 3D chart objects are defined using one of the 3D physical
coordinate systems (CartesianCoordinates or TimeCoordinates). A chart object is
broken into component lines and polygons, the 3D coordinates of which are transformed
through scaling operations into 3D user coordinates. User coordinates are based on the
device coordinate dimensions of the window the chart is displayed in. The 3D user
coordinates are then processed using standard 3D transformation techniques (4x4
homogeneous matrix conversions), rotating and translating the coordinates into a flat 2D
projection of the 3D image. The resulting screen coordinates match the .Net device
coordinates of the underlying .Net window.
Plot area volume and the graph area volume
The plot area volume of a graph is the 3D volume where the plot data objects (line plots,
bar plots, etc.) are drawn. The graph area volume is the entire volume of the chart
window. The graph area volume includes the plot area volume as a subset. Usually, the
plot area volume is smaller than the graph area volume and resides roughly centered in