Position N circles of different radii inside a larger circle without overlapping

Not a solution, just a brainstorming idea: IIRC one common way to get approximate solutions to the TSP is to start with a random configuration, and then applying local operations (e.g. “swapping” two edges in the path) to try and get shorter and shorter paths. (Wikipedia link) I think something similar would be possible here: … Read more

Mathematically producing sphere-shaped hexagonal grid

The shape you have is one of so called “Goldberg polyhedra”, is also a geodesic polyhedra. The (rather elegant) algorithm to generate this (and many many more) can be succinctly encoded in something called a Conway Polyhedron Notation. The construction is easy to follow step by step, you can click the images below to get … Read more

Polygon Triangulation with Holes

To give you some more choices of libraries out there: Polyboolean. I never tried this one, but it looks promising: http://www.complex-a5.ru/polyboolean/index.html General Polygon Clipper. This one works very well in practice and does triangulation as well as clipping and holes holes: http://www.cs.man.ac.uk/~toby/alan/software/ My personal recommendation: Use the tesselation from the GLU (OpenGL Utility Library). The … Read more

Get the minimal surface solution of a 3D contour

You can use FEniCS: from fenics import ( UnitSquareMesh, FunctionSpace, Expression, interpolate, assemble, sqrt, inner, grad, dx, TrialFunction, TestFunction, Function, solve, DirichletBC, DomainBoundary, MPI, XDMFFile, ) # Create mesh and define function space mesh = UnitSquareMesh(100, 100) V = FunctionSpace(mesh, “Lagrange”, 2) # initial guess (its boundary values specify the Dirichlet boundary conditions) # (larger … Read more

Maximum possible number of rectangles that can be crossed with a single straight line

Here is a sketch of an O(n^2 log n) solution. First, the preliminaries shared with other answers. When we have a line passing through some rectangles, we can translate it to any of the two sides until it passes through a corner of some rectangle. After that, we fix that corner as the center of … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)