22318 Lecture Notes - Lecture 5: Koch Snowflake, Computer Engineering, Lagrange Polynomial

10 views13 pages
Department
Course
Professor

Document Summary

Second year diploma courses in computer science & engineering / computer. Engineering / computer technology / information technology branch. We can use two approaches to draw curved lines; One approach is to use a curve generation algorithm such as dda. In this approach a true curve is created. In the second approach the curve is approximated by a number of small straight line augments. This can be achieved with the help of interpolation techniques. Digital differential analyzer algorithm uses the differential equation of the curve. We have already discussed the dda approach for line drawing in chapter 2. Let us see the dda algorithm for generating circular arcs. The equation for an arc in the angle parameter can be given as, Where (x0,y0) is the center of curvature, and r is the radius of arc. By taking differential equation we get, x = r cos + x0 y = r sin + y0.