<> <> <> <> <> <> DIRECTORY CDOrient, Basics, CD; CDOrientImpl: CEDAR PROGRAM IMPORTS Basics, CDOrient EXPORTS CDOrient = BEGIN OPEN CDOrient; <<-- Orientation Transformations>> <<-- x increases to the right, y increases upward. >> <<-- An CD.Orientation idx is composed of two parts:>> <<-- a clockwise rotation of (idx/2)*90 degrees,>> <<-- followed by a reflection in x if (idx MOD 2)#0.>> <> <> <> <<>> <<-- Given an item in a prototype cell, and the>> <<-- size of the prototype cell, both in "cell" co-ordinates, and>> <<-- the position and orientation index of an instance of that cell in "world">> <<-- co-ordinates, this procedure returns the world>> <<-- co-ordinates of the instance of the item.>> <<>> <> <> <<-- most common case>> <> <> <> <> <> <> <<]];>> <<>> <<[x: sizeX, y: sizeY] _ cellSize;>> <<[x1: x1, x2: x2, y1: y1, y2: y2] _ itemInCell;>> <<>> <