GRAPHICS KERNEL SYSTEM(GKS)
GKS is basically a set of procedures which can be called by user programs to carry out certain generalized functions such as arc, circle, ellipse etc. GKS is defined in terms of number of levels describing the level of support in terms of facilities. GKS is a form of computer language which consists of set of commands for graphical operations.
Graphics Kernel System (GKS) was developed in Europe and standardized in 1985. It is strongly influenced by CORE two dimensional graphics. It is a standardized system of graphical functions for processing graphical data to create and process 2D images. Also, the defined functions are independent of programming languages applications and type of devices used. It covers the three dimensional graphics through GSK -3D.
GSK implementations have been made by many hardware manufacturers in many languages. It is not acceptable for dynamic graphics as a tool for programming large location application. GKS for the graphics programming is in terms of the layer model
In this system, workstation is used as an e VDU, printer or plotter. Workstations may be identical to programmers.
Features of GKS
'Graphic functions are defined for both 2D and 3D.
GKS supports picture data into two routines.
GKS defines an International coordinate system called normalized device coordinates.
Coordinates in GKS
Three coordinate systems are used in GKS such as World Coordinates (WC), Normal Device Coordinates (NDC) and Device Coordinates (DC).
WC is the user-oriented drawing coordinates. According to the ease of the user drawn picture image is magnified to bigger size or smaller size using Cartesian coordinate The range of this WC is from infinity to infinity on both negative and positive sides.
NC is a function of uniform system for all workstations. In normalized coordinates the drawn picture image is changed to run between 0 and 1. The space of this coordinate not depend on devices. NC is the hardware coordinates.
w DC is the actual coordinate system for the particular workstation. Usually translated into NDC using normalized transformation function as we discussed in Unit 1. jf. normalized device coordinates are translated into device coordinates, it is called workstation transformation.
Classification of GKS
GKS is classified into eight categories depending on their functions such as
(i) Control functions (ii) Output attributes (iii) Output primitives (i) Segment functions (v) Transformations (vi) Input functions (vii) Metafile functions (viii) Inquiry functions.
GKS Primitives
An ACM Special Interest Group on GRAPHices (SIGGRAPH) palnning committee was during 1975-1977 intiated the effort to standarize the graphic system. The standarization of graphic system is called CORE system. Then ISO and Americal National (AN), Standard Insitute (ANSI) designed and appproved GKS as the internationally accepted specfication of graphics software and hardware systems.
GKS output primtive is a complete class of collectionof functions to display 2D images. It consists of line, polygons, spline, dimeniosn, text etc. Each of these primtives is linked with output attributes. Attirbutes refer the paraemters such as colour, line style etc.
Two basic items of an object in GKS such as primitives and attributes.
(1) Primtives:
The basic or elementray graphical object units which consists of one or a combinatio to form a complete graphical object.
(ii) Attributes:
The features or characteristcs of a primtive are called attributes. If circle is a primtive, its attributes may be colour, line width and line type. The line type may be dashed, dotted, solid,dash space etc.,
In GKS, pictures are considered to be constructed from a number of basic building blocks called primitives.
Primitives Mainly, five output primtives involved in GKS as follows.
(i) Polyline (ii) Polymakers (iii) Text (iv) Fill area
1. Polyline:
Drawing a sequence of line segments to complete the required shape is achieved by using polyline output primtives. It includes colour, line type or width of line and color of the line.
2.Polymakers:
It is a marker type of polyline output primitive. It is performed after drawing the specfying the line type, line width or line weight and colour attributes. This type of mat be selected from various marker styles available stored in hardware built-in. Mak. special symboles are placed at a proper sequence in a desired position. The maker at may size, colour etc.
3. Generalised drawing primitves:
Mostly, hardware built-in attirbutes are used to draw curves, ellipse, spline etc. Tu of hardware built-in attributes will
perform the task faster which reduce the time cons to complete the required shape.
4. Text:
This attribute is used to write the name of the picture and to display the bill of materiale of the components which is drawn in CAD/CAM systems. The characteristics depend on be text and graphics mode. So, this primtive contains text content, path of text, text annotative text alginemnt, text fotn size, colour of fonts, height of fonts, type of font, spacing between texts, text justify text rotation and text vector. The text mode is generally of 80 columns and 25 rows matrix of characters.
5. Fill area:
The typical attribute for filling and hatching the desrired porition of the picture. The picture can be filled with different styles such as hollow fill, sold fill, pattern fill or hatch fill. colour of fill area etc.
6. Cell array:
It is the attribute to perform the task to plot the raster image corresponding to pixels. This standard is mainly concerned with methods for drawing or plotting graphical entities and handling the interaction between the user and graphics hardware. Some of the commands are polyline (n, X1, X2, X3, ........Xns. Y1, 72, Y3, ... ... ... ...Yn) to draw ‘n’ lines.
Poly marker (n, X1, X2, X3, ........Xno. Yı, Y2, Y3, ............yn) to draw ‘n' points. Fill area (n, X1, X2, X3, ........Xn. Yı, Y2, y3, ............yn). Fill area represents by 'n' points. Text (x, y, 'Text string ') to write text at x,y which in quote.
Set window (n, X1, X2, Yı, y2)to create window with (x1, yı) as lower left corner (x2, y2) as upper right corner n is window or view port number.
Set port (n, X1, X2, Yı, y2)
GKS Inquiry Functions
These functions are used to find the current status of any variable in GKS. Displavi text with the required alignment can be obtained through inquiry function. It is mainly us isolate the predefined values of variables if anything is required. The transformations clippings discussed in Unit 1 are the functions added in the inquiry functions.
As we know already, any compnenet in engineering field and day to day life cons; many parts which are maufacutred in such a way to connect and obtain a single struct means, a single structure has many segments and each should be separately treate information about them should be perserved. In GKS, segments are treated by see functions. So, the available segments are as follows.
(i) Segment storage:
It stoes a segment.
(ii) Segment creation, deletion and renaming:
It creates, deletes and renames a created segment.
(iii) Segments name:
It defines the name of segments.
(vi) Segment redrawing:
It forces any segment for redrawing.
GKS Input Functions
A set of of functionality is defined in the which are connected in a graphic system are to act an input keyborad and joystick. They differ in their construction method action. GKS input methods is classified into groups on th logical input devices.
1. String:
A set or string of character values is modeled by the action of a keyboard.
2. Choice:
election among several possibilites offered by the bank of buttons of a keyboard or a mouse or any other input devices. In choice, the integer options are 0,1,2,3 etc.
3. Valuator:
The valuator performs the logical function to generate a value between 0 and 1 by simualting the adjustment of any knob between two specified limtis. In vlauator, the real values are specififed in terms of distances.
4. Locator:
It functions to locate a device such as mouse or light pen from point to point to a specific location. It helps the device to enter into the world coordinates.
5. Stroke:
It provides the location values continuously in world coordiantes. It is an extension of a locator which generates the sequence of marked points.
6. Pick:
It helps to select the object or segment in a drawing which is already drawn.
******************















