RVRajkumar V Patilinrajkumarpatil.hashnode.dev·Mar 15, 2021 · 2 min readAssignment 3 .Bresenham’s circle drawing algorithmBresenham’s circle drawing algorithm Set initial values of (xc, yc) and (x, y) Set decision parameter d to d = 3 – (2 * r). do while x < = y Call 8way drawCircle(int x, int y). Increment value of x. If d < 0, set d = d + (4*x) + 6 Else, set d = d +...00
RVRajkumar V Patilinrajkumarpatil.hashnode.dev·Mar 7, 2021 · 2 min read4. Bresenham's Line Algorithm in C++ using GlutAlgorithm Code in c++ using Glut #include<GL/glut.h> #include<math.h> #include<iostream> using namespace std; float x_1,y_1,x_2,y_2; void Line(){ float dy, dx, m , P; dy = y_2 - y_1; dx = x_2 - x_1; m = dy/dx; P = 2*dy - dx...00
RVRajkumar V Patilinrajkumarpatil.hashnode.dev·Mar 1, 2021 · 3 min read3. DDA Line Drawing Algorithm in C++ using GLUT BasicDDA Line Drawing Algorithm Given 2 point (x1, y1) to (x2,y2) ``` 1. Read Line end point (x1,y1)(x2,y2) 2. ∆x = |x2-x1| , ∆y = |y2-y1| 3. If(∆x ≥ ∆y) Then Length = ∆x Else ...00
RVRajkumar V Patilinrajkumarpatil.hashnode.dev·Feb 16, 2021 · 2 min read1. Introduction to Computer Graphics (Glut)INTRODUCTION What is Computer Graphics? Branch of Computer Science. Computer + Graphs + Pics = Computer Graphics. Drawing line, Chart, Graphs etc. on the screen using Programming language is computer Graphics. Book Definition Computer graphics is ...01G
RVRajkumar V Patilinrajkumarpatil.hashnode.dev·Feb 16, 2021 · 3 min read2. GLUT Triangle(Computer-Graphics)Shows how to use GLUT. Has minimal structure: only main() and a display callback. Draws only using glColor and glVertex within glBegin and glEnd in the display callback. Uses only the GL_POLYGON drawing mode. Illustrates glClear and glFlush. // A sim...00