Skip to main content

Posts

Showing posts from May, 2015

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..

Scan Conversion(Circle) - Basic

Assignment 03. 1. Write a program to  generate points from 90 o  to 45 o  of a circle  centred at the origin, using  the standard x 2 +y 2 =r 2  circle equation,   using the trigonometric functions x = r cos θ, y = r sin θ  2. Use the circle's symmetric property to draw complete circles. The file is available here  Source.cpp Thanks to a friend NNI  

Scan Conversion(Line) - Bresenham's Algorithm

As the second Assignment we implemented Bresenham's Algorithm. For details visit  here . Assignment 02. 1.   Use the  Bresenham’s method to derive an algorithm to scan convert lines  with slope between 0 o  and -45 o (NOT  0 o  and +45 o ). 2.   Implement your algorithm to rasterize   lines that go from left to right, with slope between 0 o  and -45 o . 3.    Modify your program to scan convert lines with any slope. The file is available here (ScanConvertLine.cpp)

OpenGL

As we started learning OpenGL, We are going to do some practicals using Visual Studio and OpenGL. For that we need to follow some prerequisites. Thanks to Vishwanath This is GLUT installation instruction. Not free glut First download this 118 KB GLUT package from Here Extract the downloaded ZIP file and make sure you find the following glut.h glut32.lib glut32.dll If you have a 32 bits operating system, place glut32.dll to C:\Windows\System32\ , if your operating system is 64 bits, place it to 'C:\Windows\SysWOW64\' (to your system directory) Place glut.h C:\Program Files\Microsoft Visual Studio 12\VC\include\GL\ (NOTE: 12 here refers to your VS version it may be 8 or 10) If you do not find VC and following directories.. go on create it. Place glut32.lib to C:\Program Files\Microsoft Visual Studio 12\VC\lib\ Now, open visual Studio and Under Visual C++, select Empty Project(or your already existing p

Upgrading your PHP version

There are two ways to do this. I'll list out both in this post. 1. Backing Up and upgrading Take a backup of your htdocs and data folder (subfolder of mysql folder), reinstall upgrade version and replace those folders. 2. Overwriting the new version Inspired by YAIG(Yet Another IT Guy) 's blog, Here is the how-to version Warning : Do this at your own risk Download the latest version of PHP (zip package not the installer) De-archive it to a directory Copy the contents of the directory in the PHP sub-folder of your XAMPP installation directory, overwriting the files which are already present Now a simple trick: take the files which have a _2 in their names (for example php5apache2_2.dll ), copy them in the apache\bin subdirectory and remove the _2 part, overwriting the existing files.