# 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

### Extending DiscretizeRegion from 2D to 3D

RegionProduct[R2D, Line[{{0.}, {2.}}]]
• 78.2k
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: ...
• 240k

### 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 ...
• 148k
Accepted

...
• 399k
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.4k
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,093
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 ...
• 40.2k

### 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.6k

• 40.2k
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 ...
• 46.8k
Accepted

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

Edit I found that "Length" -> .2 work when we use ...
• 78.2k
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.4k
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 ...
• 148k
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 ...

### 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

### 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
Accepted

### Problem with ToBoundaryMesh

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

### 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 ...
• 240k
Accepted

### Computing volume of intersection of two regions

Here is an approach based on creating exact regions: ...
• 40.2k
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 ...
• 67.1k
Accepted

### Coarse mesh of a sphere

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

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

a graph approach: ...
• 39k
Accepted

...
• 399k
Accepted

### Generating a grid such that the elements in each row add up to one

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 ...
• 49.1k