26
2012
Monotone Chain Convex Hull Algorithm

Finally got atleast some 2D convex hull algorithm working.. this one is converted from those Java & Python versions.
Converted the java version first and it kept giving strange results, then took the sub() from python and it worked rightaway..
Now can try this for the shadow casting test, should be possible to cast somekind of shadows to a flat surface(?)
It was quite difficult to sort an Vector3 array with javascript in Unity..
founded some help from unity answers, but most of those examples didnt seem to work without modifications..
Webplayer:
nothing much to see on it..
Download source:
MonotoneChainConvexHull.unitypackage (javascript)
Related Posts
5 Comments + Add Comment
Leave a comment
Recent posts
- Favorites in PackageManager
- LudumDare59 : Signal
- Unity Editor: Tree Generator
- Leaf/Foliage Generator Tools (Runs in Browser)
- Testing Unity AI Beta
- Ways to Support UnityCoder Development
- Using UI Slider to Create 5-Star Rating Element
- Game Music Library For Unity (editor plugin)
- Fontastic : Easily Test Fonts in Unity Editor!
- GeoTiff Importer & Terrain Generator for Unity
- Create Baked DropShadow for UI images
- .JP2 Ortho Image Converter to PNG/JPG/TIFF
Recent Comments
- on Mesh Exploder (sources)
- on Sprite Sheet Flip Book Shader
- on Sprite Sheet Flip Book Shader
- on [Asset Store] PolygonCollider2D Optimizer
- on Trajectory Test Scene 2.0
- on Vector3 maths for dummies!
- on UnityHub 3.6.0: Remove Version Control & Cloud Dashboard columns
- on Using RenderDoc with Unity (graphics debugger)
Coin:
CUgDSbRqFcAumDSAcdKDvuXsw26VdkJe8C8WGUQHBAGS
An article by












Can I please get this code to play with looks very interesting!? 🙂
Source added!
convex hull (source):
http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=geometry2
Could I use this script in my game?
yes, it was originally just converted to unityscript from some of those wikipedia articles/links..