8 ms·
Tutorial for Wykobi – A C++ Computational Geometry Library
- simooooo 10y agoAre there any libraries like this for JavaScript?
- vespakoen 10y agoI guess d3 (https://github.com/d3/d3/blob/master/API.md https://github.com/d3/d3/blob/master/API.md) can handle most of these things. Others you can check out: - http://turfjs.org http://turfjs.org - https://two.js.org https://two.js.org - http://paperjs.org http://paperjs.org (especially "PaperScript" which does some magic to allow adding / multiplying etc. vectors if that's what you're after) Also worth noting is that for most "computations" there is a likely a package available on npm
- willvarfar 10y agocsg.js is a computational solid geometry 3D library for Javascript. https://github.com/williame/csg.js https://github.com/williame/csg.js is a fork where I made some performance improvements when I used it in a Ludum Dare game; dev vid https://www.youtube.com/watch?v=7zjz-hpm8No https://www.youtube.com/watch?v=7zjz-hpm8No
- mayoff 10y agoTo clarify, this is a tutorial on how to use a C++ computational geometry library named Wykobi. It is not an introduction to computational geometry or a tutorial on how to implement computational geometry algorithms.
- drifkin 10y agoFor an introduction to computational geometry in general, I've enjoyed these lecture notes from Leonidas Guibas [1]. There are some more specific class notes at [2]. [1] http://graphics.stanford.edu/courses/cs268-16-fall/Notes/torino.pdf http://graphics.stanford.edu/courses/cs268-16-fall/Notes/tor... [2] http://graphics.stanford.edu/courses/cs268-16-fall/notes.html http://graphics.stanford.edu/courses/cs268-16-fall/notes.htm...
- bsder 10y agoAnybody actually have an assessment if this library is actually accurate? The problem with most computational geometry libraries is that they tend to be 1) riddled with bugs, 2) slow and 3) covered by stupid licenses. The license is nice. So, how is the accuracy and speed?
- rwbt 10y agoGood questions. I'm also interested and I'm planning to test it out first thing tomorrow. But from the FAQs, this project seemed to be around since 1997 (not C++ back then though) so I'm guessing it should be pretty stable.
- santaclaus 10y ago> 3) covered by stupid licenses Hello, CGAL.
- ska 10y agoWhat is stupid about the CGAL licenses? If I understand it correctly - If you are using it academically or in free software you can use it. If you are using it commercially you can pay a reasonable license fee and use it. Sounds like a better solution than most; what am I missing?
- jtuente 10y agoHonestly, the worst part of CGAL licensing is figuring out which parts actually require the commercial license, since most of the simpler structures in CGAL can be used freely in a commercial product.
- ska 10y agoI haven't looked for years, but as I recall very little was LGPL other than the core, and the rest was licensed by module. Even if you just licensed the whole thing it wasn't particularly expensive.
- 10y ago
- wmu 10y agoBoth the tutorial and the library are nice. I never heard of Wykobi, and it seems that the library is pretty rich.
- Const-me 10y agoAnother one, with more focus on 3D, boost license: https://www.geometrictools.com/ https://www.geometrictools.com/
- coldcode 10y agoThere are a lot of these apparently. I wonder why would a CPU implementation make sense today vs a GPU one?
- Const-me 10y agoSome things are not parallel enough. GPUs don’t feature thousands of independent cores, instead they have group of cores executing same instructions on different data, in lockstep. Some algorithms, e.g. shading those triangles or raytracing or teaching neural networks, work awesome on GPUs. Other are very tricky to port to that model. Other things are not suitable for GPUs performance wise. For example, if you have octree data structure and you query a lot, a CPU will perform better, because cache hierarchy (on CPU, the top level[s] of the tree will be in L1, the levels below in L2, etc., GPUs don’t have that), and because branch prediction. Finally, not everything is computation bound. If your CPU code is fast enough to saturate IO bandwidth, be it HDD or network, you’re fine unless you have a million of servers. If you have a million of them, GPUs might still be worse they because might be more power efficient slightly decreasing your huge electricity bills.
- mrcactu5 10y agothese tutorials read like a computational geometry textbook. I have gotten stuck even on simple algorithms like the intersection of two lines. at least in the beginning it may be hard to compute bugs
- kelvin0 10y agoI am tempted to start a project to wrap this to be usable in Python. Very nice lib.