Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.
35

One example that appears in many areas of physics, and in particular classical mechanics and quantum physics, is the two-body problem. The two-body problem here means the task of calculating the dynamics of two interacting particles which, for example, interact by gravitational or Coulomb forces. The solution to this problem can often be found in closed form ...


27

A famous example is the boolean satisfiability problem (SAT). 2-SAT is not complicated to solve in polynomial time, but 3-SAT is NP-complete.


26

In one and two dimensions, all roads lead to Rome, but not in three dimensions. Specifically, given a random walk (equally likely to move in any direction) on the integers in one or two dimensions, then no matter the starting point, with probability one (a.k.a. almost surely), the random walk will eventually get to a specific designated point ("Rome"). ...


21

Here's one close to the hearts of the contributors at SciComp.SE: The Navier–Stokes existence and smoothness problem The three-dimensional version is of course a famous open problem and the subject of a million-dollar Clay Millenium Prize. But the two-dimensional version has already been resolved a long time ago, with an affirmative answer. Terry Tao notes ...


20

In social choice theory, designing an election scheme with two candidates is easy (majority rules), but designing an election scheme with three or more candidates necessarily involves making trade-offs between various reasonable-sounding conditions. (Arrow's impossibility theorem).


16

The are essentially two approaches to free quad meshing: Direct methods generate a quad mesh directly, usually by some advancing front method. The Paving paper is a standard reference and is the method used by CUBIT, so you have seen these meshes in many publications. Indirect methods generate some intermediate decomposition of the domain (e.g. triangles) ...


16

The usual randomized edge hopping method should work. Basically, start with any triangle of the mesh, then determine which of the edges the target point lies on the opposite side of. That is, determine which of the edges, when extended out to a line, separate the point from the interior of the triangle. When there are two possibilities, choose one at random, ...


13

For computing three-dimensional Delaunay triangulations (tetrahedralizations, really), TetGen is a commonly used library. For your convenience, here's a little benchmark on how long it takes to compute the terehedralization of a number of random points from the unit cube. For 100,000 points it takes 4.5 seconds on an old Pentium M. (This was done with ...


12

Chances are, you don't want something truly random; you want something that has the same abstract 3D structure as a plant root system, but beyond a certain level of abstraction, you don't care what the root system looks like. I'm guessing you want some way to generate 3D fractal domains of the kind mentioned in this paper describing the calculation of ...


12

The simple answer is that they are dual because for every delaunay triangulation there exists one and only one corresponding voronoi tessellation and vise versa. Thats true for most cases, but there are cases were the correspondence is not one to one. For example in the case when the voronoi tessellation is a regular square grid. Both the voronoi ...


12

Just to illustrate what others are saying: the blue below is the Voronoi diagram, the red the dual Delaunay triangulation. They are dual to one another as geometric plane graphs. From the Voronoi diagram it is trivial to derive the Delaunay triangulation. The reverse direction is not so obvious, but it remains true that from the Delaunay triangulation and ...


12

There is a known mathematical question here: you are given a unit vector, lying on the $(n-1)$-sphere in $\mathbb{R}^n$, $v\in S^{n-1}$, and you would like to associate with each such vector a frame in the tangent bundle of $S^{n-1}$ at $v$. This is a map $S^{n-1}\to \mathrm{F}S^{n-1}$ from the sphere to its frame bundle, also known as a global section of ...


11

I would say that there are a number of reasons why there are no computational science contests besides the potentially massive computational resources required. Time limits: Writing scientific computing code is usually not something that you want to rush. A lot of emphasis is on making sure it is correct, and thorough consideration of test/corner cases. ...


11

Here is an approximate solution. Since N is so large and M is so small, how about the following: Compute the convex hull of N Select up to M points from the hull that satisfy your maximum distance criteria. If Step 2 leaves you with fewer than M points then select 1 point from the interior that maximizes its distance from the previously selected points. ...


11

In order to find such a set of vectors, you can use the Householder QR factorization. Let your unit vector $v$ be given. Define a nonsingular matrix $A$ by $$ A = \left(\begin{array}{cccc} v & a_2 & \cdots & a_d \end{array}\right), $$ where it is not so important how you obtain the columns $a_2, \ldots, a_d$ of $A$, as long as $\{v, a_2, \ldots, ...


11

Simultaneous diagonalization of two matrices $A_1$ and $A_2$: $$ U_1^T A_1 V = \Sigma_1,\quad U_2^TA_2V=\Sigma_2 $$ is covered by existing generalized singular value decomposition. However, when the simultaneous reduction of three matrices to a canonical form (weaker condition compared to the above) is required: $$ Q^T A_1 Z = \tilde{A_1},\quad Q^T A_2 Z = ...


10

gStar4D is a fast and robust 3D Delaunay algorithm for the GPU. It is implemented using CUDA and works on NVIDIA GPUs. Similar to GPU-DT, this algorithm constructs the 3D digital Voronoi diagram first. However, in 3D this cannot be dualized to a triangulation due to topological and geometrical problems. Instead, gStar4D uses the neighborhood information ...


9

There's a simple test to see if a point $(x, y)$ is enclosed within a curve. Draw a ray from $(x, y)$ to infinity, and count how many times it crosses the curve; if the count is odd, then $(x, y)$ is inside the enclosed region; otherwise, it's outside. To turn this into a practical algorithm, you could first build polygonal approximation of the curve and ...


9

if my years in the industry have taught me anything, it's this: everything depends on the grid. developing a robust solver that efficiently converges to machine zero might be the flashy rock star job, but the unsung heroes are the developers that improve our gridding algorithms. if you're looking for a really great way to lose the effects of a vortex, try ...


9

There are plenty of examples in quantum computing, although I've been out of this for a while and so don't remember many. One major one is that bipartite entanglement (entanglement between two systems) is relatively easy whereas entanglement among three or more systems is an unsolved mess with probably a hundred papers written on the topic. The root of ...


8

Important note: This answer does not answer the actual question, but it was left undeleted per request. Embarrassingly I confused hexahedral and hexagonal. The question is about sorting points into arbitrary hexahedral cells in 3D while this solution sorts points into regular hexagonal cells in 2D, or irregular ones that correspond to some Voronoi ...


8

I'm not convinced your solution is actually correct. Consider the situation where you have these nodes: A: (-3, 1) B: (0, 2) C: (3, 1) D: (0, -5) There are triangles ABC and ACD. Now B is the closest point to the origin, but the origin is in triangle ACD, which doesn't contain B. For the rest, this answer provides a solution that may in degenerate cases ...


8

You can use Morton keying to sort the coordinate locations by binning them into cubes of some specified size $d$. This is an $\mathcal{O}(N\log N)$ operation. Then, given any point P, you can use its Morton key to search only in a small number $(\mathcal{O}(1))$ of nearby boxes, bounded by your distance criterion. The search for each box is $\mathcal{O}(\log ...


8

Why don't you try something geometric rather than numerical. I propose the following approach. Let the points from the loop form the sequence $\alpha_i \,\, : \,\, i = 1, 2, 3 ... I$ and as you said, all of them lie on a given smooth surface. Furthermore, you know the unit normal ${n}$ everywhere on the surface. Then you know the unit normal to the surface ...


7

To add to Dmitry's answer (copied over from the deleted version of this question): Matrix-free finite elements are relatively well-known. For explicit methods for transient problems, this involves applying the finite element matrix using small reference matrices and geometry-specific transformations. For implicit problems, this is usually done in ...


7

I think you could use the "marching cubes" algorithm. If memory serves, it requires a grid of samples as input, so at the very least you should be able to sample your function and run the algorithm as-is. You also might be able to modify the algorithm to callback to f directly. There's a popular implementation at http://paulbourke.net/geometry/polygonise/ ...


6

The $\mathcal{O}(n+k)$ algorithms seem to be limited to convex polygons. The fastest algorithms that I have found here and here have approximately $\mathcal{O}(n\log(n))$ algorithms. According to this, the problem of simple polygon intersection is linear time transformable to line-segment intersection testing, which has an optimal bound of approximately ...


6

In the comments to Johan's post I said it seems a shame to throw a full MIQP solver at this. For a general $n$-dimensional polyhedron, I'd certainly hold to that. But since this is a 3-dimensional problem, it might be competitive to do an intelligent exhaustive search. I suppose it depends on the application. First, suppose we have constructed a generator ...


Only top voted, non community-wiki answers of a minimum length are eligible