Bresenham's Line Drawing Algorithm

  Рет қаралды 457,855

Abdul Bari

Abdul Bari

Күн бұрын

Пікірлер: 525
@Raddaya
@Raddaya 5 жыл бұрын
Sir, last sem due to you alone I survived algorithms. Now it seems you will help me survive Graphics as well. I desperately wish all teachers could explain like you!
@abc-ym4zs
@abc-ym4zs Жыл бұрын
Bro i have sem exams can you suggest some good youtube channel for computer graphics please reply bro i don't know anything for exam
@settings_json
@settings_json Жыл бұрын
@@abc-ym4zs kzbin.info/aero/PLYwpaL_SFmcAtxMe7ahYC4ZYjQHun_b-T
@wolf6221
@wolf6221 Жыл бұрын
​@@abc-ym4zsdid you found any?
@shantanu9879
@shantanu9879 Жыл бұрын
@@abc-ym4zs 5 minutes engineering is a great channel for studying CG
@067-anurag9
@067-anurag9 8 ай бұрын
​@@abc-ym4zs1$11
@ifargantech
@ifargantech 5 жыл бұрын
I am sorry on 35:56 ... P=2dy-dx.... not p=2dx-dy .... This lecturer is greater than attending my normal class. Thank you... Also you are my great lecturer of Analysis of Algorithm. I have knowm TIME COMPLEXITY because of you only... THANK YOU!!
@jpsilver3510
@jpsilver3510 5 жыл бұрын
This took me 3 hours to figure out ':D
@infotainment7123
@infotainment7123 4 жыл бұрын
this is a error right? its always P=2dy-dx
@sheetaljain3569
@sheetaljain3569 4 жыл бұрын
After 35;56 ,we will take dy,ex in if and else block as well. Because sir there is no variable in the algorithm as you have written in algorithm in if and else block ∆x, ∆y
@justforfun4680
@justforfun4680 4 жыл бұрын
Yes, it is an error.
@nsptech9773
@nsptech9773 4 жыл бұрын
Yes! There was an error but if you take a look at 38:06 the code is corrected.
@ritvikdayal3735
@ritvikdayal3735 4 жыл бұрын
People like you are blessed with a beautiful skill, "Teaching". Thanks for being such a good teacher to all of us.
@bernarmay1950
@bernarmay1950 5 жыл бұрын
This is the best so far I have seen on Bresenham's algorithm explanation. You deserve an accolades👍
@bryphi77
@bryphi77 5 жыл бұрын
I have learned so much from you... cant thank you enough! I got your c++ course a while back, and just got your data structures course now. Cant wait to start :)
@princegirish1991
@princegirish1991 5 жыл бұрын
Where did u get the course from
@gadswez
@gadswez 5 жыл бұрын
@@princegirish1991 See the description.
@mryup6100
@mryup6100 5 жыл бұрын
@@SATYAMYADAV-xy3mx support Mr. Bari buddy
@kaushilkundalia2197
@kaushilkundalia2197 5 жыл бұрын
Algo explaination starts at 14:46 . Thank me later
@chetangupta2130
@chetangupta2130 5 жыл бұрын
thanks bhai
@pragyan394
@pragyan394 5 жыл бұрын
thanks, bro
@ayanokojikiyotaka6988
@ayanokojikiyotaka6988 5 жыл бұрын
thanks fam
@abhinavsinghal1530
@abhinavsinghal1530 5 жыл бұрын
thnx buddy
@mortonmccain6487
@mortonmccain6487 5 жыл бұрын
My hero
@MindBodySoulOk
@MindBodySoulOk 4 жыл бұрын
Dr. Breshingham was impressed with my graphics programming back in the late 80s. He came to visit the IT department at Coastal Carolina. Never forgot that. He lives in Rock Hill or did at the time.
@shivkrishnajaiswal8394
@shivkrishnajaiswal8394 2 жыл бұрын
Great explanation. Thanks. @24.31 you should not skip that term as it will be needed to define the sign. However, in calculation of P[k+1], you will not need it as it is defined in terms of P[k] and P[k] takes care of this constant term.
@shivamkhare9472
@shivamkhare9472 2 жыл бұрын
sir, literally you are the most amazing teacher of all the teachers I have seen on youtube.thank you very much sir for your efforts
@aakashkumarsingh4840
@aakashkumarsingh4840 4 жыл бұрын
28:51 I have a doubt , instead of " if (Pnext - Pk
@jawaheerrayhaan9557
@jawaheerrayhaan9557 4 жыл бұрын
I literally scrolled down to see this!!
@praveensharma4014
@praveensharma4014 2 жыл бұрын
You're correct. He should have given this clarification. Otherwise it's very confusing. Also at 29:41 it should be Pk >= 0 instead of P next - Pk >= 0.
@thecrazygamer7334
@thecrazygamer7334 2 жыл бұрын
Imo we will check pk for first operation but after that We will pk+1-pk
@brandon.h9624
@brandon.h9624 Жыл бұрын
@@praveensharma4014 I took like 1 hour to get around how Pnext - Pk < 0. I think he was trying to say, Pnext - (pk if less - 0) and Pnext - (pk if greater or equal to 0).
@sanjanaattanayake4231
@sanjanaattanayake4231 10 ай бұрын
These explanations are so clear because of the background order you follow Sir. Once we learn from you, we are less likely to forget because we know "why" it was done :) Thank you very much!
@rupambose4830
@rupambose4830 4 жыл бұрын
Best explanation of Bresenham's algorithm I have ever heard.
@refatkhan7972
@refatkhan7972 5 жыл бұрын
The best teacher i have ever seen,the way you explain is awsome.
@laskdjf3880
@laskdjf3880 5 ай бұрын
I've been frustrated with this concept for a bit, but you're explanations are fantastic. Thank you!!!
@nahidaahmed8224
@nahidaahmed8224 5 жыл бұрын
Sir ,pls make more videos on computer graphics ...
@raghavendrabhadauria5426
@raghavendrabhadauria5426 4 жыл бұрын
you are the only one who explaind derivation of breshanham algorithm on youtube even my university teacher didnt explained it
@abinayaragunathan8399
@abinayaragunathan8399 4 жыл бұрын
Yesterday only I saw ur DDA line drawing algorithm video for the first time.. Ur way of explanation helps me to understand the concept well.. Thank you sir.. Pls make more videos based on circle and ellipse generating algorithms, 2D geometric transformations, matrix representations, 2D viewing in graphics..
@shairyasharma9506
@shairyasharma9506 2 жыл бұрын
yes
@abc-ym4zs
@abc-ym4zs Жыл бұрын
Bro do you find any good youtube channel for computer graphics please tell bro I have sem exams
@RossMcgowanMaths
@RossMcgowanMaths Жыл бұрын
Fantastic. I thought I was going to have to derive this by myself as I only seen superficial descriptions on other videos. A full and complete derivation with example. Nice. Very pleased that I found this video.
@parikshithreddyvempati4895
@parikshithreddyvempati4895 5 жыл бұрын
I love you sir Got good marks in DAA all thanks to your videos
@rainajavid4716
@rainajavid4716 5 жыл бұрын
sir you are really great especially your way of explanation i haven't seen anyone like you on youtube
@underwaterdol613
@underwaterdol613 3 жыл бұрын
One of the best explanations and instructors in the web. He has additional C++ courses and algorithms in C++ courses which are one of the best in the net.
@AswinMuralee
@AswinMuralee 5 жыл бұрын
Dear sir I have cleared my exams after taking lectures from ur videos Thank you so much sir...😀
@AswinMuralee
@AswinMuralee 5 жыл бұрын
Of course sir 😇
@ronaldtamsar
@ronaldtamsar 3 жыл бұрын
Nothing clear explanation like this ever seen, good job sir
@sohelferdous2599
@sohelferdous2599 5 жыл бұрын
This man is owsome Singham....full of knowledge...
@lalankarna8253
@lalankarna8253 4 жыл бұрын
sir, no one can teach like u. thanks God.. to give us teacher like u......
@SatishKumar-bs8dc
@SatishKumar-bs8dc Жыл бұрын
Best explanation ever for bresenham’s algorithm.
@aakura
@aakura 5 жыл бұрын
MORE CONTENT ON COMPUTER GRAPHICS NEEDED!!! EITHER AS UDEMY COURSE OR KZbin VIDEO.
@ashamalkani
@ashamalkani 3 жыл бұрын
Sir I understood the DDA algorithm. Thanks a lot. And wishing you a happy Teachers Day.
@sarastemkar7835
@sarastemkar7835 4 жыл бұрын
Thing is i am really enjoy your lecture so please teach everything you learn in your entire life
@ernestghansah4402
@ernestghansah4402 2 жыл бұрын
Thank you, sir. I now understand the DDA algorithm. Your explanation will help me get an A in computer graphics.
@franekbaron9494
@franekbaron9494 11 ай бұрын
28:29 Why Pk+1 - Pk < 0 means we stayed on the y value.Why it means that we were not incrementing? I cannot catch that. Why didn't u write that if Pk < 0 then we do something and if Pk > 0 then we do something. What is about this Pk+1 - Pk < 0?
@samlinus836
@samlinus836 Жыл бұрын
You're a lifesaver sir. The clear cut xplanation ever. Thank u much sir
@yyliu0907
@yyliu0907 7 ай бұрын
from 24:18 there appears to be a redundant explanation about constant which confused me. P[k] needn't change at all. and if condition of 29:46 should be just whether P[k] is negative or positive to be clear. overall, thank you for your video.
@Sharmii25
@Sharmii25 Ай бұрын
i'm watching this in 2024... and really grateful for every word in your explanation sir my frustration just got away , !!!!
@esraelbizuneh9756
@esraelbizuneh9756 2 жыл бұрын
amazing tutor and amazing teacher Ihave ever seen thanks sir from Ethiopia
@nitukiran5833
@nitukiran5833 3 ай бұрын
The views are more than the likes, why is this so?? Can't we just like for his efforts? I found it useful sir.Thank you for your efforts!! ❤
@AlgoRhythmsWithAyush
@AlgoRhythmsWithAyush 2 жыл бұрын
At 31:14 why are we saying if Pk=0 for the lower equation, when it actually depends on the difference of Pk+1 and Pk?
@vigneshwaran568
@vigneshwaran568 4 жыл бұрын
give medal to this great man................................................................
@priyathakur79
@priyathakur79 3 жыл бұрын
this is just awesome, finally, i understood an algorithm, and if I understood then anybody can. thank you so much.
@naisha_budhu
@naisha_budhu 2 жыл бұрын
The best explanation I've found
@ROBINSON_1995
@ROBINSON_1995 5 жыл бұрын
*Thank you so much...now i clearly understood about Bresenham's Algo.* 👍😍
@TibebuKejela-md5mz
@TibebuKejela-md5mz Жыл бұрын
i have't seen ever like you ,you have agreat teaching skill
@itcoolboy
@itcoolboy 3 жыл бұрын
Sir, I am interested in computer graphics. I love your lecture very much. Your lecture is very comprehensive and easy for me to understand. Please keep on making similar video, thanks!!!
@pushpraj853
@pushpraj853 4 жыл бұрын
Lecture was great Sir. Thank you for making our B.Tech. Easy.
@devanshusachdev9190
@devanshusachdev9190 5 жыл бұрын
Sir you are outstanding!!! You made it crystal clear...thank you so much for putting your efforts.😊
@suyash.01
@suyash.01 4 жыл бұрын
May god bless this teacher! So much valuable content for free! Thanks! Thanks!
@arunasengar4991
@arunasengar4991 4 жыл бұрын
Sir very clear and detail explanation. Thankyou for explaining algorithm in such an easy way.
@vedantshinde3717
@vedantshinde3717 4 жыл бұрын
Excellent Your teaching is simply perfect.
@qotaibai5112
@qotaibai5112 5 жыл бұрын
Hey, i am studying Virtual Reality and you helped me with graphics do much.. thanks ❤
@swapnilraut1858
@swapnilraut1858 3 жыл бұрын
Thankyou sir for explaining in such a simple way..
@shamimsarker839
@shamimsarker839 2 жыл бұрын
Blessed are those who are your students. Why my university teachers are not like you?
@zaidsaiyed6076
@zaidsaiyed6076 5 жыл бұрын
Great..great...great....simple and amazing explaination....i did not get bored even 1 sec.....superbbb.
@perplexedbot
@perplexedbot 3 жыл бұрын
you're saving my semester
@ShaktiSingh0591
@ShaktiSingh0591 8 ай бұрын
Us bro us
@nathancannell6272
@nathancannell6272 11 ай бұрын
Thank you very much sir, I can now pass my computer class sir. Thanks sir.
@kaursingh637
@kaursingh637 4 жыл бұрын
sir u r the best on algorithms
@berkealgul2503
@berkealgul2503 4 жыл бұрын
Sir thank you for straightforward explanation with good english speaking. i subbed to your channel
@dvyadav2307
@dvyadav2307 10 ай бұрын
Completly understood the algorithm, thank you very much sir ❤
@vinayakabegari7724
@vinayakabegari7724 5 жыл бұрын
Very good job sir. It's very easy to learn while ur teaching. Thank you sir.
@KushG420
@KushG420 4 жыл бұрын
At 28:30 It should've been Pk which you should be checking for less than 0 or not right anyone?
@AyshaFilms
@AyshaFilms 2 жыл бұрын
THANK YOU!!! Been struggling for so long, this made is clear and understandable
@creativeconnect10
@creativeconnect10 3 жыл бұрын
yey dekhne ke baad muje trigonometry easy lagne lgi hai
@laylaDoughsAreolas
@laylaDoughsAreolas Жыл бұрын
Best teacher ever , forever grateful ❤
@mdnazmulhaque3337
@mdnazmulhaque3337 5 жыл бұрын
your lecture is very exclusive i have never seen such lecture.
@harshdhawale2669
@harshdhawale2669 3 жыл бұрын
9:20 what a perfection man !!!!!
@chandrakantjena3431
@chandrakantjena3431 2 жыл бұрын
One of the best Teachers.
@zidane6165
@zidane6165 5 жыл бұрын
My professor abdul bari thank you so much for your hard work
@ulukbekhamitov6431
@ulukbekhamitov6431 5 жыл бұрын
Thank you Abdul Bari! Your lessons are very useful.
@HarshitPR6644
@HarshitPR6644 4 жыл бұрын
Sir you are a god sent for us, thank you sir 😭😭
@sagaralwani75
@sagaralwani75 4 жыл бұрын
at 31:19 he said if pk < 1 we follow first one, but see as we know if pnext-pk < 0 we follow this, how pk be less than zero now...? have you understood this?
@suyashsharma2094
@suyashsharma2094 4 жыл бұрын
@@sagaralwani75 same issue it should be Pk>0 for 1st one
@nikhilhaspe2734
@nikhilhaspe2734 3 жыл бұрын
Excellent Exlplanation on entire YT
@rajeshrocky911
@rajeshrocky911 5 жыл бұрын
Thank you sir it is very useful😳😇and it's very helpful for my exams thank u so much sir
@nishchalvashisth1627
@nishchalvashisth1627 5 жыл бұрын
as we can show on 37:39 that tou use in red color marker (D=delta) p=2Dy-Dx but in algo you use p=2dx-dy but as i know dx=x2-x1 while Dy=y2-y1
@kunnaltyagi5762
@kunnaltyagi5762 8 күн бұрын
Yes I have the same doubt
@vandanagoud2957
@vandanagoud2957 6 ай бұрын
You are a very good teacher sir❤
@rajareddy8184
@rajareddy8184 5 жыл бұрын
Dear sir do compiler design tutorials and the way you explain is awesome
@devyani_jain2000
@devyani_jain2000 3 жыл бұрын
This was very helpful and easy to understand video...thankyou sir❤. Can you plz make a playlist on computer graphics and multimedia subject. I literally understood the algorithm in one go..🙌🙌
@DenisRizovBG
@DenisRizovBG 4 жыл бұрын
Very helpful. I had to create a vision check system on a 2D grid on a game I was working on, based on this algorithm. First I tried with wikipedia, and found out that the pseudocode there is incorrect. This video helped me to understand how the algorithm works. Once I found out is was trivial to tweak it for all 4 octants. Thank you very much.
@sarangabbasi2560
@sarangabbasi2560 2 жыл бұрын
algo is complex but this video made it simple
@prakashkhadka579
@prakashkhadka579 5 жыл бұрын
sir you are really great .........your teaching influence every students........I was totally satisfied with your lectures......i hope you will make more videos in computer graphics too
@javedshah2218
@javedshah2218 5 жыл бұрын
Nice explanation... examples are explained very easily and carefully...
@vintoncerf7562
@vintoncerf7562 2 жыл бұрын
Again, I'm learning a computer science subject from an Indian guy. Thank you
@maananth3434
@maananth3434 4 жыл бұрын
SEMA sir... Your explanation is very much clear
@faizakim4998
@faizakim4998 5 жыл бұрын
Sir pls make some vedios on midpoint circle drawing algorithm and midpoint ellipse drawing algorithm am really waiting for ur lecture in a short period of time
@mihirvora391
@mihirvora391 4 жыл бұрын
Thank you soo much.U made the concept crystal clear..TYSM❤️❤️
@itz_me_imraan02
@itz_me_imraan02 4 жыл бұрын
Best explanation on youtube💓
@sagaralwani75
@sagaralwani75 4 жыл бұрын
at 31:19 he said if pk < 1 we follow first one, but see as we know if pnext-pk < 0 we follow this, how pk be less than zero now...? have you understood this?
@itz_me_imraan02
@itz_me_imraan02 4 жыл бұрын
@@sagaralwani75 here he used it as a general term...by Pk he meant the value of Pk (decision parameter)
@sagaralwani75
@sagaralwani75 4 жыл бұрын
But, how he decides pk
@itz_me_imraan02
@itz_me_imraan02 4 жыл бұрын
@@sagaralwani75 at 31:19 when he said pk
@sagaralwani75
@sagaralwani75 4 жыл бұрын
Waha nahi bata rakha h, ek baar wapis dekhiye aap
@jpsilver3510
@jpsilver3510 5 жыл бұрын
For anyone trying to figure out how to implement m > 1, here is a c++ implementation i created from the pseudo code on the wiki Just replace all the classes that's not found(like vector and color, these are classes i created) void DrawPane::renderLine(Vector2f a, Vector2f b, int color) { if(abs(b.getY() - a.getY()) < abs(b.getX() - a.getX())){ if(a.getX() > b.getX()){ renderLineLow(b, a, color); }else{ renderLineLow(a, b, color); } }else{ if(a.getY() > b.getY()){ renderLineHigh(b, a, color); }else{ renderLineHigh(a, b, color); } } } void DrawPane::clearCanvas() { std::fill_n(m_canvas_data, m_width * m_height, 0); } void DrawPane::renderPolygon(Vector2f f, Vector2f f1, Vector2f f2) { renderLine(f, f1, Color::RED); renderLine(f1, f2, Color::GREEN); renderLine(f2, f, Color::BLUE); } void DrawPane::renderLineLow(Vector2f a, Vector2f b, int color) { float dx = b.getX() - a.getX(); float dy = b.getY() - a.getY(); float p = 2*dy -dx; float i = 1; if(dy < 0){ dy = -dy; i = -1; } int y = a.getY(); for (int x = a.getX(); x < b.getX(); x++) { m_canvas_data[y * m_width + x] = color; if (p > 0){//Set bottom pixel p -= 2*dx; y += i; } p = p + 2*dy; } } void DrawPane::renderLineHigh(Vector2f a, Vector2f b, int color) { float dx = b.getX() - a.getX(); float dy = b.getY() - a.getY(); float p = 2*dx -dy; float i = 1; if(dx < 0){ dx = -dx; i = -1; } int x = a.getX(); for (int y = a.getY(); y < b.getY(); y++) { m_canvas_data[y * m_width + x] = color; if (p > 0) {//Set bottom pixel p -= 2*dy; x += i; } p += 2*dx; } }
@zhzh-y7h
@zhzh-y7h Жыл бұрын
This video is so great and easy to understand. Thank you!
@vaishnavighode112
@vaishnavighode112 4 жыл бұрын
Sir pls add bresehams circle drawing algorithm 👍your videos are so helpful to us to easily clear the concepts🙏
@mikeyao1868
@mikeyao1868 Жыл бұрын
Sir, your explanation is so clear that you could consider opening a specific course on computer graphics or digital image processing. ❤
@prasunneupane4053
@prasunneupane4053 5 жыл бұрын
sir at 36:06 isn't it p=2dy-dx. You have written p=2dx-dy. Great vedio sir keep it up.
@shashikalaraju5769
@shashikalaraju5769 5 жыл бұрын
God has manifested to me in your form. Thank you.
@shashikalaraju5769
@shashikalaraju5769 3 жыл бұрын
@EXTREME FUN Aw.. Thank you.
@qwwert
@qwwert 4 жыл бұрын
Sir you are super explaining unbelievable.
@faisalmalik1433
@faisalmalik1433 5 жыл бұрын
Thank you sir....for great explanation....plz make videos on other graphical theorem's like polygon filling and boundry fill algorithm.....plz sir...my exams are starting from 30 March.....plz help me sir....
@buntygupta7812
@buntygupta7812 4 жыл бұрын
Sir your lectures are too good.. Thank you sir
@awangprajaanugerah8231
@awangprajaanugerah8231 2 жыл бұрын
Thanks you sir your video is so easy to understand
@duaasaleem6631
@duaasaleem6631 4 жыл бұрын
explanation outstanding sir .you make my day sir .stay blessed .
@KY22077
@KY22077 5 жыл бұрын
Thank you very much Sir, Please make videos about Computability, decidable and undecidable problems.
@KY22077
@KY22077 5 жыл бұрын
@@abdul_bari Thank you Sir for replying me. Sir I have searched and look at some videos too, but I didn't understand it correctly. Because they are not explain it in deatils. And I have exam in one Week. Thank you
@anushka_5163
@anushka_5163 2 жыл бұрын
@28:28 We are assigning the value for P next based on the difference of Pnext and P ,but before knowing the value of Pnext , how do we make the judgement, is this some sort of prediction method, where we backtrack on contradiction? I am very confused
@prekshasharma1216
@prekshasharma1216 5 жыл бұрын
Thanku so much sir....u have explained it very well....thanx alot
@pika12399
@pika12399 5 ай бұрын
thank you sir for changing my life i love you sir 😘❤
@SagarYouTubee
@SagarYouTubee 2 жыл бұрын
Algorithm starts from 35:14
@sashamakeev7547
@sashamakeev7547 5 ай бұрын
Amazing lecture, would love to get explanation on how to transform the algorythm for octants other than first, but i guess i'll be able to do that myself :D
DDA Line Drawing Algorithm - Computer Graphics
26:48
Abdul Bari
Рет қаралды 555 М.
Bresenham's Line Algorithm - Demystified Step by Step
16:10
NoBS Code
Рет қаралды 67 М.
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН
2D Graphics Algorithms (part 2)
23:01
Brian Will
Рет қаралды 58 М.
2.8.1  QuickSort Algorithm
13:43
Abdul Bari
Рет қаралды 3,4 МЛН
Fast Inverse Square Root - A Quake III Algorithm
20:08
Nemean
Рет қаралды 5 МЛН
How Your Computer Draws Lines
4:26
Andre Prihodko
Рет қаралды 181 М.
How to Remember Everything You Read
26:12
Justin Sung
Рет қаралды 2,2 МЛН
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН