The drawings contained in Recommendation have been done in Aautocad.
Recommendation T.150
 TELEWRITING TERMINAL EQUIPMENT
TABLE OF CONTENTS
This Recommendation consists of four parts, combined in one document
SCOPE
PART 1 – Fundamental characteristics
  1	Introduction
  2	Definitions
  3	References
  4	Presentation functionalities
  5	Principles of telewriting coding
PART 2 – Telewriting together with telephony
   1	General
   2	Main characteristics of the basic terminal
   3	Presentation functionalities of the basic terminal
   4	Transmission for the basic terminal
   5	Transmission blocks
   6	Transmission procedure
   7	Coding identifier
   8	Communication control, general requirements
   9	Communication control commands
  10	Description of the communication process
PART 3 – Zone coding
   1	General
   2	Presentation elements
   3	Zone coding description
   4	Specification of terms used in coding
   5	Specification of the coding
   6	A coding example
   7	Data structure
   8	Temporary pen–stop
   9	Control commands
  10	Summary code table
  11	Summary transmission data format
  12	Zone coding basic terminal

PART 4 – Differential chain coding
   1	General
   2	Presentation elements
   3	Description of the coding
   4	Incremental mode mechanism
   5	Change of coding parameters
   6	Coding formats
   7	Incremental mode coding format
   8	Displacement mode coding format
   9	Encoding of the primitives
  10	Example of differential chain coding
1	Scope
	This Recommendation specifies technique–oriented characteristics of telewriting and the application of telewriting in combination with voice communication. Service–oriented requirements are defined in Recommendation F.730. In the development of this Recommendation, compatibility with other telematic services is taken into account. This Recommendation is structured in four parts:
Part 1 –	Fundamental characteristics
Part 2 –	Telewriting together with telephony
Part 3 –	Zone coding
Part 4 –	Differential chain coding.
Part 1 – Fundamental characteristics
1	Introduction
1.1	Telewriting is a communication technique that enables the exchange of handwritten information through telecommunication means. The handwritten information may consist of text in handwriting, drawings, diagrams, etc.
1.2	By means of telewriting terminal equipment, the TRACE of the writing instrument as produced at the sending side, is reproduced at the receiving side including the effect of movement.
1.3	In the sending part of the terminal the handwritten input information is converted into a digital signal: the coded representation of the handwritten information. Next, this digital signal is converted into a signal suitable for transmission.
1.4	In the receiving part of the terminal the received signal is converted into a digital signal, corresponding with the coded representation as described in above. From this digital signal, the handwritten information is reproduced.
1.5	The reproduction of the handwritten information can take place on a screen, on paper or both. In this Recommendation, the characteristics of communication through telewriting are defined with respect to the image on a screen (soft copy). Reproduction on paper (hard copy) is considered to be an optional function under local control.
1.6	Storage may take place between the writing (the input process) and the reproduction (the output process). When retrieved from a store, the message will appear on the receiver's screen in the same way as in the case of a direct connection.
1.7	A page of handwritten information (or part of it) could be reproduced as a still picture. This application, however, is not covered in the present text.
1.8	Telewriting can be used in various ways:
–	as independent communication technique,
–	in combination with voice communication through a telephone network,
–	in the context of teleconferencing,
–	in the context of information retrieval.
2	Definitions
2.1	telewriting image
	A collection of telewriting presentation elements, to be displayed together.
	Note – The telewriting image can exist in visible form at the output device, or in the form of a coded representation.
2.2	presentation element
	Basic graphic element used to construct an image.
	Examples of telewriting presentation elements are: trace, closed area, background.
2.3	coding rectangle
	Rectangular area representing the coding space in horizontal and vertical direction, available for coding of a telewriting image.
2.4	image area
	(previously: text area)
	Rectangular part of the display area, to be considered as the image of the coding rectangle.
2.5	background
	Presentation element being a rectangular area with the same size as the image area, acting as a reference area on which telewriting foreground information can be presented.
2.6	trace
	Presentation element being a curve of an arbitrary shape, starting from a defined position, being completed incrementally and ending at a defined position.
2.7	closed area
	Presentation element being an area enclosed within one trace which constitutes a closed line.
2.8	marker
	Marked representation of a single position in a telewriting image.
	Note – A marker is not a permanent part of a telewriting image, but exists only as long as it is activated.
2.9	attribute
	A particular property which applies to a presentation element or to a group of presentation elements.
	Examples: line thickness, colour.
3	References
	In the text of this Recommendation the following Recommendations/standards are referred to:
–	Rec. F.730: Service oriented requirements for telewriting applications.
–	Rec. T.101: International interworking for videotex services; Annex C, data syntax II.
–	Rec. V.21: 300 bits per second duplex modem standardized for use in the general switched telephone network.
–	ISO 9281: Information processing – Identification of picture coding methods.
4	Presentation functionalities
4.1	This section describes a set of presentation functionalities. This set of functionalities is intended as a repertoire of presentation functionalities for telewriting in general. For a specific application a subset may be defined.
4.2	In the description of presentation functionalities, the concept of TRACE is being used. A trace is a curve of an arbitrary shape, starting from a defined position, being completed incrementally and ending at a defined position. Handwritten information is considered to consist of traces.
4.3	Representation of the handwritten information is accomplished by the sequential reconstruction of the individual traces. This implies that the effect of movement is retained during each reproduction.
4.4	Telewriting information is to be displayed on the display area of some output device. The display area is considered to be a two–dimensional surface.
4.5	The display area is subdivided into an image area and a border area; see Figure 1–1/T.150.

Image area

Image
area

	
 FIGURE 1–1/T.150
Subdivision of display area
4.6	The border area surrounds the image area. External form and dimensions of the border area are not specified. The presence of a border area is not mandatory. It is however inevitable in certain implementations.
4.7	The image area is rectangular. The two shorter edges of the image area have a vertical orientation, the two longer edges have a horizontal orientation. The length ratio of shorter and longer edges is 3:4.
4.8	The position of telewriting information on the display area is defined with respect to the edges of the image area.
4.9	Information on the display area is composed of presentation elements of three categories:
–	foreground,
–	background,
–	border area.
4.10	Foreground and background presentation elements are defined in the image area only.
	Border area presentation elements are defined in the border area only. The use of the border area is not defined for telewriting.
4.11	Foreground presentation elements include trace, marker and closed area.
4.12	The presentation elements have the following characteristics:
–	Trace : This is the curve as defined in § 2.6 of this part; the essence of the handwritten information is represented by one trace or by any combination of traces; the image area can contain an undefined number of traces at a time.
–	Marker : This is a marked representation of a single position; it behaves as if it is overlaid on the foreground; a moving marker does not create a trace; a marker can be switched on and off; one user can generate only one marker at a time. The image area can contain one locally generated marker and one remotely generated marker.
–	Closed area : This is the area that is enclosed within a closed trace; this closed trace is the perimeter. A trace is a closed trace if it intersects itself; a trace that is nearly closed can be converted into a closed trace, by the addition of the lacking part of the trace.
–	Background : The background is a defined reference area on which foreground information is to be imaged; if the full image area is filled with foreground information, the background is not visible.
–	Border area : The border area is independent of the information in the image area.
In case of a CRT display the border area is the remaining part between image area and edges of the display area.
In case of a cell–structured display device, the image area may coincide exactly with the display area. In that case no border area remains.
4.13	The various presentation elements can have attributes assigned to them as defined in Table 1–1/T.150.
TABLE 1–1/T.150
Attributes of telewriting presentation elements

Presentation element	 Attributes	
Trace	Line thickness, line texture, colour	
Marker	Shape, size, colour	
Closed area	Area texture, colour (interaction or area attributes with background attributes to be defined)	
Background	Area texture, colour	
Border area	Not defined	
			 Note – The concept of colour includes “intensity”.
4.14	Once an image is displayed, subsequent modification of attributes is restricted as follows:
–	trace: attributes unchangeable;
–	marker: attributes can be changed at any instant;
–	closed area: attributes unchangeable;
–	background: attributes can be changed at any instant.
4.15	In case of intersection of two traces, the image of the older trace is interrupted as far as it coincides with the newer trace.
4.16	In case of intersection of a trace and a marker, the image of the trace is interrupted as far as it coincides with the marker. After removal of the marker, the image of the original trace is restored.
4.17	With respect to erasure of foreground information, a distinction is made regarding the area in which erasure takes place:
–	full image area;
–	defined part of the image area;
–	individual traces.
4.18	Erasure of the full image area
	All foreground information in the image area is removed; the background assumes a pre–defined appearance.
4.19	Erasure of a defined part of the image area
	An area is identified either by means of a closed trace or as a defined square, within which all foreground information is to be removed including the perimeter itself.
4.20	Erasure of individual traces
	An existing trace is covered by a thicker trace with the same attributes as the background: this type of erasure is processed in the same way as a trace.
4.21	Any modification of background information can take place for the full image area only.
5	Principles of telewriting coding
5.1	Telewriting coding relates to coding of telewriting information in foreground and background and to erasure functions.
5.2	This section contains principles of telewriting coding. In Parts 3 and 4, details of telewriting coding are defined for two methods, namely zone coding and differential chain coding, respectively.
5.3	The coding is defined at the “telewriting coding interface”, TCI. This interface is introduced for ease of reference, but need not exist physically.
5.4	In the sending part of the telewriting terminal, the signal at the TCI contains all data originating from handwritten input, selection of attributes and use of erasure functions.
5.5	The signals at the TCI, both in sending and receiving parts, do not contain data pertaining to transmission or communication functions.
5.6	In the receiving part of the telewriting terminal, the signal at the TCI contains all data required to image the information in accordance with the intentions of the originator.

5.7	The concept of the TCI is illustrated in Figure 1–2/T.150.
Fig. 1–2/T.150/T0803750-89 = 7 cm

5.8	The signal at the TCI includes x and y coordinate information regarding telewriting presentation elements.
5.9	The x and y coordinates are related to a unit area of 1 × 1. This implies that the respective values of x and y always lie between 0 and 1 (0 included, 1 not included).
5.10	The origin of the coordinate system is in the lower left corner. The x–axis is horizontal, the y–axis is vertical.
5.11	The horizontal size of the telewriting image area corresponds with x = 1, the vertical size of this image area corresponds with y = 0.75. See Figure 1–3/T.150.

y = 1		 1, 1	
 y = 0.75			
			
	 Image area		

 0, 0		x = 1	
FIGURE 1–3/T.150
Position of image area within unit area
5.12	All coordinates of the telewriting information are quantized relative to a measurement grid in the unit area. The resolution of this grid determines the accuracy.
5.13	The default resolution is 512 × 512 grid units. The telewriting coding can optionally also accommodate grid resolutions of 1024 × 1024 and 2048 × 2048 grid units.
Part 2 – Telewriting together with telephony
1	General
1.1	This part of the Recommendation defines the use of telewriting in combination with voice communication through a telephone network (PSTN).
1.2	For this application, both sides of the connection must have a combined telephone and telewriting terminal.
1.3	The combined telephone and telewriting terminal should, as long as the telewriting transmission function is switched off, behave like a normal telephone set, both for incoming and outgoing calls. In this situation, the full bandwidth is available for transmission of speech signals.
1.4	During a telephone conversation, the telewriting transmission function at either side of the connection, may be switched on and off, manually or automatically.
1.5	Remark that in this part of the Recommendation “switching on and off” of the telewriting function refers to the telewriting transmission functions. Regardless of this, the telewriting equipment may be used locally, whether or not a telephone connection exists.
1.6	By means of the telewriting terminal, the user can generate information. This includes: creation of traces, marker switching on and off, movement of the marker, use of erasure functions.
1.7	In this part, distinction is made between “basic terminal” and “enhanced terminal”.
1.8	The enhanced terminal is not defined yet, but compared to the basic terminal it is anticipated to have additional capabilities regarding unattended operation, transmission facilities and presentation functionalities.
2	Main characteristics of the basic terminal
2.1	In this section, a basic terminal is defined.
	In the basic terminal a set of functions is implemented that is to be considered as a minimum requirement; thus a basic level of compatibility is defined.
2.2	A basic terminal includes a telephone apparatus, a writing device and a display device. Circuitry to implement control functions may be accommodated in a separate unit or may be included in one of the devices mentioned.
2.3	Information, generated at either side of the connection will be reproduced on the display devices at both sides of the connection.
2.4	Both sides of the connection can contribute, one after another, to the same image.
2.5	In the basic terminal, transmission of telewriting signals is accomplished through a sub–channel, segregated from the speech channel. Transmission of speech signals and telewriting signals can take place simultaneously.
2.6	Half–duplex transmission is used for conveying the telewriting signals through the sub–channel, i.e. the transmitter is prevented from sending as long as the associated receiver receives telewriting signals from the other side.
2.7	The total power level of speech plus telewriting signals should conform to the limits normally applicable to speech transmission and data transmission.
2.8	The basic terminal can assume three modes of operation. The characteristics pertinent to each mode, are described in Table 2–1/T.150.

TABLE 2–1/T.150
Modes of operation of the basic terminal
Speech only	The telewriting function remains in the OFF condition.	
Speech plus telewriting	The telewriting function can be switched ON after the establishment of a connection. Speech signals and telewriting signals can be sent simultaneously.	
Telewriting only	This mode can be switched ON after the establishment of a connection. The sending of speech signals is blocked, the power level of the telewriting signals is increased correspondingly. Reception of speech signals is still possible.	
2.9	In this Recommendation, the expression “telewriting ON” is used as a common indication for either “speech plus telewriting” or “telewriting only”.
2.10	A basic terminal may be able to continue transmission and reception of telewriting signals after termination of the human conversation. In this case, the telewriting transmission function will be switched OFF automatically after completion of the telewriting transmission. (Defined in more detail later on.)
2.11	For the coding of telewriting information, two methods are recognized for use at the sending side: tone coding (defined in Part 3) and differential chain coding (defined in Part 4).
	At the receiving side, the basic terminal should be able to properly accept telewriting signals coded according to either method.
3	Presentation functionalities of the basic terminal
3.1	The general description of presentation functionalities, as given in Part 1, § 4, applies.
	With respect to this general description certain restrictions apply, as defined in the following points.
3.2	The presentation functionalities as described for the basic terminal are to be regarded as default capabilities.
	If required, characteristics of terminals with a higher level of sophistication will be described in a section on enhanced terminal.
3.3	The basic terminal employs a monochrome display device. The writing device generates coded representations of monochrome images only.
3.4	The attributes applying to the basic terminal are given in Table 2–2/T.150.

TABLE 2–2/T.150
Attributes applying to the basic terminal
Presentation elements	 Attributes	
Image size	 Horizontal: 512 GU
Vertical: 0.75 × 512 GU
Options, the receiver must be able to accept:
Horizontal: 1024 and 2048 GU
Vertical: 0.75 × 1024 and
	0.75 × 2048 GU.	
Trace		
– thickness	Unit thickness, as used in the output device.
Options: 2 × and 3 × unit thickness.	
– texture	 Solid, no options.	
– colour	 Monochrome, as used in the output device. The receiver must be able to accept the codes of traces with colours: red, green, blue, yellow, magenta, cyan, white, black. A black trace has the same colour as the background (used for erasure).	
Closed area		
– texture	 Solid.	
– colour	 Same as background colour (used only for partial erasure). The receiver must be able to accept the codes of closed areas with colours: red, green, blue, yellow, magenta, cyan, white, black.	
Background		
– texture/colour	 No information about the background is transmitted. Background can only be imagined as dark screen. This corresponds with colour black.	
Border area	 Border area is not specified, no information about the border area is transmitted.	
Marker		
– shape	 PLUS sign; other shapes may be possible depending on terminal implementation.	
– size	 Not specified.	
– colour	 Marker colour is not transmitted; on a monochrome device the marker appears in foreground colour; on a colour device the marker may assume a colour under local control.	
Full erasure	 Black background is restored.	
Partial erasure	 1)   closed area;	
	 2)   overwriting with thicker black trace.	
GU Grid units
4	Transmission for the basic terminal
4.1	Transmission of the modulated telewriting signal takes place in a small frequency band, segregated from the speech channel. This band is referred to as the sub–channel.
4.2	The centre of the sub–channel is located at 1750 Hz. Details of the implementation are not given here, but the requirements of §§ 4.6 and 4.7 should be met.
4.3	The binary telewriting signal is converted into a signal suitable for transmission, by means of frequency shift modulation. Details are the same as those specified in Recommendation V.21 for channel 2 (the high channel).
4.4	The modulation rate is 300 Bd, the bit rate is 300 bit/s.
4.5	The V.21 requirements for channel 2 are summarized as follows: The nominal mean frequency of the transmission signal is 1750 Hz. The frequency deviation is + or –100 Hz. Consequently, the nominal characteristic frequencies are 1850 Hz and 1650 Hz respectively. The higher frequency corresponds to a binary 0.
4.6	The amount of speech signal power that can reach the local and remote telewriting receivers, should be sufficiently low to avoid errors in the demodulated telewriting signal.
4.7	The amount of telewriting signal power that can reach the local and remote telephone receivers (i.e. the loudspeaker part) should be sufficiently low to avoid disturbance of the conversation.
4.8	In the mode of operation “telewriting only”, the output power of the telewriting transmitter shall be in accordance with the requirements described in Recommendation V.21.
4.9	In the mode of operation “speech plus telewriting”, the modulated Telewriting signal should be attenuated by 4 dB with regard to the level determined by § 4.8. If experience shows that also the power of the speech signal should be adapted, relevant requirements will be included in the next issue of this Recommendation.
4.10	In the case of long–distance communication an echo suppressor may be present in the link. This will hamper the “speech plus telewriting” mode. Since, generally, disabling of the echo suppressor cannot be guaranteed to solve the problem, it is recommended to use the “telewriting only” mode, alternating with the “speech only” mode.
4.11	The telewriting data as well as communication control commands are structured in 8–bit bytes.
	For transmission, each byte is packed in an 11–bit transmission word as defined below.
4.12	The structure of each transmission word is as follows:
1startbit, binary value ZERO
8 bits representing telewriting or control data
1 parity bit
stopbit, binary value ONE.
	This structure is illustrated in Figure 2–0/T.150.

Start 	Data 	Parity 	 Stop 	
1 bit	8 bits	1 bit	1 bit	
 FIGURE 2–0/T.150
Structure of a transmission word
4.13	For the value of the parity bit, EVEN parity applies. This Recommendation does not specify any action for the basic terminal in case of reception of an erroneous parity bit.
4.14	The transmission words are conveyed in start–stop mode, i.e. the pause following a transmission word until the occurrence of the next transmission word, may in principle have any duration. However, the bits constituting the transmission word should be transmitted as a contiguous sequence at the appropriate bit rate.
4.15	In addition to its task of transporting bits, the data send signal may assume one of three possible states:
–	MARK signal: a binary ONE condition, with a duration significantly longer than a bit period.
–	SPACE signal: a binary ZERO condition; this condition is not used in the framework of this Recommendation.
–	Carrier OFF: no send signal present.
5	Transmission blocks
5.1	To define the transmission structure, the concept of transmission block is introduced. In the general case, a transmission block contains transmission words and MARK signals. However, also transmission blocks containing MARK signals only may occur.
5.2	The beginning of a transmission block is identified by the occurrence of one out of two defined combinations of MARK signal and carrier OFF condition, referred to as start combination No. 1 and start combination No. 2.
5.3	The start combinations are defined as follows:
–	start combination No. 1	carrier OFF during at least 130 ms, followed by
				MARK signal of 100 ± 20 ms followed by
				carrier OFF during 100 ± 20 ms followed by
				MARK signal of 200 ± 20 ms.
–	start combination No. 2	carrier OFF during at least 130 ms, followed by
				MARK signal of 400 ± 20 ms.
	See illustration in Figure 2–1/T.150.
	The use of these start combinations is defined later.
Figure 2–1/T.150/T0803760-89 = 7 cm

5.4	Immediately following the start combination of a transmission block, one of the following signals should be sent:
–	a MARK signal
–	a single transmission word
–	a sequence of transmission words.
	Between any two subsequent transmission words, a MARK signal may occur, representing a pause in the writing process.
5.5	Every transmission block is terminated by a MARK signal of 500 ± 20 ms. The MARK signal is to be followed by a carrier OFF condition of at least 130 ms.
5.6	The MARK signals representing pauses may have various durations, determined as follows:
–	during PEN DOWN and absence of other telewriting activity, the MARK signal may continue without limitation;
–	after PEN UP the terminal will apply a limit of 500 ± 20 ms. Within this limit the telewriting activity may continue without procedural steps. If the limit expires, the carrier will be switched OFF. Thus the transmission block is automatically terminated by the terminal. Sending of further data requires the start of a new transmission block.
5.7	The periods between transmission blocks are indicated by carrier OFF conditions.
5.8	The formats of transmission blocks are summarized in Figure 2–2/T.150.
Fig. 2–2/T.150/T0803770-89 = 4 cm

6	Transmission procedure
6.1	Prior to actually sending telewriting data, the terminal is to decide whether it functions in MASTER mode or in SLAVE mode.
	In case of a transmission collision, the master terminal has transmission privilege over slave terminals.
6.2	The terminal decides about the master/slave status by sending the start combination No. 1 and observing the received signal.
6.3	If the terminal, engaged in sending start combination No. 1, detects a received carrier signal at its receiver input (during a carrier OFF interval) it decides to be a slave and it postpones further attempts to send data. See Figure 2–3/T.150.
6.4	If the terminal does not detect a received carrier signal during the sending of the start combination, it decides to be a master and continues sending. See Figure 2–3/T.150.
6.5	In the case that only one terminal generates telewriting data, this terminal assumes the master status. The receiving terminal remains in the slave status.
6.6	As a header for the subsequent transmission blocks, a master terminal uses start combination No. 2, a slave terminal uses start combination No. 1. See Figure 2–4/T.150.
6.7	The master/slave status decision in a given terminal remains valid until it is cancelled as follows:
–	A master terminal becomes a slave if it is not engaged in sending at the moment that another terminal sends start combination No. 1.
–	A slave terminal becomes a master terminal at the moment that it sends a start combination No. 1 and no receive carrier signals are being detected.
–	A master status is cancelled by “telewriting OFF”.

Fig. 2–3/T.150/T0803780-89 = 25 cm

Fig. 2–4/T.150/T0803790-89 = 25 cm

7	Coding identifier
7.1	In the communication control procedures, the existing of two coding methods is recognized, i.e. zone coding and differential chain coding respectively.
	The method actually used is identified by the coding identifier PCE. (PCE = picture control entity).
	A terminal receiving signals according to either method will be able to activate the appropriate decoding function, by recognizing the coding identifier.
7.2	The coding identifier is structured according to ISO 9281. In this standard, the coding identifier PCE is defined to comprise a picture coding delimiter (PCD) and a coding method identifier (CMI). See Figure 2–5/T.150.

PCD	 CMI	
PCE	
	
 PCE	Picture control entity	
PCD	Picture coding delimiter	
CMI	Coding method identifier	
FIGURE 2–5/T.150
Structure of coding identifier
7.3	(Copy of ISO 9281, § 6.2.4 modified)
	The PCD shall announce or delimit the data for a particular picture coding method. The PCD shall comprise the two–byte sequence 01/11, 07/00.
7.4	(Copy of ISO 9281, § 6.2.5)
	The CMI shall specify the particular coding method for the picture data that follow it. The CMI may consist of one or more octets corresponding to the bit combinations in the range 02/00 to 07/14 of an 8–bit code table.
7.5	(Copy of ISO 9281, § 6.2.6)
	Each CMI identifying a particular picture coding method shall be registered with the ISO Registration Authority for Picture Coding Methods (to be set up).
7.6	The telewriting coding identifier, when included in a transmission block, occupies the first three (or more if appropriate) transmission words following the start combination. See Figure 2–6/T.150.

Carrier OFF	
Start combination	
Coding identifier	Telewriting
data and
MARK signals	
MARK	
Carrier OFF	
FIGURE 2–6/T.150
Transmission format, including coding identifier
7.7	In a point–to–point configuration, the inclusion of the coding identifier in the first transmision block only, would in principle be sufficient for the whole session.
	However, for multipoint communication, the insertion of the coding identifier in each transmission block is required.
	In view of this requirement, it is recommended that the coding identifier be included in each transmission block containing telewriting data, irrespective of the configuration.
7.8	The terminal should be designed such that transmission of the coding identifier takes place automatically at the right moment.
7.9	For telewriting equipment according to this Recommendation T.150 the following bit combinations should be used in the coding identifier. See Table 2–3/T.150.
TABLE 2–3/T.150
Coding identifier bit combinations
Acronym	 Bit combination	
PCD (2 byte sequence)	 01/11, 07/00	
CMI Zone coding	 02/00, 04/00	
CMI Diff–chain coding	 02/00, 04/01	
	Note – The above allocations are of a preliminary nature, pending further development of ISO 9281.
8	Communication control, general requirements
8.1	This section defines requirements for the control of data exchange for the basic telewriting terminal.
8.2	These requirements also apply to data exchange between any enhanced terminal and a basic terminal.
8.3	The requirements permit the use of a two–hop satellite circuit in the connection between two terminals.
8.4	The requirements also permit multi–point communication via a voice bridge.
8.5	Establishment and clearing of the telephone connection take place in accordance with the requirements set by the telephone network.
8.6	For the basic terminal, automatic calling and answering are not defined.
8.7	A basic terminal may, as an option, be equipped such that it can maintain the exchange of telewriting data after termination of the speech conversation. This option is identified as “automatic call termination”.
8.8	The automatic call termination implies that the telewriting function (sending as well as receiving) is able to operate autonomously while the telephone apparatus is in the ON HOOK condition.
8.9	To enable automatic call termination, the terminal must be able:
–	to note that sending respectively reception of a telewriting transmission block is going on, during the ON HOOK condition of the telephone apparatus,
–	to recognize the end of the final telewriting transmission block,
–	to switch back to the speech only mode and to clear the telephone connection.
8.10	Switching between the three modes “speech only”, “speech plus telewriting” and “telewriting only” can be done manually. In addition, switching the telewriting function OFF can take place automatically by means of the communication control command SSO in the transmission signal. The transitions between modes of operation are illustrated in Figure 2–7/T.150.

Fig. 2–7/T.150/T0803800-89 = 7 cm

9	Communication control commands
9.1	For control of the communication process, the commands SSO and HLO are available.
	The coding of these commands is as follows:
SSO		1/7
HLO	0/5
	The meaning of these commands is described in Table 2–4/T.150.
TABLE 2–4/T.150
Communication control commands
Acronym	 Meaning	
SSO	Set speech only
This command indicates that the terminals are instructed to switch from telewriting ON to the speech only mode	
HLO	Hello
This command is to be sent by a terminal that expects telewriting data, but does no receive such data	
9.2	A terminal will automatically send SSO upon the instruction by its local user, to switch over from the telewriting ON mode to the speech only mode.
	Transmission of SSO can take place in two ways:
–	At the end of the current transmission block. SSO is attached to the block, according the format defined below.
–	By means of a separate transmission block. Such a block is sent specifically for conveying SSO. Format: defined below.
9.3	A terminal receiving SSO will revert to the speech only mode and does not recognize further telewriting signals.
9.4	The format for sending SSO is defined in Figures 2–8/T.150 and 2–9/T.150.
Fig. 2–8/T.150/T0803810-89 = 7 cm

Fig. 2–9/T.150/T0803820-89 = 7 cm

9.5	The HLO command will only be sent in a block without telewriting data. The format should be as defined in Figure 2–10/T.150.

Fig. 2–10/T.150/T0803830-89 = 7 cm

9.6	The HLO command is intended for use with automatic reception. This command will be sent by a terminal if it has not received valid telewriting data during a period of 35 seconds since:
–	establishment of the telephone call;
–	reception of the last valid transmission block.
9.7	The terminal receiving a HLO command responds with a MARK signal of 700 ± 20 ms.
9.8	A terminal in the telewriting ON condition, receiving signals other than valid telewriting data (e.g. a tone from the telephone network) cannot enter the send mode. In this case, the terminal returns to the speech only mode without sending any command or other information (after a guard–time of 35 seconds).
10	Description of the communication process
10.1	In order to describe the full communication process, the concepts of “telewriting activity” and “tele– writing session” are introduced. These are defined as follows:
–	Telewriting activity – Any action by the user that causes the telewriting terminal (in the telewriting ON condition), to send data. Examples of such actions are: pen down, marker ON, erasure.
–	Telewriting session – A period of time delimited by session start and session end, during which two communicating terminals have a relationship that enables them to exchange telewriting data.
10.2	The event determining session start is:
–	the terminals are in the condition telewriting ON,
–	at one of the terminals the first telewriting activity has occurred.
10.3	The event determining session end is:
–	the terminals switch over to the telewriting OFF condition.
10.4	The session is established as soon as the coding identifier is received and recognized by the receiving terminal.
10.5	At the beginning of the session, both terminals have the slave status. During the session, only one terminal at a time can acquire the master status.
10.6	In the preceding text of this Part 2, all elements to be used in the communication process are defined now.
	The process can be summarized as described in Table 2–5/T.150.
10.7	The preceding description is given for a point–to–point configuration. However, taking into account that only one terminal can have the master status, this description is applicable to a multipoint configuration as well. In this case it is indispensible that every transmission block contain a coding identifier.
TABLE 2–5/T.150
Communication process summarized
Step 1	Both parties agree by speech to switch to the telewriting ON condition.	
Step 2	Following telewriting ON, each terminal is in the receive ready condition, i.e. the receiver is ON but it does not receive telewriting signals.	
Step 3	The first telewriting activity occurring at one of the terminals causes that terminal to initiate the transmission of the first transmission block.	
Step 4	The terminal initiating the transmission of the first transmission block assumes the master status.	
Step 5	The session is established as soon as the receiving terminal has received and recognized the coding identifier contained in the first transmission block.	
Step 6	Within the session, each terminal may alternatingly assume send, receive and receive ready conditions, as required by human actions and/or received signals. When appropriate, the master status will be taken over by an other terminal, as defined in the section on transmission procedures.	
Step 7	In case of a transmission collision, the terminal with master status is permitted to continue sending; a terminal with slave status has to await a new opportunity.	
Step 8	The session is terminated when the terminals switch to the telewriting OFF condition.	
Part 3 – Zone coding
1	General
1.1	This part of the Recommendation defines details of the zone coding method.
1.2	For an application of zone coding together with telephony the combined requirements from Parts 1, 2 and 3 apply.
1.3	This part also specifies how the coded signal is to be structured in 8 bit bytes, in order to fit in the transmission words defined in Part 2.
1.4	In the writing pad, the beginning of a stroke of handwriting is recognized by the detection of the pen–down condition.
1.5	Each stroke generates a set of time serial coordinate pairs during pen–down.
1.6	The coordinates of handwriting during pen–down are sampled at a fixed rate of 40 samples/second.
1.7	The first sampling is initiated by pen–down, and continues, ending when the pen is lifted.
1.8	The sequence of coordinate pairs is converted into a coded representation according to the zone coding rules. After this conversion the stroke is represented by the presentation element TRACE.
1.9	The presentation elements are coded in the form of opcodes and operands.
1.10	The opcodes have a fixed 8–bit length; the operands have a variable length.
1.11	The telewriting coordinate information is contained in the operands.
2	Presentation elements
2.1	In tone coding, the following presentation elements are distinguished:
–	trace
–	marker
–	partial erasure
–	untrace
–	set colour
–	line thickness
–	complete erasure.
	These elements and the format of the associated command streams are defined in Table 3–1/T.150.
2.2	The opcodes are defined in Table 3–2/T.150 (notation x/y means column x, row y, in a 16 × 16 code table).
3	Zone coding description
3.1	A trace is coded as a sequence of vectors (vector = D).
3.2	The beginning of a trace is the starting point of the first vector.
3.3	The end point of a vector constitutes the starting point for the next vector in the trace.
3.4	The starting point position of the first vector of each trace is coded in the form of a pair of absolute coordinates.
3.5	The position of each endpoint is determined by means of a measurement system, the origin of which must coincide with the starting point of the vector.
3.6	Within this measurement system, the endpoint position is found through a three step approximation:
–	step 1: the quadrant q, one value out of four; see Figure 3–1/T.150;
–	step 2: the zone k within the quadrant; for division and numbering, see Figure 3–2/T.150;
–	step 3: the relative address A within the zone.
3.7	In the coded representation, the quadrant and zone are indicated in a differential way: dq and dk.
3.8	A set of 30 combinations of dq and dk are selected to be coded in a compressed form, see Table 3–3/T.150.
3.9	The relative address within the zone has a length depending upon the size of the zone.
3.10	A vector end point position of which the combination dq and dk is not defined in Table 3–3/T.150 is coded by EFZ (escape from zone code) followed by the absolute address.
3.11	The end of a trace is indicated by PLI (pen lift indicator) following the last (relative or absolute) address.
3.12	The zone coding is defined more precisely in §§ 4 and 5. An example of this coding is given in § 6.
4	Definitions of terms used in coding
4.1	The vector Di defined by:
Di = Pi – Pi–1
= (dxi, dyi) = (xi – xi–1, yi – yi–1)
where Pi is the i–th coordinate pair during pen–down.

TABLE 3–1/T.150
Presentation element commands
Trace TRn	–	The TRn command draws line segments that are defined by a co–ordinate information operand.
–	The TRn command stream is:
ISP, TRn, . . . co–ordinate information . . . ISP.	
Marker MKn	 –	The MKn command draws a marker pattern, the center of which is specified by a co–ordinate information operand.
–	The MKn command stream is:
ISP, MKn, . . . co–ordinate information . . . ISP.	
Partial Erasure PEn	 –	The PEn command erases the closed area defined by a co–ordinate information operand.
–	The PEn command stream is:
ISP, PEn, . . . co–ordinate information . . . ISP.	
Untrace UTn	 –	The UTn command erases the square area (with its sides parallel to the sides of the unit area) the centre of which is specified by a co–ordinate operand.
–	The size of the square is defined as follows:
(32 × 2n–9 – 1) × (32 × 2n–9 – 1) grid units.
–	The UTn command stream is:
ISP, UTn . . . co–ordinate information . . . ISP.	
Set Colour SC*	 –	The SC* command sets a colour attribute to a particular trace. The colour attribute* can be set at the values:
	* = R: red	* = B: blue
	* = G: green	* = M: magenta
	* = Y: yellow	* = C: cyan
	* = W: white
–	The effect of an SC* command remains valid until the next SC* or CE command.
–	The SC* command stream is:
	ISP, SC*, ISP, TRn, . . . co–ordinate information . . . ISP.	
Line Thickness LT*	–	The LT* command sets a line thickness that is defined by *, as follows:
	* = 1: one grid unit width,
	* = 2: two grid units width,
	* = 3: three grid units width.
–	The effect of a LT* command remains valid until the next LT* or CE command.
–	The LT* command stream is:
	ISP, LT*, ISP, TRn, . . . co–ordinate information . . . ISP.	
Complete Erasure CE	–	The displayed image is erased completely.
–	The CE command is:
	ISP, CE, ISP.	
n	determines the grid resolution,
n = 9	means: grid resolution = 512 × 512 (default value),
n = 10	means: grid resolution = 1024 × 1024,
n = 11	means: grid resolution = 2048 × 2048,
ISP	Information Separator.

TABLE 3–2/T.150
Zone coding presentation opcodes
Element	 Command	 Code	
Trace	 TR 9
TR 10
 TR 11	 12/9
12/10
12/11	
Marker	 MK 9
MK 10
MK 11	13/9
13/10
13/11	
Partial erasure	PE 9
PE 10
PE 11	14/9
14/10
14/11	
Untrace	UT 9
UT 10
UT 11	15/9
15/10
15/11	
Set colour	SC R
SC G
SC Y
SC B
SC M
SC C
SC W	11/0
11/1 
11/2
11/3
11/4
11/5
11/6	
Line thickness	 LT 1
LT 2
LT 3	 10/0
10/1
10/2	
Complete erasure	 CE	 0/12	

4.2	The quadrant number of the i–th vector, qi, is defined as (see Figure 3–1/T.150):
	qi	= 1 for dx  0, dy  0
	= 2 for dx < 0, dy  0
	= 3 for dx < 0, dy < 0
	= 4 for dx  0, dy < 0
Fig. 3–1/T.150/T0803840-89 = 12 cm

4.3	Zone division and zone designation number
	The space of vectors without signs is divided into square zones. The zones are numbered counter– clockwise, as shown in Figure 3–2/T.150.
	The zone width is taken as the power of two. Thus the width of the k–th zone is defined as:
W(k)	= 2			for k = 1
		= 2 × 2(k–2)/3	for k > 1
4.4	The k–th zone Zk is defined as:
1)	for k = 1
Zk = (| dx |, | dy |); 0  | dx |  W(k)–1, 0  | dy |  W(k)–1
2)	for k > 1
a)	for k = 0 (mod 3)
Zk = (| dx |, | dy |); W(k)  | dx |  2W(k)–1, W(k)  | dy |  2W(k)–1
b)	for k = 1 (mod 3)
Zk = (| dx |, | dy |); 0  | dx |  W(k)–1, W(k)  | dy |  2W(k)–1
c)	for k = 2 (mod 3)
Zk = (| dx |, | dy |); W(k)  |dx |  2W(k)–1, 0  | dy |  W(k)–1
Fig. 3–2/T.150/T.0803850-89 = 10 cm

4.5	The origin of the relative addresses in each zone is the lower left corner. The relative address in the k–th zone, (Ax, Ay), is defined as:
1)	for k = 1
Ax = dx, Ay = dy
2)	for k > 1
a)	for k = 0 (mod 3)
Ax = | dx | – W(k), Ay = | dy | – W(k)
b)	for k = 1 (mod 3)
Ax = | dx |, Ay = | dy | – W(k)
c)	for k = 2 (mod 3)
Ax = | dx | – W(k), Ay = | dy |
4.6	Quadrant number difference dqi is defined as:
dqi = qi – qi–1
where q0 = 1 for simplicity.
4.7	Zone number diffdrence dki is defined as:
dki = ki – ki–1
where ki is the zone number obtained by the i–th vector, and k0 = 1 for simplicity.
5	Specification of the coding
5.1	The first pen–down point is represented by the binary expression of the absolute coordinate pair (x0, y0), as follows:

x0	 y0	

MSB	LSB      MSB	LSB	
	    2 × 9 bits		
					MSB	Most significant bit
					LSP	Least significant bit
5.2	All successive pen–down points are represented by zone codes (ZC) and relative addresses (Ax, Ay).
5.3	The zero vector (0, 0) is not coded and transmitted. It is also possible the zone vector (| Xi–Xi–1 |  1, | Yi–Yi–1 |  1) will be rejected before being coded.
5.4	The zone code is defined in Table 3–3/T.150. The table specifies a zone code number 1 to 30 and a bit combination for 30 combinations of dq and dk.
5.5	The relative addresses (Ax, Ay) are represented by:
5.6	The bit length L is decided by:
	L = 2 log2 W(k).
5.7	For the combination of dq and dk, not defined in Table 3–3/T.150, the absolute addresses (xi, yi) follow EFZ, instead of ZC.
5.8	A stroke is terminated by the pen lift indicator (PLI) as soon as the pen is lifted.
5.9	The full data format of a stroke is illustrated in Figure 3–3/T.150.
6	A coding example
	The trace of handwritten information is shown in Figure 3–4/T.150, where Pi is the sampled point. An example of how to encode the coordinate data is shown in Table 3–4/T.150. The zone coded bit stream is shown in Figure 3–5/T.150.
7	Data structure
7.1	The zone coding opcodes and operands and the opcodes representing control commands are transmitted in the form of data packets.
7.2	Each packet consists of a header octet ISP (information separator), followed by an integral number of octets, and terminated by an ISP octet.
7.3	A packet may contain an undetermined number of opcodes. Boundaries of opcodes coincide with the boundaries of octets.
7.4	Data of variable length (the operand) is preceded by an opcode. After each operand the packet is terminated by an ISP octet at the earliest regular octet boundary.
7.5	If the end of the operand does not coincide with an octet boundary, the remaining bit positions until the octet boundary shall be filled with bits of the value ZERO.
	At the receiving end, these zeros are ignored.

TABLE 3–3/T.150
Zone code table
Zone code No.	 dq	 dk	 Length of the code (bit)	 Code
(the left bit is LSB)	
  1	 0	  0	 2	 	01	
  2	 3	  0	 4		 00 01	
  3	 1	  0	 4	 	11 11	
  4	 0	  3	 4	 	00 10	
  5	 0	  1	 4	 	10 11	
					
  6	 0	 –3	 4	 	11 10	
  7	 3	  3	 5	 	10 01 1	
  8	 0	 –1	 5		 00 11 1	
  9	 3	 –1	 6	 	10 01 01	
 10	 3	 –3	 6	 	10 00 01	
					
 11	 2	  0	 6	 	00 11 01	
 12	 1	  3	 6	 	10 10 01	
 13	 1	  1	 6	 	10 00 11	
 14	 1	 –3	 6	 	10 10 11	
 15	 0	  4	 6		 10 00 10	
					
 16	 0	  2	 6	 	00 00 11	
 17	 0	 –2	 6		 00 00 01	
 18	 3	  2	 7	 	10 00 00 1	
 19	 3	  1	 7		 10 01 00 1	
 20	 2	  3	 7		 10 10 10 0	
					
 21	 1	  2	 7		 10 10 00 1	
 22	 1	 –1	 7		 00 11 00 1	
 23	 1	 –2	 7		 10 01 00 0	
 24	 0	  6	 7	 	00 00 00 1	
 25	 0	 –4	 7	 	00 11 00 0	
					
 26	 0	 –6	 7	 	10 10 00 0	
 27	 3	  6	 8	 	10 10 10 10	
 28	 2	  1	 8		 10 00 00 01	
 29	 2	 –1	 8		 10 10 10 11	
 30	 2	 –3	 8		 00 00 00 01	
					
 PLI	3				
 EFZ	6			 	11 0 	
 NULL	8				00 00 10	
				 	00 00 00 00	
	PLI	Pen lift indicator
	EFZ	Escape from zone code

Ax	 Ay	
MSB	LSB   MSB	LSB	

EFZ	 xi	 yi	
MSB	MSB	

x0	 y0	 ZC(1)	 A(1)	 ZC(2)	 A(2)		PLI	
 x0, y0	Starting address
ZC(i)	Zone code of the i–th vector
A(i)	Relative address of the ith vector
PLI	Pen lift indicator
FIGURE 3–3/T.150
Stroke data format
Fig. 3–3/T.150/T0803860-89= 9 cm

TABLE 3–4/T.150
Coding example
i	 x, y	 dx, dy	 q	 k	 dq	 dk	 ZC	 Ax, Ay	 W(k)	 L/2	 ZC–code	
 0	 1, 3		 (1)	(1)								
 1	 1, 4	 0, 1	 1	 1	 0	 0	 1	 0, 1	 2	 1	 01	
 2	 2, 5	 1, 1	 1	 1	 0	 0	 1	 1, 1	 2	 1	 01	
 3	 5, 6	 3, 1	 1	 2	 0	 1	 5	 1, 1	 2	 1	 1011	
 4	 7, 6	 2, 0	 1	 2	 0	 0	 1	 0, 0	 2	 1	 01	
 5	 8, 5	 1, –1	 4	 1	 3	 –1	 9	 1, 1	 2	 1	 100101	
 6	 9, 5	 1, 0	 1	 1	 1	 0	 3	 1, 0	 2	 1	 1111	
Fig. 3–5/T.150/T0803870-89 = 12 cm

7.6	Successive packets may be sent contiguously, separated by a single ISP octet. See Figure 3–6/T.150.

Fig. 3–6/T.150/T0803880-89 = 5 cm

7.7	If one of the octets containing variable length data accidentally imitates an ISP octet, the transmitter inserts an extra ISP octet, so that the imitation is duplicated. See Figure 3–7/T.150.
	If the imitation results from a combination of bits in two adjacent octets, no action is taken.
Fig. 3–7/T.150/T0803890 = 7 cm

7.8	The receiver ignores the second ISP octet from each pair of ISP octets.
8	Temporary pen–stop
8.1	During the writing process, the pen may stop at an arbitrary instant, remaining on the writing surface. As a consequence, the completion of the current operand is suspended.
8.2	Generally, the instant of pen–stop does not coincide with a byte boundary. In order to provide the receiving party with up–to–date information including the correct pen–stop position, the content of the incomplete byte should be transmitted prior to the MARK signal representing the writing pause.
8.3	The above can be achieved by means of the insertion of 8 extra bits, the NULL bits, in the bitstream. Each NULL bit has the binary value Zero.
8.4	The NULL bits are subdivided into two groups, one group preceding the MARK signal, the other group following the MARK signal.
8.5	The number of NULL bits in the first group equals the number of open bit positions in the current byte. This number is referred to as N.
8.6	By the inclusion of N NULL bits the current byte is complete and can be transmitted. It is followed by the MARK signal.
8.7	As soon as the next writing activity occurs, the MARK signal is terminated.
8.8	The remaining 8–N NULL bits are to occupy the leading bit–positions of the first byte after the MARK signal.
8.9	The NULL bit mechanism is illustrated in Figure 3–8/T.150.
Fig. 3–8/T.150/T0803900 = 5 cm

9	Control commands
9.1	This section defines control commands, affecting the functioning of the terminal at the presentation level.
	These commands are:
–	complete erasure,
–	escape,
–	information separator.
9.2	Complete erasure CE
	This command is defined already in Table 3–1/T.150. It is repeated here because of the buffer control aspect.
	The displayed image is erased completely, both at the sending side and the receiving side. Also the telewriting data in the transmission buffer at the sending side, and in the reception buffer at the receiving side is erased.
9.3	Excape ESC
	This is a code extension command. ESC is to be followed by an 8–bit operand, defining an alternative code table. ESC + operand is to be sent by an enhanced Telewriting terminal prior to each enhanced operation function. Details are to be defined in a section on enhanced terminal.
9.4	Information separator ISP
	ISP acts as a delimiter of command packets as defined in § 7. The terminal should check received data streams for pairs of ISP octets and, where required, should reject every second ISP octet.
9.5	The coding of the above commands is defined in Table 3–5/T.150 (the notation x/y means column x, row y, in a 16 × 16 code table).

TABLE 3–5/T.150
Coding of control commands
Function	 Acronym	 Coding	
Complete erasure	 CEC	 0/12	
Escape	 ESC	 1/11	
Information separator	 ISP	 1/15	
10	Summary code table
	A summary of the coding for the opcodes is given in Figure 3–9/T.150. All elements included have been defined in the previous sections.
Fig. 3–9/T.150/T0803910-89 = 12 cm

11	Summary transmission data format
	The transmission data format is illustrated in Figure 3–10/T.150.

Fig. 3–10/T.150/T0803920-89 = 14 cm

12	Zone coding basic terminal
12.1	The basic terminal must be able to receive and correctly process the following presentation element commands:
	TR 9, MK 9, PE 9, CE, ISP.
12.2	The following presentation elements are optional:
TR 10, TR11
MK 10, MK 11
PE 10, PE 11
UT 9, UT 10, UT 11.
	I.e. the transmitter may or may not be equipped with these commands.
	The receiver must be able to receive and correctly process these commands.
12.3	The following control commands are optional:
	ESC, LT*, SC*
	I.e. the receiver will accept these commands but does not undertake any further action.

Part 4 – Differential chain coding
1	General
1.1	This part of the Recommendation defines details of the differential chain coding method.
1.2	For an application of differential chain coding together with telephony, the combined requirements from Parts 1, 2 and 4 apply.
1.3	Differential chain coding is derived from the Videotex geometric coding as defined in Recommendation T.101, Annex C (CEPT Videotex).
1.4	The telewriting functionalities are nearly a subset of the Videotex geometric functionalities, as defined in Recommendation T.101, Annex C.
1.5	Differential chain coding was developed for compression purposes. In this coding method, the statistical properties of handwriting are employed.
1.6	This coding method uses spatial sampling of curves, as distinct from sampling with a fixed frequency. The size of the sampling steps is determined by the size of the so–called coding ring.
1.7	The precision of this coding method is expressed in grid units, GU. In the default situation, one GU corresponds to the binary fraction 2 ** –9 of the unit length.
1.8	Each stroke of handwriting is processed by the writing pad circuitry and converted into a coded form.
	The coded representation of a stroke is called TRACE.
1.9	The coding of the presentation element trace, as well as the coding of the remaining presentation elements is defined in terms of 7 bit coding.
1.10	Conversion into 8 bit structured coding as required for transmission, is also specified in this Recommendation.
1.11	The word “byte” where used in this Recommendation, refers to a combination of 7 or 8 bits, whatever is appropriate in the given context.
2	Presentation elements
	In differential chain coding, the following presentation elements are distinguished:
–	trace
–	marker
–	closed area
–	partial erasure
–	background
–	complete erasure.
	The attributes are:
–	colour
–	trace thickness
–	trace texture.
	These presentation elements together with the attributes are described in Table 4–1/T.150.

TABLE 4–1/T.150
Differential chain coding presentation elements
Element	Description	
Trace	The trace is coded as a trace opcode plus a set of co–ordinate information defining a sequence of line segments. Trace corresponds with polyline in videotex.	
Marker	The marker is coded as a marker opcode plus a single co–ordinate pair defining the position ot the marker's center point.	
Closed area	The closed area is coded by an opcode plus a set of co–ordinate information defining a closed perimeter. The closed area corresponds with fill area in videotex.	
Partial erasure	Partial erasure is obtained by means of the closed area concept. By giving the closed area the same attributes as the background, erasure is achieved for the area enclosed in the perimeter.	
Background	At initialization and after complete erasure, the background shows default appearance. Modification of the background is obtained by means of the closed area concept. The closed area is chosen to have the size of the image area. The area attributes are set to the desired background appearance.	
Complete erasure	Complete erasure is obtained by means of the clear screen concept. The whole image area will be set to the default background appearance.	
Colour	Colour is an attribute, applicable to trace and closed are (including background). The effect of a colour command remains valid until the next colour command.	
Trace thickness	Trace thickness is an attribute. It is determinated by means of a scale factor. The effect of a trace thickness command remains valid for all subsequent traces, until the next trace thickness command.	
Trace texture	Trace texture is an attribute. It is determinated by means of a parameter allowing a choice amoung defined textures. The effect of a trace texture command remains valid for all subsequent traces, until the next trace texture command.	
Marker type	Marker type is an attribute. It is determinated by means of a parameter allowing a choice among defined textures. The default value of marker type is 1. If the specified value is outside the range 0 . . . 4, the marker is not displayed.	
3	Description of the coding
3.1	The coded representation of a presentation element is called PRIMITIVE.
3.2	A primitive is composed of one opcode and a number of operands as required.
3.3	Certain opcodes are coded as a single byte, other opcodes are coded as combinations of two bytes.
3.4	The operand part of a primitive may utilize either basic format encoding or pointlist encoding.
3.5	In basic format encoding the operand part of the primitive contains one or more operands, each consisting of one or more bytes.
3.6	In the pointlist encoding the operand part of the primitive contains coordinate information regarding an individual point or regarding a sequence of related points.
3.7	The position of an individual point, as well as the position of each first point of a sequence, is coded in absolute coordinates, i.e. the x– and y–coordinate with respect to the origin of the coding space.
3.8	For the coding of the remaining points of a sequence, a choice is to be made among two possibilities, namely displacement mode and incremental mode.
3.9	In the displacement mode, each point (after the first) is coded by means of two size value parameters. The first size value gives the x–component of the point's displacement from the preceding point in the sequence, the second size value gives the y–component of the displacement.
3.10	In the incremental mode, a mechanism is used in which a single value, derived from a table, determines the position of a point with respect to the preceding point. This mechanism is suitable for coding a sequence of points containing a high amount of position information, such as a trace.
3.11	The mechanism, introduced in § 3.10, is based on the use of a coding ring. At the beginning of trace, the starting point determines the centre point of the first ring. The intersection of trace and ring is identified and determines the centre point of the second ring.
3.12	Each new intersection determines the centre point for the next ring. Thus, the trace is represented by the starting point plus the series of intersection points. The end of a trace is indicated by means of the end of block–code.
3.13	The method for identifying the various points on a ring utilizes small numbers for points with a high probability of being intersected and larger numbers for points with lower probability.
3.14	The numbering system for the reference points on the ring is defined in §§ 4.6 and 4.7.
4	Incremental mode mechanism
4.1	The coding data in the incremental mode does not reflect coordinate size values, but represents a sequence of points identified by means of successive coding rings. Each ring identifies one point.
4.2	A ring is a set of reference points, positioned on the perimeter of a square. The position of the square is identified through the position of its centre point. The sides of the square are parellel to the x– and y–axes.
4.3	The characteristics of the ring are determined by its radius R, its angular resolution factor p and its direction D.
	The size of R is expressed in GU.
4.4	The number of reference points on a ring is N. The value of N is determined by:
	N = , with p = 0, 1, 2, 3.
	It follows that the maximum number of reference points is N = 8R.
4.5	N must be even. If N is odd, the encoded operand (the point list) must be discarded. If N is even for the first part of the operand, but N is odd for the remaining part, the remaining part (with N being odd) is discarded.
4.6	To the reference points on the ring, point numbers are assigned as follows. The numbering starts with 0. The point with number 0 is called the direction point.
4.7	The default position for the direction point is shown in Figure 4–1/T.150. Adjacent points are numbered 1 . . . N/2–1 in anticlockwise direction, and –1 . . . –N/2 in clockwise direction. Figure 4–1/T.150 shows two rings with the numbered reference points.
4.8	In the figure the left ring is characterized by R = 3 and p = 0; the right ring by R = 3 and p = 1.

Fig. 4–1/T.150/T0804070-89 = 9 cm

4.9	The position of the reference points on each ring is fixed. However, the allocation of the point numbers is adapted to the trace direction as follows.
4.10	For the first ring of a sequence (at the starting point), the direction point is at default position, as shown in Figure 4–1/T.150.
4.11	As soon as the growing trace intersects the first ring, the nearest reference point is determined. This point constitutes the centre point for the next ring.
4.12	The direction point on the second ring is located at that position where the next intersection would take place if the trace continued as a straight line.
4.13	As the trace grows, the nearest reference point at each intersection is determined. The respective point numbers of these points are converted into variable length code words according to the Huffman code table, defined in Table 4–2/T.150.
4.14	The radius can have a value of R0, 2R0, 4R0 or 8R0, where R0 is the basic radius.
	The angular resolution factor p can have a value of 0, 1, 2 or 3.
	To modify these parameters the code table contains the codes C1 . . . C6. For their use, see further on.
	The basic radius R0 can be specified by the primitive “set domain ring”. The default basic radius follows from:
	default basic radius = 2 ** max (0, –8–granularity code).
4.15	The length of the code table is fixed. The point numbering ranges from –20 to +19. For the encoding in cases of rings with a higher number of reference points, two escape codes are defined: IM–ESC 1 and IM–ESC 2. For their use, see § 5.
4.16	At the end of the trace no further intersections occur. The variable length coded string is terminated by end of block.

TABLE 4–2/T.150
Huffman code table for differential chain coding
Code No.	Length	Code–word	Point number	
  1	  2	         00	   0	
  2	  2	         10	   1	
  3	  2	         01	–1	
  4	  4	       1100	   2	
  5	  4	       1101	–2	
  6	  6	     111000	   3	
  7	  6	     111001	–3	
  8	  6	     111010	   4	
  9	  6	     111011	–4	
 10	  8	   11110000	   5	
 11	  8	   11110001	–5	
 12	  8	   11110010	   6	
 13	  8	   11110011	–6	
 14	  8	   11110100	   7	
 15	  8	   11110101	–7	
 16	  8	   11110110	   8	
 17	  8	   11110111	–8	
 18	 10	 1111100000	   9	
 19	 10	 1111100001	–9	
 20	 10	 1111100010	  10	
 21	 10	 1111100011	–10	
 22	 10	 1111100100	  11	
 23	 10	 1111100101	–11	
 24	 10	 1111100110	  12	
 25	 10	 1111100111	–12	
 26	 10	 1111101000	  13	
 27	 10	 1111101001	–13	
 28	 10	 1111101010	  14	
 29	 10	 1111101011	–14	
 30	 10	 1111101100	  15	
 31	 10	 1111101101	–15	
 32	 10	 1111101110	  16	
 33	 10	 1111101111	–16	
 34	 10	 1111110000	  17	
 35	 10	 1111110001	–17	
 36	 10	 1111110010	  18	
 37	 10	 1111110011	–18	
 38	 10	 1111110100	  19	
 39	 10	 1111110101	–19	
 40	 10	 1111110110	  C1	
 41	 10	 1111110111	–20	
 42	 10	 1111111000	  C2	
 43	 10	 1111111001	  C3	
 44	 10	 1111111010	  C4	
 45	 10	 1111111011	  C5	
 46	 10	 1111111100	  C6	
 47	 10	 1111111101	 IM–ESC 1	
 48	 10	 1111111110	 IM–ESC 2	
 49	 10	 1111111111	 End of block	
5	Change of coding parameters
5.1	The escape codes IM–ESC 1 and IM–ESC 2 enable the extension of the point numbering range on the ring. I.e. also points outside the range –20 to +19 can be addressed. By the code IM–ESC 1, the absolute value of the point number is increased by 20, the sign remains unchanged.
	By the code IM–ESC 2, the absolute value of the point number is increased by 40, the sign remains unchanged.
5.2	The two escape codes can be used in combination with each other in any desired order. Some examples in Table 4–3/T.150 illustrate their use. The number between [ ] represents the point number.
TABLE 4–3/T.150
Use of escape codes, examples
Description	 Intended point numbers	
<IM–ESC 1>				 [1]	  21	
<IM–ESC 1> 				[–1]	–21	
<IM–ESC 2> 				[14]	  54	
<IM–ESC 2> 				[–12]	–52	
<IM–ESC 1> <IM–ESC 2> 	[6]	   66	
<IM–ESC 2> <IM–ESC 1> 	[–18]	–78	
5.3	The codes C1 up to C6 are used to change the parameters R and p that define the ring to be used. The use of these codes is defined in §§ 5.4 and 5.10.
	By the use of these codes the direction point is set at default position.
5.4	The range in which the parameters should remain is as follows:
R:	R0, 2R0, 4R0, 8R0 (with R0 being the basic radius);
p:	0, 1, 2, 3.
5.5	Code C1 means: change R and p to the next higher value. E.g. if radius is R, the next higher is 2R; if p = 0 the next higher is 1.
	R cannot become greater tan 8R0 and p cannot become greater than 3. E.g. if current radius is 8R0 or current p = 3, the code C1 has no effect.
5.6	Code C2 means: change R and p to the next lower value. The effect of C2 is the inverse of code C1.
	R cannot become smaller than R0 and p cannot become smaller than 0. E.g. if the current radius is R0 or the current p = 0, the code C2 has no effect.
5.7	Code C3 means: change R to the next higher value. The code C3 has no effect if the current radius = 8R0.
5.8	Code C4 means: change p to the next higher value. The code C4 has no effect if the current p = 3.
5.9	Code C5 means: change R to the next lower value. The code C5 has no effect if the current radius = R0.
5.10	Code C6 means: change p to the next lower value. The code C6 has no effect if the current p = 0.
6	Coding formats
6.1	The coding is specified in terms of 7–bit coding. For use in the 8 bit environment as specified for transmission, bit No. b8 of each octet shall be set to ZERO.
6.2	For reference, an empty 7–bit code table is shown in Figure 4–2/T.150.