Questions tagged [polyhedra]
84 questions
3
votes
3 answers
Using JavaScript to model 3D polyhedra
Is there a JavaScript library that models 3D polyhedra using the canvas tag or SVG? Say I wanted to produce renderings of the Platonic solids, how would I best achieve this? FWIW, I'm only concerned with WebKit-based web browsers such as Safari and…

Andrew Hedges
- 21,688
- 16
- 67
- 79
2
votes
1 answer
Algorithms for polyhedral graph (planar 3-connected graph) isomorphism?
I've put some research in on the topic of graph isomorphism for planar 3-connected graphs, but there are an abundance of algorithms of different restriction, theoretical complexity, and frequency of use and I am having trouble finding one that…

Mike Graham
- 73,987
- 14
- 101
- 130
2
votes
1 answer
Create polyhedron for given matrix A and vector b
P(A,b)={x∣ A.x ≤ b}
I have to create a polyhedron with this inputs
but in sage inequalities like this A.x + b >= 0 , how to convert

XLVII
- 31
- 5
2
votes
2 answers
How to generate random points within an octahedron without discarding?
I need random points within an octahedron, uniformly distributed. I am defining an octahedron as the volume where all points satisfy abs(x) + abs(y) + abs(z) <= 1 where abs gives absolute value. IE: each of the six vertices would be on an axis, 1…

Travis Well
- 947
- 10
- 32
2
votes
0 answers
Plotting a 3D surface from x, y, z scatter data in R
I have a dataframe of coordinates (x,y,z) where a function takes value 1, with all other coordinates being set to 0. Here is a simplified sample dataset analogous to what I am working with:
dd <- data.frame(x = c(rep(1,9),rep(2,9),rep(3,9)),
…

Justyna
- 737
- 2
- 10
- 25
2
votes
2 answers
How to find integer points (coordinates) inside a polytope/polyhedra?
I am using Python but I wouldn't mind changing language. All I have gotten from my research are tools to count the number of (lattice) points inside a region given the equations for the planes that enclose it. Other tools are made to optimize a…

Vinícius Godim
- 217
- 1
- 8
2
votes
0 answers
CGAL Nef polyhedra causing segfault when created from polyhedron
I'm using points to create planes, and then taking the intersection to form polyhedra, and using those polyhedra to construct nef polyhedra. Out of my roughly 2500 polyhedra, one seems to cause a segfault.
Here's a replication with the same…

user3747260
- 465
- 1
- 5
- 14
2
votes
2 answers
Build polyhedron with known faces
What is the name for this process: Constructing a polyhedron from known 2D facets (e.g.: triangles) which have connection data for their vertices?
More simply put, if I have all the pieces of a 3D and I know which corners should connect to which,…

Matt W
- 11,753
- 25
- 118
- 215
2
votes
1 answer
How to plot polytopes and Lemke-Howson path in Python?
I have implemented a Lemke-Howson algorithm in python and I'd like to be able to show the game polytopes and the path that the algorithm follows graphically. I want something simple like this:

Stefan Dimitrov
- 21
- 3
2
votes
1 answer
How to control the order of points in OpenCV findContours?
I am working on an OpenCV code in C++ that basically tries to detect the boundary points of a page in an image. I use the findCountours() function to find the contours and after that, I try to find quads using the approxPolyDP() function and…

Iceflame007
- 147
- 2
- 11
2
votes
1 answer
Parma Polyhedra Library: Vertex Enumeration
I'm trying to use the Parma Polyhedra Library [1] to enumerate the vertices of a (convex) polytope, e.g., I have a rectangle specified by four constraints:
Constraint_System cs;
cs.insert(x >= 0);
cs.insert(x <= 3);
cs.insert(y >= 0);
cs.insert(y <=…

Christopher
- 277
- 2
- 11
2
votes
0 answers
Create of polyhedron from vertex coordinates and offset polyhedron
My goal is to create a 3 dimensional polyhedron from a data frame of x, y, and z coordinates. I would like values similar to a SpatialPolygons object, but other suggestions are welcome. I would then like to extend the gBuffer function to 3D…

Mickey Smith
- 153
- 6
2
votes
2 answers
How do I check if a set of plane polygones create a watertight polyhedra
I am currently wondering if there is a common algorithm to check whether a set of plane polygones, not nescessarily triangles, contruct a watertight polyhedra. Each polygon has an oriantation (normal vector). A simple solution would just be to say…

curator
- 175
- 2
- 10
1
vote
1 answer
CGAL::Polyhedron_3 makes unwanted duplicated vertices using make_tetrahedron(), how to solve it?
I was trying to create a volume mesh using the CGAL::Polyhedron_3 data structure when, doing some tests, I noticed that the make_tetrahedron function duplicates the vertices already present in the polyhedron.
Example: Two tetrahedra that share a…

Davide
- 25
- 5
1
vote
1 answer
Assume we know the vertices of a polytope, and want to get its halfspace representation A * x <= b
I want to get halfspace representation A*x <= b, given the vertices of a polytope either python or Matlab.
Let's say vertices = [2 -2; 2 2; -10 2; -10 -2]; are the vertices, I used two different libraries and give two different answers, Not sure,…

GPrathap
- 7,336
- 7
- 65
- 83