Find Jobs
Hire Freelancers

Bresenham's line algorithm in C++

$5-10 USD

Closed
Posted over 21 years ago

$5-10 USD

Paid on delivery
Use Bresenham's algorithm to draw lines with varying thickness and in solid vs. dashed format. Use the weighted-intensity anti-aliasing approach to draw anti-aliased lines. (Note,no need to vary the thickness or style for the anti-aliased lines.) A sample program and makefile are provided showing the grid 0 to 500 in x and y with the origin in the lower left corner. The only opengl calls to be used are glVertex3i and glColor3f to plot pixels and select their color (intensity), respectively. The project is to to modify the given program to include the functionality described above and the resulting program will perform as follows: 1) The compiled program run as "line" will use lines to plot the first four letters of your name. While letters like T and X are very easy, for letters like 'S' you will need to plot a number of line segments that form the shape of the 'S'. No curves required this assignment. You may use regular or anti-aliased lines for this step. 2) The compiled program run as "line filename" will read the data file called 'filename' accepting and drawing requests for different line segments until the end of the file. Each request will have the form "x1 y1 x2 y2 code" where code is either "0" for a line with weighted-intensity based anti-aliasing, "1" for a dashed line, and "2" thru "9" for differing thicknesses where the code specifies how thick the solid line segment should be in pixels (i.e. "4" means a line of thickness 4). Obviously, x1 y1 is the start of the line segment and x2 y2 is the end of the line segment. All values of x and y will be integers between 0 and 500 inclusive. One request for a line segment will be made per line of the file. 3) try to get rid of the gaps which appear when two lines cross , like an X. and incoroparate the X into the first part. ## Deliverables 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request. 3) Complete ownership and distribution copyrights to all work purchased. ## Platform C++ which runs under Linux
Project ID: 2901523

About the project

2 proposals
Remote project
Active 21 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
2 freelancers are bidding on average $9 USD for this job
User Avatar
See private message.
$8.50 USD in 14 days
5.0 (30 reviews)
4.6
4.6
User Avatar
See private message.
$8.50 USD in 14 days
4.2 (111 reviews)
4.4
4.4

About the client

Flag of UNITED STATES
United States
5.0
1
Member since Jan 21, 2003

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.