32 votes
Accepted

Faster way to compute the distance from a point to a surface in 3D

Well, you can use the undocumented RegionDistance which does exactly this as follows: (This answer, as written, only works for V9 as noted by Oska, for V10 see ...
user avatar
  • 32.5k
17 votes
Accepted

How to mesh a region using adaptive cubic elements

I discarded my previous approach to generate cubes, then fuse them together, since it seems to do a lot of wasted work. Instead, I propose here my version of a cartesian mesher. The approach is ...
user avatar
  • 58.4k
14 votes

Alternative to the `DiscretizeRegion`?

I'd say that if the problem is to style the result of DiscretizeRegion, then you don't have a problem :-) You can use MeshCellStyle to indicate the styles to apply ...
user avatar
  • 58.4k
13 votes
Accepted

Exact symbolic area of an intersection of two polygons with parameters

Having Area generate conditions is informative: ...
user avatar
  • 58.4k
11 votes
Accepted

RegionNearest and neighborhoods

If you don't mind using undocumented stuff, you can access lots of useful properties by converting the BoundaryMeshRegion to a ...
user avatar
  • 83.3k
11 votes
Accepted

How do I get a MeshRegion from an obj file, or from Geometry3D

Well, you have to first convert it to a MeshRegion. Let's take the space shuttle for example: ...
user avatar
  • 32.5k
11 votes
Accepted

How to fill the closed region by ParametricPlot with solid color?

...
user avatar
  • 349k
11 votes
Accepted

User-defined DistanceFunction for RegionNearest

I don't think there's any way to give RegionNearest a user defined DistanceFunction. I don't see an ...
user avatar
  • 32.5k
10 votes

How to mesh a region using adaptive cubic elements

My take on the problem. We start with the largest cuboids and break down the border cuboids into four smaller cuboids. The function can be nested as many time as needed. ...
user avatar
  • 9,138
9 votes
Accepted

Probable Bug in ConvexHullMesh

This is at least one bug, possibly more. Let me explain: If we go one step further and use ...
user avatar
  • 35.6k
9 votes
Accepted

Getting cell edges from a picture

Here is an approach based on WatershedComponents and MorphologicalGraph. Some of the steps feel a bit over-complicated, so feel ...
user avatar
  • 23.4k
8 votes

How to plot and find the volume of a solid enclosed by surfaces?

There are a number of ways to do this. Sometimes use of Reduce simplifies the constraints but as Dr Hintze's comment shows Mathematica handles boolean statements ...
user avatar
  • 55k
6 votes

Cutting a section from a sphere by planes

ClipPlanes does exactly what you need: You can use ClipPlanes in two different ways: (1) As an option to clip all the 3D ...
user avatar
  • 349k
6 votes
Accepted

Construct a section (or slice) through 3D Regions

Note that RegionIntersection[rr, ip] should give you what you want here but doesn't. Since we have an axes aligned plane, we can workaround this by exploiting the ...
user avatar
  • 32.7k
6 votes
Accepted

How do I verify a vector identity using Mathematica?

You can use FrenetSerretSystem: FrenetSerretSystem[{x[s], y[s], z[s]}, s][[-1, -1]] //TeXForm $\left\{\frac{y'(s) z''(s)-y''...
user avatar
  • 123k
6 votes

Finding shadow area of a 3D object

Here is another approach where you convert a region to a RegionImage. Then you can use ImageRotate to rotate about a vector and <...
user avatar
  • 15.9k
5 votes
Accepted

Possible Bug in DiscretizeRegion with Option MaxCellMeasure

Edit: Wolfram Technical Support has confirmed this as a bug The only workaround I know is to turn the MeshRegion into a ...
user avatar
  • 32.5k
5 votes

Package for symbolic computation of christoffel symbols and parallel transports in Riemannian geometry, given the metric

The most powerful tensor package suit for MMA (and arguably for any CAS) is xAct. It uses the full machinery of diff geometry (fiber bundles, connections, forms, ect) and a powerful canonicalization ...
user avatar
  • 5,200
5 votes
Accepted

Find smallest distance from a point to a Bézier curve

...
user avatar
  • 349k
5 votes

Find smallest distance from a point to a Bézier curve

Simply using BezierFunction is not enough. The BezierFunction will not match the BezierCurve ...
user avatar
  • 20.4k
5 votes
Accepted

Minimize relating a geometric test

Not a solution based on Minimize but there are built-in functions to do this. ...
user avatar
  • 15k
4 votes

Is there any way to improve the result of DiscretizeRegion on this 3D ImplicitRegion?

This is a tangential answer to your question, but perhaps it may be of interest nonetheless, in the spirit of providing an alternative approach. In the case of a cubic region you may be interested ...
user avatar
  • 58.4k
4 votes
Accepted

Simplify behavior: assumption as Interval versus assumption as bounds

Element treats Intervals as geometric regions, and members of those geometric regions are vectors, even when they are of single ...
user avatar
  • 14.6k
4 votes
Accepted

How can one compute a 3D Periodic Delaunay Triangulation using DelaunayMesh?

The main idea is to find the gap position dimension by dimension. Take the first dimension for example, to accomplish that, we first project the hold points set to x axis, and do some very basic but ...
user avatar
  • 26k
4 votes

RegionDifference not working properly for a region from a printable STL file

I have described integrating Mathematica and the open source 3D modeling tool, Blender 2.79b, in previous answers here and here. Your geometry does have some small features and concavity that can ...
user avatar
  • 15.9k
4 votes

RegionUnion for 3D Regions

Note that this is only an issue with the display -- the region itself is still correct. We can see this by sampling a bunch of random points: ...
user avatar
  • 32.7k
4 votes
Accepted

Periodic boundaries for a 3D walk in a Bravais lattice?

LatticeData makes use of the abstract Mathematica Entity Lattice. This reflects the physical ...
user avatar
4 votes

Finding shadow area of a 3D object

Your question is fundamentally not about a 3D object, incidentally. Binarize the image (called image), then find the number of black pixels, and divide by the ...
user avatar
4 votes

Given three points in space, find center of circle

Given 3 point, search the center of the circle through these points. The center of the circle must lay in the same plane as p1,p2,p3, therefore we can write: ...
user avatar
  • 24.3k
3 votes

How do I verify a vector identity using Mathematica?

Since N is a built-in symbol, we will use n instead of N. The required formulas are ...
user avatar
  • 33.8k

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