Here is C++ implementation of LRU Algorithm.
Continue reading Implementation of LRU Page Replacement Algorithm in C++All posts by Ankur
Implementing First Fit Algorithm in C++
Here is C++ implementation of first fit algorithm.
Continue reading Implementing First Fit Algorithm in C++Symfony 2: Creating a Bundle
As discussed in this and this post, Symfony 2 is a web application framework. In Symfony 2 we organize our code in form of bundles. You can think bundle as collection of all code. Say if your app has a front-end, a back-end and an API then you can create three different bundles one for your front-end, one for your back-end and one for API. This will allow your to manage code efficiently.
Symfony 2 is flexible and it allows you to have as many as bundles you want in your app. Let’s understand this bundle system in detail by creating a bundle.
Implementing FCFS Scheduling Algorithm in C++
Here is C++ implementation of First Come First Serve (FCFS) algorithm.
Continue reading Implementing FCFS Scheduling Algorithm in C++Implementing Best Fit Algorithm in C++
Here is C++ implementation of Best Fit Algorithm.
Continue reading Implementing Best Fit Algorithm in C++Implementing Midpoint Circle Algorithm in C++
The Midpoint Circle Algorithm (MPC) is an efficient way to draw a circle using raster graphics. It is an improved version of Bresenham’s circle drawing algorithm and avoids using floating-point calculations, making it faster for computer graphics. This blog post explains a C++ program that implements the Midpoint Circle Algorithm using the graphics.h
library.
Implementing Midpoint Ellipse Algorithm in C++
Ellipses are fundamental shapes in computer graphics, widely used in various applications such as image processing, animation, and CAD systems. In this blog post, we’ll explore how to draw an ellipse using the Midpoint Ellipse Algorithm in C++ with graphics.h.
Introduction to Midpoint Ellipse Algorithm
The Midpoint Ellipse Algorithm is an efficient way to generate an ellipse using only integer operations. It is based on the midpoint method, which determines the next pixel position by evaluating a decision parameter.
This algorithm divides the ellipse into two regions:
- Region 1: The slope of the curve is less than 1.
- Region 2: The slope of the curve is greater than 1.
Each region is processed separately to ensure a smooth curve.
C++ Code Implementation
Below is the C++ program that implements the Midpoint Ellipse Algorithm. It uses the graphics.h library, which is part of the Turbo C++ environment.
Continue reading Implementing Midpoint Ellipse Algorithm in C++