A diagram presents the construction using some presentational model. Traditionally the presentational model has been a static 2D geometric model showing the output of the entire construction. Digital diagrams can mimic this interaction. However, they can also extend this interaction, allowing one to step through and see how the logical meaning and the presentation of the logical primitives in the construction change over time. The diagram template's purpose is to encode the presentational decisions seen in a particular edition of a diagram. Here, we provide a concrete example of proper syntax to show how the values of attributes relate to one another.
<diapre:diagram_template id='urn:dml:tlg0552.tlg008.heath:2'> <!-- one view (for now) --> <diapre:view> <!-- View information for the presentational model chosen --> </diapre:view> <!-- style information --> <diapre:styles id='heathStyles'> <!-- one or more references to presentational primitives--> <diapre:style ref='o'> <diapre:color>red</diapre:color> </diapre:style> </diapre:styles> <!-- zero or more presentational parameter values --> <diapre:value> <epix:point id='o' diapre:param_id='1'> <epix:x>1</epix:x> <epix:y>2</epix:y> </epix:point> <diapre:value> <!-- one or more presentational values --> <diapre:value> </diapre:value> </diapre:diagram_template>
The reference to this encoded edition of a diagram is given by the value of the id
attribute (a DML-URN) on the diagram_template
tag. Here heath
is the edition identifier and we are working with proposition 2. The diapre:view
tag encloses view information for the chosen presentational model. Under the extended ePiX geometri model, this wraps a declaration of an epix:pipeline
type. Styling information for each presentational primitive is found in the diapre:styles
section of the template. By associating a style with a given primitive, attributes such as color, label text, and visibility can be controlled. Finally, we have a sequence of one or more diapre:value
tags enclosing presentational type variable declarations, references, and operators. Two editions of Archimedes' FB, Prop. 7 show how a diapre:view
and diapre:style
change the presentation of a construction.
When a construction references another construction, it becomes necessary to use an instance of an existing diagram in another diagram. This occurs in Archimedes, Floating Bodies, Book I when he references construction 3 to set up construction 5. However, we also want to allow for the modification of certain primitives, so as to implement the
logical constraints of the construction in terms of the presentational model. The mechanism that allows for this is the notion of a template parameter. Template parameters are declared via the diapre:param_id
attribute and are set via the diapre:param_ref
attribute. The number of these parameters reflects the degree of presentational freedom one has when creating a diagram instance based upon this template. Here we will show the declaration of a presentational parameter in the diagram template for Heath's edition of Proposition 3 in Archimedes' Floating Bodies, Book I. Then we will illustrate how this parameter is referenced and then set in Proposition 5. The corresponding diagrams are shown alongside the markup.
<!-- Diagram Template for Prop 3--> <diapre:diagram_template id='urn:dml:tlg0552.tlg008.heath:3'> ... <diapre:value> <epix:scalar id='ul_efgh_den' diapre:param_id='3'>0.65</epix:scalar> </diapre:value> ... </diapre:diagram_template>
<!-- Diagram Template for Prop 5--> <diapre:diagram_template id='urn:dml:tlg0552.tlg008.heath:5'> <diapre:value> <epix:scalar id='ul_efgh_den' diapre:param_id='3'>0.7</epix:scalar> </diapre:value> ... <diapre:value> <diapre:diagram_instance id='c3' ref='urn:dml:tlg0552.tlg008.heath:3'> <!-- Other parameters controlling shape of solid efgh--> <epix:scalar ref='ul_efgh_den' diapre:param_ref='3'/> </diapre:diagram_instance> </diapre:value> </diapre:diagram_template>
We have just modeled Archimedes' use of a construction within another construction as parameter passing between two procedures, the procedures
expressed by the diagram templates for Heath's presentation of constructions 3 and 5. In Proposition 5, the shape of the solid efgh
also
changes presentationally, and so parameters are passed to accommodate this as well.