Wednesday, May 5, 2010

The following ae the some sample program example for practicle:

Write a program to draw the front face of clock by using midpoint ellipse generationalgorithm .draw minitue and hour hand of the clock by DDA line generation algorithm.


Write a program to move a ball along the spiral circle.

A. Implement line drawing algorithm that uses generic logic for all the lines irrespective of slope of line. Implement it in a 4-quadrant system
B. Use built-in functions to draw lines in different style.


1. Implement Bresenham’s algorithm for line drawing with following stylesA. Dotted line(Accept dot ratio from user)B. Thick line(Accept thickness from user)
2. Use built-in functions to do the same


A. Implement mid-point circle drawing algorithm
B.Use any built-in function to fill the circle with different patterns


A. Implement line clipping algorithm that makes use of region code.Implement it in a 4-Quadrant systemB. Draw the clipped line in different styles using built-in functions


A. Implement Liang-Barsky line clipping algorithm
B. Draw the clipped line in different styles using built-in functions

A. Implement Sutherland-Hodgeman polygon clipping algorithm.
B. Mention various built-in functions in graphics.h to draw and fill various objects


A.Implement any 2 curve generating algorithms.
B.Explain the advantage-disadvantage of both


.Draw the following figure using built-in functions1. Use polygon filling algorithm for repainting Red region with Green color


A. Implement any 4 2-D transformations on a hexagon/square /triange(Translation, Pivot point rotation, Pivot point scaling, Reflection, Scaling)
B. Implement composite transformation



A. Implement boundry fill and flood fill polygon filling algorithm.
B. Optimize the above algorithm to reduce computations


A. Implement following 3-D transformations on a cube(Translation, Rotation about X, Y, Z axis, Pivot point Scaling, Reflection aboutX, Y, Z axis)


Implement midpoint ellipse generating algorithm.Use any built-in function for drawing ellipse in Graphics.

A.Clip a line using cohen Sutherland algorithm against rectangular window .
B.Let line be fixed then show the clip line as rectangle is moving.

Practical List for SPCC

1. Design lexical analyzer Check for keywords and literals as token. i/p code will be pre defined in file .
2. I/P assembly program (pre defined in file) and display pseudo Opcode & Location Counter.
3. I/P assembly program (pre defined in file )and display machine opcode and location counter
4. I/P assembly program (pre defined in file) and if pseudo opcode table (pre defined in file) and machine opcode table (pre defined in file ) is present then create symbol table.
5. Implement a macro processor create MNT.
6. Design syntax analyzer and check for any four types of errors (=, (),{}) only
7. Design intermediate code generation
8. Design code optimization. Check for common sub-expression elimination.
9. Design lexical analyzer Check for Operator and terminal as token. I/p code will be pre defined in file.

10. Take postfix expression from user and do code optimization for sub-expression elimination
11. Identify all mnemonic in the program and display the MOT table along mnemonic binary opcode, length.
12. Take assembly program from user. Identify all pseudo opcode and display POT.
13. Identify all symbols and display symbol table along with address
14. Design Symantec analyzer. Check for if condition and initialization of database.