Questions tagged [polygons]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
8
votes
3answers
867 views

Polygon mesh: Compute vertex normals for smooth shading

MeshRegion has a "SmoothShading" PlotTheme which automatically computes the ...
1
vote
1answer
300 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
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 ...
8
votes
2answers
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: ...
3
votes
0answers
51 views
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 ...
-3
votes
1answer
84 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
649 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
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 ...
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, ...
7
votes
1answer
215 views

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

I have tried the following: ...
1
vote
1answer
215 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
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 ...
16
votes
1answer
268 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 ...
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 ...
4
votes
2answers
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 ...
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 ...
1
vote
0answers
168 views

Handling Self-Intersecting Regions

I am trying to test various parametric regions of a function for membership of the origin (point {0,0}). I generate the boundary by creating four parametric boundary curves, and then use RegionMember ...
3
votes
2answers
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 ...
5
votes
3answers
207 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 ...
-2
votes
2answers
85 views

How to change the way representing polygons [closed]

...
1
vote
2answers
154 views

Delete/Extract some certain data from a list?

These are some polygons for Voronoi mesh. ...
0
votes
1answer
150 views

How to find point within polygons and connect them

I have the following figure: Here, I have the following values of 25 image corner-points: ...
1
vote
1answer
161 views

Unit of measurement for the area of the polygon

I have an image. I found the dimensions of the image as the following code: ImageDimensions[img] I found the image dimension as {224, 88}. Now, I run the ...
1
vote
1answer
166 views

How to compare two polygons?

I have these polygon points which are like these: ...
0
votes
1answer
463 views

How to extract the vertices value of a polygon? [closed]

I developed a code where I can extract the vertices of the polygon with highest adjacent. These are the index values of each polygon: ...
3
votes
3answers
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 ...
6
votes
1answer
838 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: ...
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 ...
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 ...
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 ...
3
votes
2answers
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 ...
9
votes
2answers
461 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: ...
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: ...

1
2