Skip to main content

New answers tagged

3 votes

How to Find "n" for n-th Triangular Number

WolframLanguageData["PolygonalNumber", {"VersionIntroduced", "DateIntroduced"}] Using ...
Syed's user avatar
  • 59.4k
2 votes
Accepted

Generate A Point Inside An Arbitrary Concave Polygon

Here's a fast algo: 1) find convex vertices, 2) from those find one with the maximum Cross between its segments, 3) then pick a point using bisector and a small ...
Anton's user avatar
  • 1,188
2 votes

Generate A Point Inside An Arbitrary Concave Polygon

I posted a hasty answer which without having Mathematica. I have deleted that one. Here is a better version if someone else wants a go. Take two points A, B on a polygon side. If A is B and the side ...
Richard Kirk's user avatar
2 votes
Accepted

How to Handle Non-Coplanar Vertices in BoundaryMeshRegion Constructed from ParametricPlot3D?

The same way as https://mathematica.stackexchange.com/a/302959/72111 https://mathematica.stackexchange.com/a/306411/72111 https://mathematica.stackexchange.com/a/306683/72111 https://mathematica....
cvgmt's user avatar
  • 84.1k
6 votes

How to Handle Non-Coplanar Vertices in BoundaryMeshRegion Constructed from ParametricPlot3D?

There are a couple issues with your current approach. (1) You're trying to make a Polygon cell from the points on a spiraling line (red line shown in plots). I'm not sure what your intention is here, ...
Alec's user avatar
  • 61
7 votes

Generate A Point Inside An Arbitrary Concave Polygon

decomposition the polygon into several triangles (or convex set) before select points. ...
cvgmt's user avatar
  • 84.1k
13 votes

Generate A Point Inside An Arbitrary Concave Polygon

We can use mesh regions instead. For $n = 1000$ here's timings on my machine: SeedRandom[1]; RandomPoint@Polygon[points]; // AbsoluteTiming ...
Greg Hurst's user avatar
  • 36.8k
8 votes
Accepted

How can I make all the lines within the polygon turn gray in that region?

RegionFunction with RegionMember. To make difference color, we use ConditionalExpression. <...
cvgmt's user avatar
  • 84.1k

Top 50 recent answers are included