Skip to main content

Questions tagged [discretization]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
85 views

Enclosing ParametricPlot3D to create a solid volume

I'm creating a 3D parametric hourglass shape that I hope to fill, making the center solid to use as a 3D volume, because I can't set parameters to it in COMSOL for simulations right now. I know that a ...
Char's user avatar
  • 539
2 votes
2 answers
59 views

DiscretizeRegion fails on a simple implicit region

No matter what option I set to DiscretizeRegion it fails on the region (missing second line). What else can be done? ...
azerbajdzan's user avatar
  • 18.7k
4 votes
1 answer
117 views

How to get finer discretization of 3D polytope?

For some purposes I need detailed mesh models of 2D and 3D shapes. No problem with 2D, so for Rectangle[] we get for example ...
lesobrod's user avatar
  • 1,699
5 votes
2 answers
204 views

Get interior of mesh region

I really like the functionality of Mathematica for mesh-based regions, and have enough understanding of it. But this problem bothers me. There is a similar question, but the functionality used now ...
lesobrod's user avatar
  • 1,699
0 votes
2 answers
103 views

How to build the following region?

Consider a 3D figure defined by the dependence $\Delta x(z),\Delta y(z)$. One example is a pyramidal frustum, for which $\Delta x, \Delta y$ are linear functions of $z$, and $z$ lies inside the ...
John Taylor's user avatar
  • 5,827
0 votes
0 answers
52 views

Express the double integral in terms of the function values at discrete nodes

Consider the following integral: $$ \mathcal{I}[p_{1},t] = \int \limits_{0}^{p_{1}}dp_{2}\int \limits_{0}^{p_{2}}dp_{3} \ \text{integrand} $$ where ...
John Taylor's user avatar
  • 5,827
3 votes
1 answer
162 views

Accuracy of numerical solutions provided by pdetoode

I am interested in solving the following differential equation using pdetoode (you can find pdetoode here). ...
umby's user avatar
  • 585
1 vote
1 answer
75 views

A non-degenerate region error in DiscretizeRegion

Consider the following region: ...
John Taylor's user avatar
  • 5,827
1 vote
1 answer
49 views

How can I discretize four long and complex functions with Mathematica?

I am looking for a procedure with Mathematica where one can discretize a function in a specific interval to a set of multidimensional vectors. In this way, we can possibly ease the calculation time ...
Superunknown's user avatar
0 votes
1 answer
136 views

How to generate a random point inside this region/discretize it?

Consider the following region: ...
John Taylor's user avatar
  • 5,827
1 vote
1 answer
64 views

How do discretize the following region?

Consider the following region: ...
John Taylor's user avatar
  • 5,827
1 vote
1 answer
155 views

Proper way to discretize a parametric spline surface

Given that I have a triangular mesh model defined in obj format (1590 vertices and 300 faces), I reconstruct it to a single B-spline surface. Now I want to export ...
Lavender's user avatar
  • 119
2 votes
1 answer
116 views

Ternary: TernaryListPlot and DiscretizeRegion - Formatting and Error Messages

I am trying to illustrate regions based on conditions in a ternary. I got help with a ternary template and I would like to include the regions now. Template ...
Tom's user avatar
  • 299
2 votes
0 answers
59 views

BoundaryDiscretizeGraphics for exotic unicode glyphs

This code works BoundaryDiscretizeGraphics[Text@"\[WolframLanguageLogoCircle]\[WolframLanguageLogo]", _Text] But for more exotic characters, it produces ...
Adam's user avatar
  • 3,956
8 votes
2 answers
327 views

Coarse mesh of a sphere

I try to mesh a sphere (examplary) in different qualities, using MaxCellMeasure: ...
Ulrich Neumann's user avatar
1 vote
1 answer
143 views

Compute area enclosed in a curve on a surface

Let's consider a 2D smooth surface embedded in 3D shown in the figure below. The corresponding metric tensor in Cartesian coordinates is \begin{equation} h = \biggr(\matrix{1 + \frac{A^2\pi^2}{4} \sin^...
lorenzop's user avatar
0 votes
1 answer
66 views

Are there commands other than ListPlot3D for plotting 3D points, where one coordinate ls either 0 or 1, and the other two lie in [0,1]?

I have a set of 3D points, the first coordinate of which, say, is confined to the values 0 and 1, while the other two can assume values within the unit interval [0,1]. ListPlot3D shows a continuous ...
Paul B. Slater's user avatar
3 votes
2 answers
311 views

Calculate surface normals at the boundary of a Graphics3D object

How do I go about calculating and plotting the surface normals at the boundary of a Graphics3D object? For example, consider this custom-defined ...
ap21's user avatar
  • 553
7 votes
1 answer
210 views

MeshRefinementFunction on 2D surfaces embedded in 3D

DiscretizeRegion doesn't seem to run the supplied MeshRefinementFunction when meshing a 2D surface in 3D. For example: ...
alessandro's user avatar
1 vote
0 answers
100 views

Discretization of the following integral: an optimal way

Consider an integral $$ I[f_{n},T]=\int \limits_{0}^{\infty} dE_{n}F(f_{n}(E_{n}),E_{n},T)+\int\limits_{0}^{\infty} dE_{n}\int_{\mathcal{F}(E_{n})}dE_{n}^{'}G(f_{n}(E_{n}),f_{n}(E_{n}^{'}),E_{n},E_{n}^...
John Taylor's user avatar
  • 5,827
4 votes
1 answer
185 views

How to improve the solution of the following differential equation?

Consider a PDE $$ \tag 1 \frac{\partial f_{n}}{\partial t}- \frac{1}{2t}E\frac{\partial f_{n}}{\partial E} = 0 $$ I choose the initial condition $f_{n}(E, t_{0}) = e^{-E/T_{0}}$, where $T_{0}$ is some ...
John Taylor's user avatar
  • 5,827
2 votes
1 answer
432 views

Create graded mesh

I want to create graded mesh inside a cube, with finer mesh in the left half and a coarser mesh in the right half. My plan was to partition the cube with a 2D plane and then generate boundary mesh ...
Deep's user avatar
  • 479
1 vote
1 answer
186 views

How do I properly define and work with region unions?

Suppose I have two regions defined by two hexahedrons (slightly adapted from this question): ...
Mr Puh's user avatar
  • 1,027
5 votes
2 answers
271 views

How to discretize the boundary of two regions?

Problem How to discretize a surface constructed with multiple components? Unsuccessful attempts include combining the objects top and ...
dantopa's user avatar
  • 1,070
1 vote
1 answer
71 views

Unable to affect mesh regions with DiscretizeGraphics

Problem On the sphere, it is easy to control the resolution of the mesh in DiscretizeGraphics using the MaxCellMeasure ...
dantopa's user avatar
  • 1,070
0 votes
1 answer
138 views

Mesh Refinement for interpolation of f[x,y] fails for all but the simplest f

I would like to interpolate a function, f[x,y,z], on a mesh of the unit cube, starting with a coarse tetrahedral mesh and refining tetrahedra as needed to reduce the interpolation error below a ...
John V.'s user avatar
  • 35
8 votes
2 answers
416 views

Computing volume of intersection of two regions

I am trying to compute the volume of intersection of the following two regions: ...
Yizhen Chen's user avatar
6 votes
4 answers
598 views

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

I have written a method to turn systems of linear differential equations into matrix equations (discretisation). This handles boundary conditions using the row replacement method. At the moment, I ...
jrekier's user avatar
  • 525
4 votes
2 answers
276 views

Why can't an annulus be mapped as a rectangle

The following code is used to map an annulus to a rectangle: ...
A little mouse on the pampas's user avatar
3 votes
1 answer
174 views

Discretizing a (kinked) line and showing how the points were determined [closed]

Suppose I have a (kinked) line, for example 2-x==y && x< 1 3-2x == y && 1.5>=x>= 1 I want to take this kinked line and represent ...
majmun's user avatar
  • 207
0 votes
1 answer
114 views

How to discritize a function domain (break xy-plane to a grid/mesh of squares with vertex values for evaluation)? [closed]

I wrote a code using MATLAB to discritize a function's 2D domain into squares/rectangles, whose vertex data (x,y) I can use to evaluate the function at. Then I sum these values over all vertices to ...
TribalChief's user avatar
8 votes
3 answers
276 views

Discretisation of region intersection in 3D

If I try to discretise the intersection (BoundaryDiscretizeRegion), of a shell in a cuboid, some of the regions (that are found with RegionIntersection) are lost in the discretising process. I tried ...
JackySnoep's user avatar
1 vote
1 answer
90 views

Errors from NDSolve [closed]

I'm trying to solve a system of PDEs with periodic boundary conditions using NDSolve. This works if I don't specify an initial condition (but is uninteresting, ...
Zhen's user avatar
  • 11
3 votes
1 answer
161 views

Is there a way to automatically use triangular elements in ToElementMesh [closed]

I have some simple code to generate a mesh over a rectangle. ...
Doug Kimzey's user avatar
  • 2,279
2 votes
1 answer
110 views

Discretize Graphics3D with Scale and Rotate?

How can I discretize a Graphics3D object that makes use of Scale and Rotate? When I try <...
Mr.Wizard's user avatar
  • 272k
0 votes
1 answer
166 views

(Updated) How do I fix a Discretization error?

I am attempting to model a cross section problem from Calculus II using the general slicing method. Below is the working code to generate the "slices" of the defined problem; however, I would like to ...
Ethan Smith's user avatar
4 votes
2 answers
233 views

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

I'd like to generate a grid such that each element is a dimension $d$ vector ($\vec v$) of non negative components that add up to one. I could use the approach in this post and then choose among the ...
Patricio's user avatar
  • 583
2 votes
1 answer
114 views

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

Let's generate an arbitrary convex domain with smooth boundaries: Graphics[BSplineCurve[{{1, 4}, {5, 3}, {9, 4}, {5, 5}, {8, 7}}, SplineClosed -> True]] I'...
highly oscillatory integrand's user avatar
5 votes
1 answer
161 views

Randomly distributed circles inside an annulus

With the following code: ...
Dimitris's user avatar
  • 4,824
4 votes
1 answer
169 views

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

I want to create a MeshRegion that is VoronoiMesh bounded by the associated ConvexHullMesh. I followed the procedure in the answer for this post, but the resulting MeshRegion is very wrong. This is ...
GibBits's user avatar
  • 43
5 votes
1 answer
854 views

DiscretizeRegion was unable to discretize the region ImplicitRegion

I'm trying to model a 3D die with ImplicitRegion[] in order to find out its center of mass. However, when I apply ...
materia-nigra's user avatar
5 votes
1 answer
280 views

Converting 3D graphics primitives to 3D image data

My goal is to produce a 3D dataset, from a scene of simple transformed shapes. The idea is that this data serves as a ground truth for some tomographic reconstruction problems. (For this, it is ...
Woefwoefwoef's user avatar
4 votes
1 answer
341 views

using a custom method to discretize functions with 3 variables to be used in NDSolve

I was using the pdetoode function that @xzczd made: Dynamic Euler–Bernoulli beam equation But it only works for functions with 2 variables, I was wondering if it ...
Hidde Rinsema's user avatar
2 votes
0 answers
158 views

DiscretizeGraphics on a RegionDifference not returning a MeshRegion

I want to take region difference of a sub-mesh of a Delaunay Mesh and a discretized ImplicitRegion. However, Mathematica does not recognize the return as a MeshRegion. Moreover, Discretizing the ...
Himalaya Senapati's user avatar
3 votes
1 answer
108 views

Unexpected DiscretizeGraphics behaviour

One way to generate an annulus is by using ChartElementData: ...
arslancharyev31's user avatar
3 votes
1 answer
263 views

Collision between a point and a square

Suppose we have a point of time laws: xP[t_] := 0.40 + 0.51 t; yP[t_] := 0.41 + 0.42 t; and a square with side: L := 2.01 ...
πρόσεχε's user avatar
2 votes
1 answer
200 views

RegionPlot of DiscretizeRegion of ImplicitRegion

Writing: A = ImplicitRegion[Max[Abs[x - 1 + 2 y], Abs[y - 1 - 2 x]] == 1, {x, y}]; RegionPlot[DiscretizeRegion[A]] I get: while writing: ...
πρόσεχε's user avatar
0 votes
1 answer
48 views

Loops and guesses

I have to solve a system of equations in the following way: I first guess a value for a variable, let's call it y, calculate another variable ...
Laura K's user avatar
  • 393
3 votes
2 answers
370 views

How to discretize parametric curves for FEM analysis

I would like to know if there is anything available in order to discretize a 3D curve given by parametric equations in order to apply FEM analysis, e.g. to solve the wave equation on a thin wire ...
SpaceChild's user avatar
0 votes
1 answer
138 views

Discretize a Graphics3D object over a given 3D lattice

Is there a way to discretize a Graphics3D object using a regular lattice with a given lattice spacing. For example: ...
user147813's user avatar