Monday, September 23, 2019
Computer Science Lab Report Example | Topics and Well Written Essays - 1000 words
Computer Science - Lab Report Example The multiplications however are by 4, and we can accomplish this by shifting left twice. This is the simplest approach to solving the resolution problem. It is majorly used for drawing curves with slopes between âËâ1 and 1. Each pixel both below and above are drawn thus resulting in a curve that has a thickness of 2n+1 pixel in the y axis (Drawing Lines and Curves (Introduction to Computer Graphics Using Java 2D and 3D). It works better for thinner lines. In this algorithm the pixels are duplicated in columns for the lines with ââ¬â 1 Straight lines also have different thickness to the lines at an angle in which the thickness of the line is defined as the distance between the primitives boundaries perpendicular to the tangent. For a thickness parameter t, the horizontal/vertical line has the thickness t, while the one drawn at 450 has the average thickness of The lines are almost similar but this line is thicker at the endpoints. The width of the straight lines are thickest for parts with slopes of à ±1 whereas the thickness of circular objects varies with the point it is in. In moving pen algorithm the bits are masked off outside the circular region which is a complex task. The brute force writes pixels motre than once because the pens footprints extend beyond the adjacent pixels. The best strategy is to make snaps of the footprints to calculate spans of the following footprints at the bordering pixels as the diagram shows. The pixel duplication is a faster algorithm of drawing lines. it is however not the best algorithm for drawing thick lines because it uses a crude mode to draw the lines. It is thus suited to primitives that are not too thick. In java lines are drawn by the drawLine() method. The method has the following arguments void drawLine(int startX, int
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.