ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

Coding Challenge

gift wrapping

convex hull

algorithm

coding challenges

computational geometry

dan shiffman

creative coding

p5js

javascript

jarvis march

Автор: The Coding Train

Загружено: 2019-07-13

Просмотров: 162424

Описание: In this coding challenge, I implement the “Gift Wrapping algorithm” (aka Jarvis march) for calculating a convex hull in JavaScript. This is a foundational topic in computational geometry! Code: https://thecodingtrain.com/challenges...

🕹️ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/s...

🎥 Previous video:    • Coding Challenge 147: Playing Chrome Dinos...  
🎥 Next video:    • Coding Challenge 149: Tic Tac Toe  
🎥 All videos:    • Coding Challenges  

References:
🌐 Gift Wrapping Algorithm: https://en.wikipedia.org/wiki/Gift_wr...
🌐 Cross Product: https://en.wikipedia.org/wiki/Cross_p...
📝 The splice() Array Function: https://developer.mozilla.org/en-US/d...

Videos:
🎥 ES6 Arrow Syntax:    • 16.3: ES6 Arrow Function - Topics of JavaS...  
🔴 Coding Train Live 180:    • Coding Train Live 180: Processing Java Lib...  

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

🚂 Website: http://thecodingtrain.com/
👾 Share Your Creation! https://thecodingtrain.com/guides/pas...
🚩 Suggest Topics: https://github.com/CodingTrain/Sugges...
💡 GitHub: https://github.com/CodingTrain
💬 Discord: https://thecodingtrain.com/discord
💖 Membership: http://youtube.com/thecodingtrain/join
🛒 Store: https://standard.tv/codingtrain
🖋️ Twitter:   / thecodingtrain  
📸 Instagram:   / the.coding.train  

🎥 Coding Challenges:    • Coding Challenges  
🎥 Intro to Programming:    • Start learning here!  

🔗 p5.js: https://p5js.org
🔗 p5.js Web Editor: https://editor.p5js.org/
🔗 Processing: https://processing.org

📄 Code of Conduct: https://github.com/CodingTrain/Code-o...

This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecod...

#algorithm #computationalgeometry #convexhull #p5js #javascript

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
Coding Challenge

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

Coding Challenge #139: Calculating Digits of Pi with Collisions

Coding Challenge #139: Calculating Digits of Pi with Collisions

Алгоритм выпуклой оболочки — учебник по сканированию Грэма и алгоритму Джарвиса Марча

Алгоритм выпуклой оболочки — учебник по сканированию Грэма и алгоритму Джарвиса Марча

Math  Discovered or Invented

Math Discovered or Invented

Coding Challenge 12: Lorenz Attractor

Coding Challenge 12: Lorenz Attractor

Блэкаут в Украине и Молдове, В Иране началось? Кадыров простил Керимова. Галлямов, Крутихин, Левиев

Блэкаут в Украине и Молдове, В Иране началось? Кадыров простил Керимова. Галлямов, Крутихин, Левиев

The Hairy Ball Theorem

The Hairy Ball Theorem

Convex hulls: Jarvis march algorithm (gift-wrapping) - Inside code

Convex hulls: Jarvis march algorithm (gift-wrapping) - Inside code

What we learned from the 3-body problem

What we learned from the 3-body problem

Convex Hull in 3D

Convex Hull in 3D

Coding Challenge #28: Metaballs

Coding Challenge #28: Metaballs

Graham Scan Convex Hull Algorithm Explained with Code

Graham Scan Convex Hull Algorithm Explained with Code

Coding Challenge #98.1: Дерево квадрантов - Часть 1

Coding Challenge #98.1: Дерево квадрантов - Часть 1

Coding Worley Noise

Coding Worley Noise

Выпуклая оболочка | Основы | Лекция-1

Выпуклая оболочка | Основы | Лекция-1

The 90-Degree Torque Problem

The 90-Degree Torque Problem

Файлы Эпштейна | Илон Маск, Билл Гейтс и ЗППП от русских девушек (English subtitles) @Максим Кац

Файлы Эпштейна | Илон Маск, Билл Гейтс и ЗППП от русских девушек (English subtitles) @Максим Кац

Почему работает теория шести рукопожатий? [Veritasium]

Почему работает теория шести рукопожатий? [Veritasium]

Введение в кодирование шейдерной графики

Введение в кодирование шейдерной графики

Обзор Xiaomi 17 Ultra by Leica — УЛЬТРА ХОРОШО?

Обзор Xiaomi 17 Ultra by Leica — УЛЬТРА ХОРОШО?

Gift Wrapping Algorithm (Convex Hull)

Gift Wrapping Algorithm (Convex Hull)

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]