Skip to main content

Posts

Rotating a Line w.r.t Origin and an Endpoint

Assignment 10 Rotating a given point in a anticlockwise direction about the origin in 2D. (You can specify a point by the left mouse button, and click the right mouse button to rotate it). Write a program to rotate any  line  through an angle (say 30 o ) with respect to  the origin [ Answer ]  one of its end points [ Answer ]

2D Transformation (Scale and Translate)

Write a program to accomplish the following tasks: draw a rectangle with vertices (0,0), (0,100), (200,100), (200,0). translates the rectangle to the mouse clicked location. Zoom-in the shape by pressing the "+" key, and  Zoom-out by pressing the "-" key. (Hint: Use the equations x = x 0 *S x , and y = y 0 *S y , where S x  and S y  are constants)    The file for the above will be available [-here-]  

Some Basic Questions and answers on Operating System Concepts

1.        What are the three main purposes of an operating system? To provide an environment for a computer user to execute programs on computer hardware in a convenient and efficient manner. To allocate the separate resources of the computer as needed to solve the problem given. The allocation process should be as fair and efficient as possible. As a control program it serves two major functions: (1)    supervision of the execution of user programs to prevent errors and improper use of the computer, and (2)    Management of the operation and control of I/O devices. 2.       Keeping in mind the various definitions of operating system, consider whether the operating system should include applications such as web browsers and mail programs. Argue both that it should and that it should not, and support your answers. Point: Applications such as web browsers and email tools are performing an increasingly important role in modern desktop computer systems. To fulfill

Scan Conversion(Circle) - Midpoint Algorithm

Assignment 05. Use the mid-point circle technique to derive the necessary equations to scan convert the following circular sector (i.e., points from  27 0 o  to 315 o ) .  Implement your method and u se the circle's symmetric property to draw complete circles.   The file is available here ( ScanConvertCirclemidpoint.cpp ) Play with it. You will understand..