Sutherland-Hodgman Polygon Clipping Algorithm

Поделиться
HTML-код
  • Опубликовано: 16 сен 2024
  • Computer Graphics : Sutherland-Hodgman Polygon Clipping Algorithm
    Thanks again for watching ! If you liked it pls make it a point to comment below. Keeps me going :)

Комментарии • 158

  • @rishabsingh2475
    @rishabsingh2475 7 лет назад +1

    an entire lecture thing in just 8 min. just wow. much helpful thanks a lot .

  • @FPChris
    @FPChris 2 года назад +6

    You didn’t explain how you clipped the low left corner. V5’ would wrap to V3’ not magically magically create the corner.

    • @yetanother7428
      @yetanother7428 2 месяца назад

      I was thinking the same thing. (Also, I think you meant V2', instead of V3').
      This video is wrong. If anyone is looking around, to save time, I found a video with the correct explanation of the algorithm: ruclips.net/video/Euuw72Ymu0M/видео.html

  • @CMSARAN
    @CMSARAN 4 года назад +2

    The video was an good guide for me during my semester exam i thank you for your help and i request you to upload this kind of video with updated version of items frequently EVERY ENGINEER SHOULD WATCH

  • @pe_P
    @pe_P 2 года назад +1

    Thankyou for the lecture..👍
    And your voice is so beautiful🌝

  • @anushkamittal4132
    @anushkamittal4132 6 лет назад

    Amazingly clarified..I must appreciate your way of teaching so politely . Thankyou so mch sir 😇

  • @nabeelrao2638
    @nabeelrao2638 7 лет назад

    I have an exam tomorrow and wasn't being able to understand this from the book.
    But now i clearly understood it. Thanks a lot for this informative video!!!

  • @umangpancholi5888
    @umangpancholi5888 3 года назад +1

    Thanks a lot! Also, your voice is brilliant XD

  • @talsveta
    @talsveta 9 лет назад +22

    Another scenario should be taken into account is the case when both vertices are outside the clipping area, while the line they form *does* cross the clipping area. I guess in this case you should not discard both v1 and v2

    • @TheBootStrappers
      @TheBootStrappers  9 лет назад +3

      talsveta yeah in that case you have to assume a point on the line crossing as a vertices of the polygon(hypothetically) and then break that line into the cases mentioned in the video. Thank for pointing it out though:)

    • @arpanmajumder655
      @arpanmajumder655 7 лет назад +1

      Yeah,I was also thinking the same!
      Great tutorial otherwise!

  • @markwoo9845
    @markwoo9845 8 лет назад +2

    good tutorial for Sutherland-Hodgman Algorithm. thank you, you really help me a lot

  • @dhruvtonemare8473
    @dhruvtonemare8473 5 месяцев назад

    Thank you sir simple and easy video with kind understanding ❤😊

  • @mikhailsartakov4750
    @mikhailsartakov4750 2 месяца назад

    Brilliant video!

  • @akanshachaurasia3329
    @akanshachaurasia3329 6 лет назад

    I really liked your lectures they are very beneficial..... I request you to pls upload more videos on computer graphics

  • @ostaphrytsyshyn3199
    @ostaphrytsyshyn3199 8 лет назад +7

    Considering points as "inside" and "outside" will not work in all cases.
    Check this image. i.imgur.com/e6S0V20.png
    Segment ED is intersecting rectangle, but nither E nor D is inside the rect.

    • @jinxblaze
      @jinxblaze 8 лет назад

      +Ostap Hrytsyshyn yup

    • @anshulhedaoo8332
      @anshulhedaoo8332 7 лет назад

      did you get any solution of this bro???

    • @LionKILLGER
      @LionKILLGER 6 лет назад +1

      The solution is to NOT check the 4 cases according to the rectangle
      but according to the clipping edge I guess.
      If you have a closer look at the pseudocode provided by e.g. wikipedia
      ( en.wikipedia.org/wiki/Sutherland%E2%80%93Hodgman_algorithm#Pseudo_code )
      you quickly see that one has to pick an edge of the clipping polygon.
      E.g.:
      Take the 1. Clipping Edge (e.g. left edge)
      -> now take as input points all points of the polygon and check the 4 cases against this edge
      -> i.e. if its left of the edge -> its outside, if its right of it -> its inside
      -> add the new intersection points like the cases tell you and you get a new list L'
      -> you take that list as the input list for the next iteration
      Take the 2. Clipping Edge (e.g. top edge) and as point input list L' from the previous iteration.
      -> now perform the same steps as before and get the next output list L'
      ... continue this procedure for the other 2 edges of your rectangle.
      I think following the steps like I wrote will indeed capture the edge by E and D.
      ( Please correct me if I am wrong because I also need to know the correct solution :D )

  • @Aziz00747
    @Aziz00747 9 лет назад +1

    Thank you so much! really well explained! God bless u!

  • @varshathaya2515
    @varshathaya2515 6 месяцев назад

    very understandable. Thank you 🙏

  • @ashwaniprasad7381
    @ashwaniprasad7381 8 лет назад +1

    Just in one word "AWESOME"

  • @omarmoataz
    @omarmoataz 8 лет назад +1

    This was great, thanks.

  • @ruxandraciortea9475
    @ruxandraciortea9475 2 года назад

    thank you sir, very nice explanation! very useful!

  • @prateekparabify
    @prateekparabify 9 лет назад +1

    Very nicely explained . very precise

  • @AndrewJoemon
    @AndrewJoemon 3 года назад

    thank you for this video... wonderful explanation..

  • @abishekh_kc
    @abishekh_kc 5 лет назад

    thanks buddy... well explained without any doubts.

  • @simranguliani1609
    @simranguliani1609 4 месяца назад

    would be great if you have given these in written points,but it was such an easy explanation ,thanks

  • @filat239
    @filat239 4 года назад

    I like that. Well explained!

  • @ashankavindu2409
    @ashankavindu2409 2 года назад

    Thank you very much sir ❤️❤️❤️❤️

  • @this_rishi
    @this_rishi 6 лет назад

    Thanks a lot for the video... It was really helpful.

  • @kumarabhishek4735
    @kumarabhishek4735 8 лет назад

    very nice mann

  • @sahirsharma4541
    @sahirsharma4541 3 года назад

    Good job!

  • @kladimirovo
    @kladimirovo 9 лет назад +1

    very good explanation, thanks

  • @arpityadav1847
    @arpityadav1847 5 лет назад

    Nice explanation

  • @talsveta
    @talsveta 9 лет назад +10

    Thank you very much! It was great and well explained!
    Just one other note - I think the last edge you made between the vertices v5' and v3' is not trivial and worth to mention.. I.e. if those vertices had not been signed with a dash, you would have needed to connect them with one direct edge and not over the actually 2 edges that are formed by the surroundings of the clipping area

    • @TheBootStrappers
      @TheBootStrappers  9 лет назад +2

      talsveta sure thanks !

    • @parvinderyadav007
      @parvinderyadav007 8 лет назад

      +talsveta Yess you are right ! i think that's the small mistake done by talented buddy :D

  • @allurunsprasad9099
    @allurunsprasad9099 8 лет назад

    it really helped me.. thanks a lot man

  • @DayIight.
    @DayIight. 2 года назад

    Legend

  • @abhinavnarendrakumar591
    @abhinavnarendrakumar591 5 лет назад

    Great tutorial, very helpful

  • @hiteshpanjwani1613
    @hiteshpanjwani1613 6 лет назад

    Gr8 one dude

  • @krcreddy1671
    @krcreddy1671 7 лет назад

    excellent video bro. nice keep it up...

  • @vibecatcher4416
    @vibecatcher4416 4 года назад

    Wow , amazing sir ,, thank you 🙏🏻

  • @abhishek1verma
    @abhishek1verma 6 лет назад

    very good explanation

  • @apurbaghosh4856
    @apurbaghosh4856 8 лет назад

    thanks for the video. it helped a lot.

  • @anmolmangat9128
    @anmolmangat9128 6 лет назад

    I have watched a few videos of this channel and they are amazing
    You should publish a full fledged course on Computer Graphics as there is no good source of it on youtube
    Videos were

  • @ahmedal-ahmed7606
    @ahmedal-ahmed7606 7 лет назад

    Excellent Video , Thanks Bro (Y)

  • @abhaychandrasingha3448
    @abhaychandrasingha3448 7 лет назад

    awsome video

  • @Xaknoth
    @Xaknoth 8 лет назад +18

    How does this algorithm handle the case when one or more corners of the rectangles is part of the clipping? You just included the corner without any explanation in the example you solved.
    One other case that is not handled is when both v1 and v2 are outside the clipping window but the edge between them intersects the clipping window.

    • @ayeshaparyani1549
      @ayeshaparyani1549 8 лет назад +7

      To solve your first query, a corner of the window is supposed to be within its boundaries. So it's treated as 'inside'. For your second question, Sutherland Hodgeman polygon clipping algorithm clips a polygon with respect to one boundary at a time. So you actually need to repeat this four times for a rectangular window. In the video, he has tried to solve it in one go which would create confusion. I suggest you solve this case considering one boundary at a time. It definitely works. However be careful that you figure out 'inside' and 'outside' vertices considering only the boundary then and not the entire polygon.

    • @ayeshaparyani1549
      @ayeshaparyani1549 8 лет назад

      Not the entire window* i mean

    • @renzocoppola4664
      @renzocoppola4664 7 лет назад

      it works if you repeat the process in EACH edge-boundary, not everything at once.

    • @zandere1
      @zandere1 5 лет назад

      @@renzocoppola4664 Yep, and you have to treat them as infinitely long

  • @ganeshkolase7203
    @ganeshkolase7203 6 лет назад

    Nice explanation.. keep it up👍👍👍👍

  • @teemaroronoa9384
    @teemaroronoa9384 8 лет назад

    Was useful and helpful

  • @amaanhamza1776
    @amaanhamza1776 5 лет назад

    Tmaari awaaaz, uffff, agar natural hai to im sorry, or ye jaanke istarah ki nikaal rhe ho to, katai jeher ho tum

  • @mdsayedahammed2367
    @mdsayedahammed2367 7 лет назад

    Amazing !!

  • @sanduferi3225
    @sanduferi3225 5 лет назад

    God bless you !

  • @bhavyagosalia4890
    @bhavyagosalia4890 5 лет назад

    thanks mahn ....helped a lot

  • @kshitijmakwana9707
    @kshitijmakwana9707 9 лет назад +1

    there seems to be a minor error at time 3:40 in video for rule 'd' as you ask us to save v2'
    but while solving the sum you consider points v1' as at 6:55 you take point v5' instead of v1'
    oh !!
    and love your videos................Good Job :)
    couldnt find for liang barsky algorithm though
    please share the link
    unless you havent made one
    if so please make one
    THANK YOU

  • @priyanka9133
    @priyanka9133 6 лет назад

    Thankyou very much....😊

  • @kaltwarraith5172
    @kaltwarraith5172 2 года назад

    very useful, one note, what you pronounce as v1 dash is more commonly called v1 prime

  • @BhupendraChoudharyczar
    @BhupendraChoudharyczar 7 лет назад

    best video on SHPCA...

  • @trg3-149
    @trg3-149 5 лет назад

    realy helpfull for me! thanks

  • @ankitambekar6073
    @ankitambekar6073 6 лет назад

    Good Job..

  • @abuelkheirshorts252
    @abuelkheirshorts252 2 года назад

    thanks brother

  • @minhajuddindanish2167
    @minhajuddindanish2167 4 года назад

    It's awsm bro

  • @FurqaanShafi
    @FurqaanShafi 6 лет назад

    thanks broda!!!

  • @bonny27196
    @bonny27196 6 лет назад

    Awesome

  • @1step4ward96
    @1step4ward96 8 лет назад +1

    really helping tutorial... thankyou (y)

  • @fasalurahman697
    @fasalurahman697 4 года назад +1

    Simple mistake last step V5 -V1 not V5' its (V1')
    Good work bro..

  • @runasing3293
    @runasing3293 7 лет назад

    please upload 2-D and 3-D transformation lecture too....its helping a lot

  • @sushmitaroy9684
    @sushmitaroy9684 7 лет назад

    thank you

  • @harshpreetbakshi8935
    @harshpreetbakshi8935 8 лет назад

    nice explanation...

  • @anantsoni6335
    @anantsoni6335 6 лет назад +1

    Helpful.....

  • @initpwn
    @initpwn 7 лет назад

    +The BootStrappers, 8:01 tho,... That v2' & v5' should be joined connected directly... Right? :\
    Anyway, awesome presentation... really helped me! :) :')

  • @Niteshkumar-zd3kr
    @Niteshkumar-zd3kr 5 лет назад

    The polygon you have used for clipping is a concave polygon!!

  • @saisaran1882
    @saisaran1882 9 лет назад

    well explained.... also post liang barsky algo...pls...

  • @naimaakther259
    @naimaakther259 6 лет назад

    Thanks

  • @rajeshprajapati6662
    @rajeshprajapati6662 Год назад

    08:22 So, initially this polygon had 5 sides. After clipping, the polygon has 7 sides. Right ? or is it 6 ?

  • @abrahamjoseph6445
    @abrahamjoseph6445 Год назад

    I like to point out a small mistake in in 4 th example
    The clipping from inside to outside we have to save the inside point v1dash instead of v2dash

  • @vinothkumar7
    @vinothkumar7 9 лет назад

    Is the algorithm is will work for all complicated shapes??? Or only works on any shapes clipped by rectangle shape??? @The BootStrappers

  • @VarshaGupta-ku4ez
    @VarshaGupta-ku4ez 7 лет назад +1

    please upload the video of midpoint circle drawing algorithm

  • @journeytolive8386
    @journeytolive8386 8 лет назад

    their is a confusion between inside to outside point. which one we have to take you didnt mention in the lecture......

  • @jaiminmistry5240
    @jaiminmistry5240 8 лет назад +1

    how can you go vertical form v2' and then horizontal ??( 8:00)
    Vertices of the square polygon have not been saved.

    • @Mahadeva...
      @Mahadeva... 5 лет назад

      U have nice communication skills though... And very nicely presented... 👍👌

  • @christopherlusiga2112
    @christopherlusiga2112 8 лет назад

    Thank u bro

  • @grinalpatel1012
    @grinalpatel1012 8 лет назад

    Well understood…plz Post liang barsky line clipping

  • @pranavrasal5719
    @pranavrasal5719 6 лет назад

    Nice

  • @akshaaaaaaaaaaaaaaay
    @akshaaaaaaaaaaaaaaay 7 лет назад

    At 3:50 it should be v1 dash not v2 dash. Thnx for great lec.

  • @jarikosonen4079
    @jarikosonen4079 3 года назад

    This looks like something to test.
    What would happen if there is a hole in the polygon? Looks like O^2 problems.
    If v1&v2 both outside, but their segment crossing the corner?

  • @d.j.peters
    @d.j.peters 8 лет назад +1

    It will fail if v0 ,v1,v2 (a triangle larger as the clip rectangle) all outside the 2D screen rectangle or 3D view frustum.

    • @AryanSingh2512.
      @AryanSingh2512. 5 лет назад

      DJLinux007 that’s why we have another algorithms.

  • @blackaura345
    @blackaura345 9 лет назад +1

    Concise explanation, sir. But be a bit fast.

    • @TheBootStrappers
      @TheBootStrappers  9 лет назад

      blackaura345 sure ! Will take note of it in the upcoming videos

    • @halfway16
      @halfway16 9 лет назад +1

      The BootStrappers
      This is a good tutorial bro, no need to be faster because there is some people who dont understand english well.. Keep the good work!!

  • @cristinjhon8444
    @cristinjhon8444 4 года назад +1

    There is some mistake in this video!!!!! V3 to v4 there should be saved v4' but you saved v3' and there is also mistakes in v5 to v1

    • @iyapa889
      @iyapa889 Год назад

      yes how can we save that point
      ?

  • @renzocoppola4664
    @renzocoppola4664 7 лет назад

    joining the end points? you mean to reiterate the algorithm?

    • @renzocoppola4664
      @renzocoppola4664 7 лет назад

      Uhm, no. You know about this case after checking if it's two sides off

  • @ankitagaurav1459
    @ankitagaurav1459 7 лет назад

    Thanxx sir

  • @thangklen
    @thangklen 7 лет назад

    when V1 goes from outside to inside V2, the intersection is actually V1', not V2'

  • @kaustavsingh4278
    @kaustavsingh4278 7 лет назад

    very useful fr me👌👌👌

  • @sunny10528
    @sunny10528 9 лет назад

    After clipping , in the final diag you didn't name the vertex between v2' and v5' What about that?

  • @ashishmaxmaxal312
    @ashishmaxmaxal312 7 лет назад

    Can we start from any vertex of polygon? or what would be the direction to move (clockwise or anti.C)?

  • @sohammondal578
    @sohammondal578 9 лет назад

    Look the video is very good but there was a problem in the sheet 3 where you did not draw the window..How are gonna know if the line is going in or out if you dont show the window ?

  • @zlayaprizlaya
    @zlayaprizlaya 7 лет назад

    What about the case if all points are outside the window and window is completely inside the polygon?

  • @shadizebari8161
    @shadizebari8161 9 лет назад

    what about if we have a non-rectangular clipping window?

  • @Alex-vi6fr
    @Alex-vi6fr 6 лет назад

    how can you tell the direction of the line when the question is not given any direction at all? :/

  • @kumaripuja7433
    @kumaripuja7433 8 лет назад

    U said for 'inside to outside' that we consider the outside point but while solving problem u saved the inside point.... So which one we hv to save???

  • @manognamona9959
    @manognamona9959 5 лет назад

    In the rule 4 sir u have mentioned v1 inside and v2 outside and we must save v2' in the polygon example the line from v5 to v1 ,v5 is inside and v1 is outside according to rule 4 v1' must be saved but sir y did u mentioned v5'

  • @cristinjhon8444
    @cristinjhon8444 4 года назад

    How did you determined the inside and outside points !!!!!!say it first

  • @mohamedhossam921
    @mohamedhossam921 5 лет назад

    i think according to rules when goes from v3 to v4 we make v4' so how we make 2nd V4' when we go from v4 to v5 that should make also V4' that will make 2 v'4 ???

  • @sagarmukherjee6297
    @sagarmukherjee6297 7 лет назад

    its wrong the last part v2' should be connected to v5' directly
    how can a line bend between to point in clipping

  • @aadarshgupta2253
    @aadarshgupta2253 7 лет назад

    You have to follow LRBT. Otherwise you can't say about the v2' and v1'.

  • @poojaborlepwar3166
    @poojaborlepwar3166 6 лет назад

    helpful..

  • @mayurinegi9624
    @mayurinegi9624 6 лет назад

    Isn't the last point which you saved, suppose to be v1'?