How to Detect if Inside Ellipse?
-
@ulrik Well, getting the area of a triangle is possible with trigo but not an easy thing (I don't know how from the top of my head though I tested a while ago two mathematics way of doing it)
From here, seeing the particular shape you're using and that you are going further than simple ellipse or rectangle, the solution would be the implementation of a Juce function to detect if inside the path. (a different one than getIntersection). Then it'll be very easy and less mind torturing (even if I like that ) -
@ulrik Stupid me... I already added it along with
getIntersection
It'sPath.contains(point)
HiseSnippet 931.3ocsV8uaaaCDlxIbsVaEaAnO.B8uT.7Dr6OGPQQahi8fQaREp6JJPQQAizYKhPQJPREWig7LrW08FrcTxNRd0oXvn0v1w2ceG4GO9cmRrVk.FiRS7591kE.w6mnSWJsYCyXbIYxIDuCni4xzQBAuv.GoAF43kELiARIdd686NXdc2mT85ue9wLASl.MtHj2o3Ivq34bai23W7RtPLlkBukm2B8CewjDkbnRnJQJsGsOofkbAaNbFyAqCk38CiR4VkdpkYACwa+iUoKmloVHqw+Ntget.bFCHSwEp18XkH0wXmWxvLtHMd8Q2PvUItoPrWcg3tzS4o7q82TP9kp.AMYztd30YS5s2FzaPa50uE81Bk7ZQo8qozAzoIZdgsIhiO+HchzB5YLrr2lJ0XIc9qNzgJDgzFkyt.FqQiqyH7w862K.+5vm5inLJADkH.lNDc36iWFFavkLcPrTD7rf0KzbvNTkWnjnQ38vX2yAuAcQKrInlwBwLalaMKhXooX0QG9gGfaM94i8BdD9Fow8cbwwDebEiLfMFq412nJsbIDNqTlX4JY37C8+S+tyc.pUJg0+wDsHiaALeLXplsnZOK5ET336wpRYpIbPT+C6E39Fg42kOKHzlwMQoLKKhalHM7T3P+t3Nr0sXIHDpEtjwvyPQ7MsINHW4eUqSyopRCLjIDmiZ5liCbIVkpNReIQvxXQDVVsXgvD9gJnQetWP8OV9Q2lTkkFJb0JWEtZK88Wu9AJ4YJK7ZYX0d3ekev+MzrYaMl6BTqDBPu0vtNW8WKwPYY94ftGpHDkv0.Q47l8HzatGocKbRsdpEPkbhjaecAHuoFaxJQH9q+XxIXk00XsxGhq.zVtiBdm.WhSopay5ROALWXUEUXWoxId2xVE8NqaBYRPP3XqFkhWvjO2dl2x1FK3o1LDl266PHY.edlcsEyIlVKIPd7yziDhfFGjubH.N9QkVJX1MmI4FDuJ.dIrwf.WyNplrKaOn9a1fp+uT7.ZL2ljscN1YKbDup9dvwUi2uCczrYPhsgf6SG+9uOyxI0ivleJyp4nNgdVY9TbZRBf6tDkQtl.uNN4ZscemsqBLEjoUF+C9ZUvANauUAGrNHImknUeJot0y8.jaW4A4jr5Ymcom5rCFPpZGcx19Q8I43yx9TRh63+qXGz1y496PNOXGx4g6PNOZGx4w6PNOYGx429p4392HNpzpxqaGPGwiplQ44MRxPkUkJj7u.xPkoEC
-
@ustk Nice one
-
@ustk nice job!
-
@ustk Would it also be possible to add text to follow a path you think?
-
@ulrik Alright... It's official... I'm drinking to much...
HiseSnippet 1266.3ocsV8uSaaDG+Lf2VxV0FR6A3HRSxoDL1.kUozpADfonU.qFV6lPnpC6K12v4NqyWJMah+YuE6sYOR6MX66c1l3.oUSQsVJN999i66m66Ou.oHjlmKjHqFmOIihr9J6AS3pjdIDFG0+Pj0p1Gy3QGklxxxo6KoDzASxH44zHjk0x+nVLqFqfLO+yOb.IkvCoSIgPuRvBoufMholRMXuehkldLIhdNaTMo2Yu9gBdOQpXL.oks8PYjvqIwzSIZwVxFY8YGEwTB4.EQQyQVqbfHZxfDwM7B4eEKmcUJUuvGM.1nBxGKRizHVSE0KgkFETczyQvtDL0Qrbgi3asOgEwti9TGx2XXfmpQc+g0RyBukmAd90gmWM3MGHYUCRqT.oUsGDJYYpobz34Ks6yUT4PB31qCkBYQK8W118DfDbk6Hx0zikvh6zvYWOuNX3U6tMAoxEoT2vTJQ5.DZBwhbE9sDINfmheNtZehopdhQYBNrvoEvqEHM7maDQQbI73TJHs2L6PVM8CgzHEMfnRtmYTz2o.4Z8qTRRRxZqsF90RlhwiwBNlfy.MvrbblH23FwpDB+5brRfgDF7PIixivAS.xwBIAXjPwwFiAFXDnMEd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beautiful!!! cheers
-
Hahaha this is incredible. Excellent work!
-
@ustk Just to be clear, this only works with paths and not fillEllipse or drawEllipse, for example? If so, is there an API reference for what shapes can be made with paths? Similar to what you did with
const var p = Content.createPath(); p.addStar([300,300], 5, 50, 200, 0);
-
@ericchesek in the API you'll find this
-
@ulrik Hmm, maybe I'm on an older build. 3.0.0, build 650, 2023 April 3.
I only have a fraction of these options in the "Path" API list. I'll look into it. Thanks! -
@ustk said in How to Detect if Inside Ellipse?:
Alright... It's official... I'm drinking to much...
Maybe I'm not drinking enough
-
@Dan-Korneff said in How to Detect if Inside Ellipse?:
@ustk said in How to Detect if Inside Ellipse?:
Alright... It's official... I'm drinking to much...
Maybe I'm not drinking enough
:clinking_beer_mugs:
-
@ericchesek April 3 is the date you built, not the branch date. I've implemented the new methods before that so you probably have to build the develop branch again