# Tag Info

Accepted

### How to Discretize a Tube

It took quite a while, but I've finally come up with a way to generate discretized tubes. This again is based on work in this previous answer (from the thread mentioned earlier by Michael). In the ...
Accepted

### What is the best way to parse differential equations and boundary conditions to a custom function?

Assuming everything is syntactically correct, the function that does what you want is InternalProcessEquationsSeparateEquations: ...
• 237k

### How to generate grid points on boundary of $[-1,1]^d$ for arbitrary dimension $d$ and specified resolution?

Since version 10.1, there has been a built-in function CoordinateBoundsArray to do this kind of thing. It is readily adapted to your special case. ...
• 108k
Accepted

### How to generate grid points on boundary of $[-1,1]^d$ for arbitrary dimension $d$ and specified resolution?

Here's a pretty general solution. This generates the desired boundary lattice points in $[0,1]^d$; apply Rescale[] as needed: ...

### What is the best way to parse differential equations and boundary conditions to a custom function?

I'll just give an idea to make it easier to do this. Which is not to use the same API as NDSolve, as that requires much much more work to parse it. Instead, have ...
• 146k
Accepted

...
• 397k
Accepted

### DiscretizeRegion fails for a triangular region

Looks like you've uncovered a bug. I can confirm this behavior in 10.3.1 and 10.4. You can still discretize your region using DiscretizeGraphics though: ...
• 33.2k
Accepted

### Creating Voronoi Mesh Region Bounded by Convex Hull (Possible problem with DiscretizeGraphics)

I'm not really sure what's going on, but I can provide a workaround. First, I notice if I just discretize the first 99 cells, I get the desired result 1 out of 3 times. Strange. ...
• 36.3k
Accepted

### How to discretize the boundary of two regions?

Here is an option using OpenCascadeLink. OpenCascade is an open source 3D CAD package that often does a better job retaining sharp features with boolean operations and seems to be fairly robust. <...
• 16.4k
Accepted

### How to get a larger triangle when we discretize a sphere?

How about the following: a = BoundaryDiscretizeRegion[Ball[{0, 0, 0}, 1], MaxCellMeasure -> {"Length" -> 3}, PrecisionGoal -> 0.01] ...
• 4,023
Accepted

### How to apply DiscretizeGraphics to a tube?

A possible workaround (brought up by the Wizard in the comments) involves the use of some of the functions from this previous answer. In particular, you will need ...
Accepted

### DiscretizeRegion was unable to discretize the region ImplicitRegion

You can use the Finite Element mesh generator. Needs["NDSolveFEM"] mesh = ToElementMesh[\[ScriptCapitalR]] That already gives a hint to what the problem is ...
• 40k

### Computing volume of intersection of two regions

This is not ideal, but it gives an approximate resulting region. I first generate random points on the hexagon and add a random vector on the unit sphere. I take the convex hull of the points which is ...
• 25.5k

• 40k
Accepted

### How to improve the solution of the following differential equation?

Actually the answer depends on parameters. The best what I get just playing with difference order and rational numbers is the following code ...
• 45.8k
Accepted

### How to get finer discretization of 3D polytope?

Edit I found that "Length" -> .2 work when we use ...
• 76.5k
Accepted

### Collision between a point and a square

Here is a function which you pass it the time, and will return True is point is inside the rectangle else False. This is based ...
• 146k
Accepted

### Problem with ToBoundaryMesh

You could try this as a workaround for now: ...
• 40k
Accepted

### Converting 3D graphics primitives to 3D image data

As I noted in the comments, a judicious combination of RegionImage[] and ImageMesh[] will yield suitable voxelizations of ...
Accepted

### Unexpected behavior of DiscretizeGraphics

Text does not scale with the ImageSize. Try to manually resize graphics containing text (by dragging the handle). The text ...
• 236k

### How to generate grid points on boundary of $[-1,1]^d$ for arbitrary dimension $d$ and specified resolution?

You could try something like this: generateGrid[dim_] := DeleteCases[Tuples[{-1, 0, 1}, dim], {0 ..}] For the case of specifying a resolution as well, try: <...
• 8,798
Accepted

### Finding NonlinearModelFit of multiple data sets with the same parameters and in two dimensions

If you restructure your datasets to have each row representing {x,t,y} with y as the response variable, it should be pretty ...
• 41.9k
Accepted

### Randomly distributed circles inside an annulus

Far from efficient, but we can adapt the Neat Example from the RegionDisjoint ref page. Note that a non-uniform distribution of radii would probably speed things up....
• 36.3k

### What is the best way to parse differential equations and boundary conditions to a custom function?

Here's a simpler way (simpler than my first answer) that I came up with today exploring a problem with DSolve. It calls ...
• 237k
Accepted

### Computing volume of intersection of two regions

Here is an approach based on creating exact regions: ...
• 40k
Accepted

### Calculate surface normals at the boundary of a Graphics3D object

First of all, we need 2 more options in boundedOpenCone. The option BoundaryStyle -> Automatic creates a ...
• 67k
Accepted

### Coarse mesh of a sphere

In this case DiscretizeGraphics does what you want: ...
• 36.3k

### Traverse "curve" on a grid from a given cell

a graph approach: ...
• 39k
Accepted

### Perpendicular chord lengths from the boundary points of an arbitary 2D shape

...
• 397k
You can use IntegerPartitions, which (despite its name) also partitions rationals. Your problem is to partition the number 1 into a set of $d$ nonnegative integer ...