# Questions tagged [polygons]

The tag has no usage guidance.

85 questions
Filter by
Sorted by
Tagged with
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 ...
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: ...
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 ...
900 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 ...
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 ...
269 views

### What is a robust way to determine if two polygons overlap? Possible bug in RegionIntersection or Area

When trying to determine if two polygon objects overlap, I think the intuitive way to do this would be to use the RegionIntersection function to find the ...
900 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 ...
500 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 ...
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 ...
270 views

### Unexpected behavior of the procedure Area on the object 'Polygon'

Bug introduced in 11.3 or earlier and fixed on 12.0. Sometimes get a results, sometimes left unevaluated. For instance ...
171 views

### Polygon with an extended Boundary

I have a (not necessarily convex) Polygon, and want to create another Region that can be seen as an extended boundary of the ...
280 views

### RegionMember[ ] in polygon

Bug introduced in 10.0 and fixed in 12.0. I am seeing a difference in RegionMember[ ] testing a point inside a 3-vertex polygon and testing a point inside a more ...
353 views

### How can I build a 3D slab of hexagons or a thick hexagon mesh?

So I tried this code for 2D, but I would like to have say a slab with a defined thickness The code for 2D is ...
331 views

### Plot polygonal surface

I have a list of 120 elements of the form $\{q,x,y,z\}$. In fact, each element of the represents the nuclear charge and 3 coordinates of an atom of some large molecule. ...
462 views

### Area of Self-Intersecting Polygon with Repeated Vertices

So Mathematica uses an even-odd rule for self-intersecting polygons, both when rendering them and when calculating their area: ...
867 views

### Polygon mesh: Compute vertex normals for smooth shading

MeshRegion has a "SmoothShading" PlotTheme which automatically computes the ...
301 views

### How to create a mesh of convex polygons (of maximal size) from a boundary mesh region

I can create a boundary mesh region that consists of a rectangular region with two independently-rotated pentagonal regions excluded using the following code: ...
240 views

### Problem with GraphicsPolygonUtilsPolygonCombine

Writing: Normal@ParametricPlot[{x, x^2 t}, {x, 0, 2}, {t, 0, 1}] /. p : {__Polygon} :> GraphicsPolygonUtilsPolygonCombine[p] I get: but if I write: ...
214 views

### Getting random points on a mesh region

So I have a region defined by a MeshRegion,like ...
196 views

### Detect and fix invalid polygon

I have a polygon given by ...
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? ...
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 ...
331 views

### PDF export of polygons: How to get rid of polygon boundary lines?

I have the following polygon: generated using this code (extracted from my previous question): ...
216 views

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

I have tried the following: ...
1k views

### Polygons crash kernel?

Having some problems Generating random Polygons and then filtering by Area, specifically filter out degenerated polygons with ...
210 views

### How does CirclePoints function actually work when drawing a polygon?

By reading that CirclePoints gives the positions of n points equally spaced around the unit circle, I understood that : ...
839 views

### Geographics: Can I get a US Map silhouette without the Great Lakes?

I'd like to get a nice silhouette of the land area of the US lower 48 states using Mathematica's GeoGraphics method. I tried: ...
208 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 ...
306 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 ...
254 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]: ...
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 ...
322 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 ...
218 views

### Generate the complement of the Earth's land mass polygons

I would like to get polygon covering of all water area of earth. I though of doing by inverting Polygon[EntityClass["Country", "LandMasses"]] How do i invert ...
483 views

### How can I get the vertices of each polygon of a Voronoi diagram?

For the following image; How can I get the vertices (which are highlighted by orange dots) of each Voronoi polygon of the following Voronoi diagram? The picture is from the Internet. It is just for ...
650 views

### How to color the edges of a triangle?

I'd like to draw a triangle (given the side lengths) with the sides colored separately. I tried ...
173 views

### Others problems with GraphicsPolygonUtilsPolygonCombine

As a continuation of this question, writing: ...
247 views

### How to draw a generic 3D closed shape to be analyzed in AceFEM?

I would like to draw a 3D shape to test my AceGen procedure. I will insert the AceFEM part of my code. In this example, I have performed the analysis on a hexahedron element. ...
173 views

### Create a square polygon that can be used as the base of a pyramid

For example I want to use the design generated by this code as the base of a pyramid as well as other iterations of the design ...
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 ...
116 views

### Speed-up calculation of Area of Polygons

I have a complicated polygon in the 2d plane, that is an RegionIntersection of RegionUnion of triangles. Finally, I want to ...
114 views

### When Graphics3D renders a Polygon with non planar points, how does it triangulate to two separate polygons?

If we try to make a Polygon with nonplanar points, the documentation says Non-planar polygons are accepted in Graphics3D and ...
1k views

### intersection between polygon. Algorithm to check it [closed]

I'm working on an algorithm which should check if two polygons, described by their vertex coordinates, are: one inside the other, are intersecting or are separated image below describe this three ...
498 views

### Connecting the points surrounding the adjacent polygons

I'm trying to connect the points surrounding the adjacent polygons. I know how to find the adjacent polygons on a Voronoi mesh. However, I'm unable to adjacent of the adjacent polygons. What I'm ...
1k views

### Calculate the total length of line segments within polygon

So we have a polygon with N vertices located on grid. All vertices are located at the intersection of cells (so their coordinates are integers). The objective is to calculate the total length of line ...
125 views

### Area of Generalized Koch Snowflake

I asked on the Math Stack Exchange here how I could find the area of a "generalized Koch snowflake". An $n$th generalized Koch snowflake, in my case, is formed almost the same as the Koch snowflake - ...
176 views

### Manipulate a polygon

I am an absolute beginner in Mathematica. For a small test project, I am supposed to change the following code such that the corners of the polygon {0, 0, 0}, {1, 1, 1}, {0, 1, 0}, {1, 0, 1} can be ...
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 ...
51 views

### Graphics3D plot Polygon (Joined Table) gets different results with and without decimal point

Without decimal point ...