Questions tagged [polygons]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
61
votes
3answers
5k views

How can we make publication-quality PlotMarkers without version 10?

Suppose that for certain reasons we are not yet using Mathematica version 10, or we have a version with buggy PlotMarkers. It is well known that the default markers ...
47
votes
6answers
7k views

Filling a polygon with a pattern of insets

I am trying to fill a shape with diagonal lines. I am aware of Texture, but it rasterizes the fill pattern, which is not desirable. Here was my crack at it: ...
29
votes
5answers
2k views

Rounding the Corners of a Shape

I was wondering whether there is an option in Mathematica that enables me to smooth the corners of a shape. The example I want to start with is the pentagon. This can be crudely specified as ...
8
votes
3answers
879 views

Polygon mesh: Compute vertex normals for smooth shading

MeshRegion has a "SmoothShading" PlotTheme which automatically computes the ...
27
votes
2answers
903 views

Filling Space with Pursuit Polygons

I want to make a program which can fill a 2D space with "pursuit polygons". The following picture will help you understand better what I mean. You can also look up "pursuit curves" or mice problem or ...
12
votes
2answers
591 views

A Smooth and Round Voronoi Mesh

I want the edges of a VoronoiMesh to be smooth and round. I have found the following code from this answer ...
8
votes
2answers
240 views

Problem with Graphics`PolygonUtils`PolygonCombine

Writing: Normal@ParametricPlot[{x, x^2 t}, {x, 0, 2}, {t, 0, 1}] /. p : {__Polygon} :> Graphics`PolygonUtils`PolygonCombine[p] I get: but if I write: ...
2
votes
1answer
292 views

Cannot combine GeoPosition polygons in version 10.4

I was using with Mathematica 10 for plotting different kinds of maps the function PolygonCombine. It seems that this fucntion has disappeared with the version 10.4? Here is a classical example for the ...
14
votes
3answers
903 views

Rounding an Irregular Polygon

Consider a random irregular convex polygon, for example, the 6-side polygon I want to define a function that, given a certain parameter r (roundness), rounds each ...
14
votes
1answer
501 views

How could I perform Region or Polygon Clipping in mathematica?

I need to clip several regions reg: like Rectangle, Polygon, Ellipse... My goal isn't to plot the clipping but to have a representation of each new region. I searched if there was any package or ...
19
votes
3answers
1k views

Pentagonal spiral in Mathematica

I would like to plot an image of what I call a pentagonal spiral with Mathematica. A sample image of what I'd like to obtain is this (sorry for low-quality): My initial idea was to get some kind of ...
5
votes
3answers
255 views

How to get size of each polygon of a Voronoi diagram using Shoelace formula?

The following code gets all vertices of all polygons (mesh cells) of VoronoiMesh[pts]: ...
8
votes
0answers
64 views

Order of PolygonCoordinates[] is undefined in Mathematica 12?

Probably I am missing something fundamental. I try to get a polygon's ordered coordinates, but PolygonCoordinates[] yields something pretty unordered. Am I missing some essential function? ...
7
votes
1answer
493 views

How to make sure polygon is drawn flat in 3D?

Bug introduced in 8.0 or earlier and fixed in 10.4 I'm working on this SE question about pentagrams on top of dodecahedron for exercising. Both solutions are basically connecting different sets of ...
5
votes
1answer
325 views

Finding non-collinear vertices of a convex hull

I'm fairly new to Mathematica (and programming in general tbh) and need this for a math project I'm working on. I generate large collections of (rational, 2d) points and need to find which of these ...
4
votes
1answer
744 views

Finding area of intersection regions

I want to be able to find the area of the intersection between a hexagon and a slice. I have tried RegionMeasure or Area but I ...
3
votes
1answer
308 views

How to display a GeoTIFF raster in GeoGraphics?

I have a GeoTIFF raster file which I would like to display superimposed on a map in GeoGraphics and combine it with other GeoListPlot graphics. Since I know the corners of the GeoTIFF raster, I am ...
7
votes
1answer
216 views

How to test if a GeoPosition is inside a geographic Polygon?

I have tried the following: ...
5
votes
3answers
210 views

Graphics option to suppress lines between adjoining polygons

In 10.3.1 there was a Graphics option -- it might be a sub-option of Method -- which erases the thin line visible at the join ...
5
votes
1answer
208 views

RegionIntersection fails for some values with polygons

Bug introduced in 10.1 and fixed in 10.3.0 I want to find the intersection (region) of 2 polygons. I use RegionInstersection but it only works for some sizes, for ...
5
votes
2answers
308 views

How to draw the outline of an icon made of several polygons?

I have an icon defined like that: speakerIcon = Graphics[{ Triangle[{{0, -1}, {1,1},{-1,1}}], Rectangle[{-1, -1},{1, 0}] }, ImageSize->20] I can ...
2
votes
1answer
215 views

Using loops to draw multiple polygons and discretizing them

I am trying to plot the first eigenvalue of the Laplacian operator with zero Dirichlet condition on following figure against decreasing values of $\varepsilon$. I used ...
2
votes
2answers
93 views

Inconsistent behavior from RegionMeasure on the RegionIntersection between a Polygon and a Line

Consider a Polygon with lines drawn between two of its vertices, ...
0
votes
1answer
163 views

Point lattice leading to triangle lattice

My main purpose is to eventually generate a triangle lattice from one original point, let's say the origin. So I want to start with the origin and generate 6 points around it, which are the vertices ...