Posts

FORMULA

Image
 FORMULAs   1.  Area of a square = Side × Side = S 2 2.  The area A of a triangle is given by the formula A=(1/2)*b*h where b is the base and h is the height of the triangle . 3.  The area of a circle is pi times the radius squared (A = π r²) 4.  Since the diameter is twice the radius , the circumference of a circle is a product of pi and 2r, i.e. 2 ( pi )* r . angle chart sin cos tan chart   Sin tan cos rules Trigonometry formula Common trigonometry formulas Trigonometry  Formula: Image link: https://upload.wikimedia.org/wikipedia/commons/2/23/Trigonometry_Formulas.png

NOTES

Image
Here covering topics are: 1. Straight line equation, 2. DDA, 3. Bresenham line       Equation of a straight line - m= (y2 - y1) / (x2-x1) = ∆y/ ∆x ∆y = m. ∆x ∆x= ∆y / m m = slope x,y = co-ordinate c= constant here.     DDA Algorithm (Digital Differential Analyzer)-  DDA is a scan conversion line drawing algorithm based on calculating either ∆y or ∆x.  If the slope is less than or equals to 1 (m<=1), we sample at unit x interval( ∆x = 1) and compute each successive y value as yk+1 = yk + m. Since m can be any real number between 0 and 1, the calculated y value must be rounded to nearest integer. For lines with a positive slope greater than 1 (m>1), we sample at unit y interval( ∆y = 1) and calculate xk+1 = xk + 1/m .  Advantage: 1. It is simple and easy to understand. 2. This method does not use multiplication theorem. Disadvantage: 1. It involves floating point additions. 2. Rounding off operations and floating point operations consumes a lot of time. 3. It is less suited for ha