CodingTrain / CodingTrain/Suggestion-Box
Coding Challenge: GJK algorithm
- Lenguaje dominante
- Sin datos de lenguaje
- Estrellas
- 570
- Forks
- 85
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
The [Gilbert-Johnson-Keerthi algorithm](https://en.wikipedia.org/wiki/Gilbert%E2%80%93Johnson%E2%80%93Keerthi_distance_algorithm) (known as GJK) is apparently a highly efficient and commonly used method for determining if 2 arbitrary **convex** polygons intersect. From my recent research into it, it seems that a number of papers and articles written about it make it seem more difficult than it is by obfuscating the algorithm with a lot of complicated math. A [video explaining the algorithm](https://caseymuratori.com/blog_0003) was recommended in the book _Game Engine Architecture_ (Jason Gregory), and this video is also linked to on the wikipedia article discussing the algorithm.
I'm proposing that you implement this algorithm as a coding challenge for a few reasons:
1. It's a somewhat 'difficult' algorithm, but not ridiculously so, making it a challenge that's within reach for the majority of your audience. It's also surprisingly ingenious.
2. The functionality would be very useful. I suspect a lot of the folks watching Coding Train are at least somewhat interested in making games and so could benefit from learning about algorithm for doing "collision detection" besides circle-circle and AABB-AABB. No doubt the GJK is also useful for non-gaming sketches. I'm personally interested in using it for a shape-packing sketch, for example.
3. ???
4. Fun!
For simplicity and to make it more useful as a teaching aid, implementing only the 2D case would be enough. Then you don't have to go through the trouble of dealing with all the extra checks required for a tetrahedron.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
No se nombran archivos de implementación, puntos de entrada ni pruebas. Empieza leyendo el artículo enlazado de Wikipedia y el vídeo de Casey Muratori, y después define el alcance de un desafío de programación de GJK en 2D; se considerará terminado cuando el desafío implemente la detección de intersecciones entre polígonos convexos.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Área
- game-dev
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 25/100