Questions tagged [polygons]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
0answers
27 views

PolygonCoordinates extract the submits in the “wrong” order

I don't understand why, in the example below, PolygonCoordinates seems unable to correctly extract the summits of a rectangle in the "right" order so we can ...
5
votes
2answers
284 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 ...
0
votes
0answers
45 views

Workaround for Opacity + Magnify bug in version 12?

Is there a workaround for the following bug in version 12.0.0. This is in MacOSX. ...
11
votes
2answers
517 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
0answers
56 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? ...
4
votes
1answer
110 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 ...
9
votes
3answers
124 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 ...
0
votes
0answers
36 views

Mapping a flat unit plane composed of polygons onto a cylinder

I'm looking to map a flat plane composed of triangles onto a cylinder, and then ultimately use a manipulate function to show the plane wrapping into a cylinder. Here is the code I have so far, I've ...
1
vote
0answers
51 views

Deforming a unit square into a cylinder [duplicate]

I am new to Mathematica and I am trying to create a flat unit square in the x-z plane made out of polygons with vertices that divide it into equal-length intervals on each side. Then manipulate this ...
1
vote
2answers
102 views

Parametric equation of rolling polygon (cyclogon)

Abraham Gadalla tried (but failed) to post the following question. Why does the red point not continue to follow the square (and the curve) for the full range $0\le x\le 2\pi$? ...
1
vote
0answers
46 views

Combining MeshRegions of generated 3D shapes and RandomPolygons

I am interested in generating 3D a joint BoundaryMeshRegion or a MeshRegion from different shapes and polygons. This works for <...
0
votes
0answers
54 views

Discrete Sum of Function over a Region

I might have completely missed something in my search. I want to discretely sum over a function, $f(x_i,y_j)$ multiplied by some other function $g$ over a general region $S$. $$\sum_{(x,y)\in S}f(x,...
6
votes
3answers
1k views

Polygons crash kernel?

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

Issue connecting vertex coordinates

To make it simple, I have generated a list where sub-lists are vertex coordinates of regular or non-regular polytope. For example, here's a list that can be generated: ...
2
votes
0answers
48 views

How to remove unwanted lines in Graphics3D [duplicate]

When I run the following code: ...
0
votes
0answers
39 views

Regions detecting/counting

Recently, I solved an analytical problem on the number of possible regions in a similar figure: I conducted numerical experiments on Mathematica to verify the results. Intersection points are easy to ...
1
vote
2answers
53 views

Problem defining a polygon

I have two polygons that are very similar as: ...
0
votes
1answer
138 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
115 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
267 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
196 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
539 views

Is it possible to draw a hollow circle using polygon?

The question is simple. I have the following commands ...
1
vote
1answer
78 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
216 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
177 views

Detect and fix invalid polygon

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

Others problems with Graphics`PolygonUtils`PolygonCombine

As a continuation of this question, writing: ...
8
votes
2answers
233 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
260 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
402 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
199 views

Getting random points on a mesh region

So I have a region defined by a MeshRegion,like ...
0
votes
0answers
88 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
155 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
52 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
329 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
554 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
144 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
241 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
220 views

Two ways to plot a triangle

Writing: ...
4
votes
3answers
207 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
168 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
148 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
263 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
832 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
175 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
144 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
156 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
296 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
323 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
300 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
286 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 ...