Posts

Showing posts from 2012

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

The linux networking commands

In this article i share a list of essential networking commands So upon reading you will be a small network administrator. You want it!!! ,then go ahead.. 1.ping This command is used to check the connectivity of a system to a network.Whenever there is problem in network connectivity we use ping to ensure the system is connected to network. shuhaib@ubuntu:~$ ping 172.16.0.254 PING 172.16.0.254 (172.16.0.254) 56(84) bytes of data. 64 bytes from 172.16.0.254: icmp_req=1 ttl=64 time=51.9 ms 64 bytes from 172.16.0.254: icmp_req=2 ttl=64 time=78.2 ms 64 bytes from 172.16.0.254: icmp_req=3 ttl=64 time=54.2 ms 64 bytes from 172.16.0.254: icmp_req=4 ttl=64 time=31.4 ms or shuhaib@ubuntu:~$ ping yahoo.com PING yahoo.com (98.139.127.62) 56(84) bytes of data. 64 bytes from ir2.fp.vip.sp2.yahoo.com (98.139.127.62): icmp_req=2 ttl=49 time=1605 ms 64 bytes from ir2.fp.vip.sp2.yahoo.com (98.139.127.62): icmp_req=4 ttl=49 time=462 ms 64 bytes from ir2.fp.vip.sp2.yahoo.com (98.139.127.62): icmp_req=5 tt...