Posts

Environment to write your first typescript program

Image
Install Node Go to the official Node.js website: https://nodejs.org/en/download/ Click on the "Windows Installer" button to download the appropriate installer for your system. Once the installer file has finished downloading, double-click it to run it. Follow the installer's prompts to complete the installation process. You can generally just accept the default options. After the installation completes, open the Command Prompt or PowerShell application. Type node -v into the command prompt to verify that Node.js has been installed correctly. If you see a version number displayed, then it has been installed successfully. Install TypeScript Open the Command Prompt or PowerShell application. Type the following command to install TypeScript using the Node Package Manager (npm): npm install -g typescript The -g flag indicates that TypeScript should be installed globally, meaning it will be available throughout your system. After the installation completes, you can verify that ...

Drawing a man using Tkinter

Drawing a man using Tkinter-python program download drawing a man program

Scaling and Translation

Here is the line scaling and translation program as pdf download translation and scaling

Analysis of Algorithm:Time Complexity

Image
Efficiency of an algorithm can be measured in terms of: • Execution time (time complexity) • The amount of memory required (space complexity) Due to limitation of time over technology , the time complexity is much more interesting than space complexity. • Time complexity : A measure of the amount of time required to execute an algorithm. Factors that should not affect time complexity analysis: • The programming language chosen to implement the algorithm • The quality of the compiler • The speed of the computer on which the algorithm is to be executed In fact, Time complexity analysis for an algorithm is independent of programming language,machine used. Objectives of time complexity analysis: • To determine the feasibility of an algorithm by estimating an upper bound on the amount of work performed • To compare different algorithms before deciding on which one to implement • Analysis is based on the amount of work done by the algorithm • Time complexity expresse...

Download midpoint circle and ellipse

Here is midpoint circle and midpoint ellipse algorithm midpoint circle algorithm mid point ellipse algorithm

Download midpoint line drawing algorithm

you can download bresenham's line drawing algorithm from here paste it into a file_name.py then run it.. bresenham_line_drawing_algorithm_download

Bresenham's line drawing algorithm

A line segment is defined by an infinite set of points which lie between two points; these points have no area. A problem occurs, however, when drawing lines on a computer screen, namely that we have to approximate the line with pixels which are not infinitely small, and which are limited to fixed positions based on the screen resolution. A simple line drawing algorithm can be implemented as, filename dda.py from Tkinter import * import math #defining main function def main(): #reading end points of line x0 = int(raw_input("ENTER THE Xo : ")) y0 = int(raw_input("ENTER THE Yo : ")) x1 = int(raw_input("ENTER THE Xn : ")) y1 = int(raw_input("ENTER THE Yn : ")) root = Tk() pic = PhotoImage(width=800,height=800) lb = Label(root,image=pic) lb.pack() color = "blue" dx = x2 – x1; dy = y2 – y1; m = dy/dx for x in range(x1,x2) y = m*x + y1 + 0.5; pic.put(color(x, y))...