Questions tagged [polygons]

The tag has no usage guidance.

1
vote
2answers
50 views

Problem defining a polygon

I have two polygons that are very similar as: ...
0
votes
1answer
90 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 ...
3
votes
1answer
103 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 - ...
12
votes
2answers
263 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 ...
6
votes
2answers
167 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 : ...
2
votes
3answers
399 views

Is it possible to draw a hollow circle using polygon?

The question is simple. I have the following commands ...
1
vote
1answer
73 views

Triangulations/quadrangulations of polygon

Is there a nice way I can find all possible triangulations (or quadrangulations) of a polygon (say 10-gon)? I want to have all possible diagrams with the diagonals marked (i.e. with unique name). ...
5
votes
3answers
155 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
2answers
161 views

Detect and fix invalid polygon

I have a polygon given by ...
4
votes
1answer
159 views

Others problems with Graphics`PolygonUtils`PolygonCombine

As a continuation of this question, writing: ...
7
votes
2answers
219 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: ...
10
votes
3answers
249 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 ...
4
votes
3answers
263 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 ...
7
votes
1answer
172 views

Getting random points on a mesh region

So I have a region defined by a MeshRegion,like ...
0
votes
0answers
72 views

Graphics3D ignores EdgeForm

Works great: Graphics[{FaceForm[White], EdgeForm[AbsoluteThickness[10]], Polygon[{{0, 0}, {1, 0}, {0, 1}}]}] Ignores color and thickness: ...
3
votes
1answer
129 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 ...
1
vote
0answers
43 views

What's the meaning of rspec?

In the RegularPolygon page, I notice the reference RegularPolygon[{x,y},rspec,n]. What's the rspec?
10
votes
2answers
295 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 ...
0
votes
1answer
372 views

Create a 3D polygon

We can look at the dimension of a shape using RegionDimension, for example RegionDimension /@ {Cuboid[], Cone[], Ball[]} ...
0
votes
0answers
112 views

Drawing convex cone with given vectors

I have vectors in matrix form. By using Mathematica, I want to draw it as convex cone and intersect. Let me explain, my intent is to create a new cone which is created by intersection of a null spaced ...
4
votes
1answer
216 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. ...
0
votes
1answer
170 views

Two ways to plot a triangle

Writing: ...
4
votes
3answers
191 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 ...
1
vote
1answer
129 views

Measure eccentricity of a polygon

I am trying to compute the eccentricity of a polygon in Mathematica. I see that I can do something similar with ComponentMeasurements, but I am not sure how to get ...
2
votes
1answer
145 views

Minimal set of perimeter points such that one is always visible any point inside a polygon [duplicate]

I've encountered this problem, and I'd like to know how is possible to solve it in Mathematica: There's a bar that has a room with a very irregular shape. From every point inside the room it must ...
1
vote
3answers
239 views

Creating a MeshRegion object from a Graphics object

I am looking to convert a simple Graphics object that is defined by overlapping polygons into a MeshRegion object. For example, here is code that will create three overlapping triangles ...
26
votes
2answers
706 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 ...
2
votes
2answers
159 views

Open pyramid flower-like by rotating its faces

I'm trying to animate a pyramid (with any base) opening its lateral faces like a flower. I found the best way to this to be the Rotate function. The problem is, I have no clue how it works. I have ...
1
vote
1answer
127 views

How to define a 3D region delimited by a prism with base given by the vertices of a polygon?

I have an arbitrary polygon, not necessarily convex, described by the coordinates of its vertices. I need to obtain the 3D Region R delimited by a prism with base ...
2
votes
1answer
150 views

Cutting polygons [duplicate]

The code below was created to get a list with the coordinates of the lower left corners that will serve as a reference for my polygons ...
4
votes
1answer
255 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 ...
9
votes
2answers
310 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. ...
7
votes
3answers
274 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): ...
3
votes
1answer
257 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 ...
8
votes
3answers
630 views

Polygon mesh: Compute vertex normals for smooth shading

MeshRegion has a "SmoothShading" PlotTheme which automatically computes the ...
1
vote
1answer
193 views

Working with wavefront obj files

Mathematica can easily import obj shape files. I wonder, is it possible to access individual faces? What I actually need is to calculate area of each face and its normal. This can be done from scratch ...
14
votes
1answer
407 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 ...
8
votes
2answers
244 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: ...
3
votes
0answers
47 views
18
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 ...
-3
votes
1answer
80 views

Two 5-gons - One with a concave vertex and another with a convex vertex

I don't know if I may ask this question here, but I want someone could make a simple construction by Mathematica. Could anyone be able to construct a 5-gon with only one concave vertex and the same 5-...
4
votes
3answers
579 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 ...
4
votes
1answer
582 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 ...
2
votes
1answer
182 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
76 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, ...
6
votes
1answer
166 views

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

I have tried the following: ...
1
vote
1answer
197 views

How Can I plot two concentric circles with a polygon inscribed in one and circumscribed about the other however I want the polygon to manipulated

So this code is to plot two concentric circles with a polygon inscribed in one and circumscribed about the other: ...
4
votes
0answers
105 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 ...
16
votes
1answer
221 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 ...
27
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 ...