filmov
tv
Coding Challenge #148: Gift Wrapping Algorithm (Convex Hull)
Показать описание
References:
Videos:
Timestamps:
00:00 Introduction
00:47 What is a Convex Hull?
02:36 The Gift Wrapping Algorithm
03:50 Animated Example of the Algorithm
04:58 Time Complexity of this Algorithm
05:30 Code! Drawing Random Points
05:42 Find the Leftmost Point
07:05 Set up Variables for the Animation
09:03 Make a Guess about the Next Point
10:58 Find out which Vector is “to the Left”
15:00 Add Spacing around the Points
15:33 Add an Exit Condition
15:54 Add the Next Vertex to the Hull
16:26 Draw the Hull
17:12 Continue the Algorithm with the Vertices
18:33 Check when the Algorithm is Done
19:08 Mutating the Array is not necessary
19:50 Watching the Algorithm with More Points
20:13 Inefficiencies about this Algorithm
20:29 Closing the Shape
20:54 (Gift) Wrapping up this Coding Challenge
Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound
#algorithm #computationalgeometry #convexhull #p5js #javascript
Комментарии