Episteme - dmlc - Presentation Symbols

Applying a View to Presentational Symbols

All of the coordinates in the presentational ymbol table are expressed in 3D world coordinates. Before the compiler can use these tables to generate an image, all of these coordinates must be transformed into image coordinates via the a view stored in the view table during the previous step. As mentioned before, the extended ePiX presentational model implements this type via the epix:pipeline. Since the formal interface for a diapre:view will not be set until other presentational models are introduced, we walk through the epix:pipeline to provide a feel for how a view transforms world coordinates to image coordinates.

The extended ePiX graphics pipeline takes world coordinates and transforms them into image coordinates via a series of matrix transformations. The epix:camera, epix:perspective, epix:projection, and epix:image data types encapsulate parameters for initializing these matrices. Each pipeline needs to have an id attribute, making it possible in future versions to apply multiple views to the same world model within the same diagram template. By modifying the pipeline, one can generate diagrams of the same presentational model from different perspectives.

	...
	<diapre:view>
	  <epix:pipeline id='view1'>
	    <!-- Define world coordinates -->
	    <epix:world coord_sys='cartesian'/>

	    <!-- Define the Camera View -->
	    <epix:camera>
	      <epix:camera_position>
	        <epix:x>0</epix:x>
	        <epix:y>0</epix:y>
	        <epix:z>10</epix:z>
	      </epix:camera_position>
	      <epix:lookat_point>
	        <epix:x>0</epix:x>
	        <epix:y>0</epix:y>
	        <epix:z>0</epix:z>
	      </epix:lookat_point>
	      <epix:viewup_vector>
	        <epix:x>0</epix:x>
	        <epix:y>1</epix:y>
	        <epix:z>0</epix:z>
	      </epix:viewup_vector>
	    </epix:camera>
	
	    <!-- Define the Perspective/Viewport-->
	    <epix:perspective>
	      <epix:near_plane>1</epix:near_plane>
	      <epix:far_plane>1</epix:far_plane>
	      <epix:viewport width='1' height='1'/>
	    </epix:perspective>
	  
	    <!-- Define Projection to Near Plane-->
	    <epix:projection type='orthographic'/>

	    <!-- Define Image Coordinates -->
	    <epix:image coord_sys='cartesian'>
	      <epix:width>400</epix:width>
	      <epix:height>400</epix:height>
	    </epix:image>

	  </epix:pipeline>
	</diapre:view>
	...
      

Applying the presentation views to the presentation symbols table, we obtain a new table, the presentation view symbol table, whose presentational objects are expressed in image coordinates. Here are presentational symbols before and after applying the view shown above.

	
nametypeobject
oepix:point0.0 0.0 0.0
aepix:point-2.49 -2.49 0.0
depix:point2.49 2.49 0.0
abcdepix:elliptical_arcEllipticalArc: ...
	
nametypeobject
oepix:point200.0 200.0 1.0
aepix:point100.0 200.001 1.0
depix:point299.9 199.999 1.0
abcdepix:elliptical_arcEllipticalArc: ...