Questions on constructing graphical objects using relatively complex computations relating to the mathematical structures defining those objects. Examples include convex hulls, mathematical constructions, symmetries, genuses of curves and graphs and programmatic constructions of polyhedra.

learn more… | top users | synonyms

0
votes
0answers
58 views

Plot all points that satisfy a condition [on hold]

I'm interested in plotting various curves directly from their definitions, but I have no idea which function I'd use for that. For example, I'd try plotting a circle by telling Mathematica that a ...
1
vote
0answers
38 views

How to speed up geometric Resolve query involving $\exists$ and $\forall$?

I would want to test connectedness of semialgebraic sets with naive code like this: ...
-3
votes
0answers
64 views

Billiard in the square [closed]

I have code for building the billiard in square. How I can draw it with changing the first point? ...
1
vote
1answer
55 views

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

I've no knowledge in mathematica (but I do in matlab), but I'd really appreciate if someone could mention what is/are the best and easy to learn mathematica package(s) for symbolic and numerical ...
-2
votes
1answer
47 views

Solve on parametric equation produces inequal results

I have a parametric (parameter t) equation in two dimensions (vectors). s = Solve[pt[t] == qt[t], {a, b}] Both pt and qt are parametric lines using a and b as ...
-1
votes
0answers
37 views
0
votes
0answers
44 views

Broad Phase Collision Detection with Mathematica and using CUDA

In this and this post, I asked the question about a fast sweep and prune algorithm implementation for broad phase collision detection. To further speed up things a CUDA implementation would be even ...
2
votes
1answer
137 views

Region bounded by Ellipse and Line

I have an ellipse defined either as algebraic or geometric: algebraic: ax^2 + bxy +cy^2 + dx +ey +f = 0 geometric: major Axis, minor Axis, x center, y center, ...
2
votes
0answers
67 views

Differential Geometry on a MeshRegion

For many many years (honestly, since 1987) I've had my own MMa computational geometry code for dealing with 3D meshes. I principally (there's a joke there somewhere) use it to calculate coordinate ...
1
vote
0answers
78 views

Collision detection algorithm (discrete) with sweep and prune algorithm for periodic boundary conditions

EDIT: Question Updated with solution approach, but solution much slower than original implementation. Any ideas to speed up implementation? In the discussion on collision detection (see here) I asked ...
2
votes
3answers
240 views

Surface area of a cylinder [closed]

Evaluating expr = {Sin[t], Cos[t], Sin[p]}; ParametricPlot3D[expr, {t, 0, 2 π}, {p, 0, 2 π}] Area[expr, {t, 0, 2 π}, {p, 0, 2 π}] gives an area of ...
2
votes
2answers
213 views

Finding if a point is in a region bounded by a curve and the axes (curve made of discrete points)

Here's a small example this is not the real curve but a simple example I made for this question. Here's the plot of a list with a point A of known coordinates. Now I need to find if the point A ...
1
vote
0answers
56 views

Implementation of Lubaehevsky-Stillinger Algorithm to pack hard spheres

To generate a model of a polycrystalline material with specified grain size distribution (e.g coming from a Monte Carlo Grain Growth simulation) the Paper "Effects of grain size distribution and ...
2
votes
0answers
107 views

Fitting a rotated ellipse to data points [closed]

I have a bunch of x,y scatter data and I am trying to fit an ellipse through them. I understand that this question has been asked before and there are resources for this, e.g.: Fitting ellipse to 5 ...
0
votes
0answers
71 views

Von Neumann's method to generate points uniformly distributed on a region of a n-sphere surface

I am trying to generate points uniformly distributed on a region of a single n-sphere surface (all angles in hyperspheric coordinates are between 0 and Pi/2). I decided to use von Neumann's method ...
0
votes
0answers
78 views

Meshing of a cube

I want to mesh a cube and what I use is ToElementMesh[Cuboid[ {-1, -1, -1}, {1, 1, 1}]]. This creates a regular grid of the cube. Is there a way to specify that ...
23
votes
3answers
615 views

Can Mathematica solve Plateau's problem (finding a minimal surface with specified boundary)?

Given a closed curve $\mathcal C$ in three dimensions, is it possible to use Mathematica's built-in functionality to compute a minimal surface whose boundary is $\mathcal C$? For simplicity, let us ...
6
votes
2answers
135 views

Discretizing regions with pointy boundaries

I'm trying to discretize a region with "pointy" boundaries to study dielectric breaking on electrodes with pointy surfaces. So far I've tried 3 types of boundaries, but the meshing functions stall ...
1
vote
1answer
113 views

Distinguishing left from right adjacent triangles in triangle mesh

What I'm trying to do: I'm trying to create a path-drawing function which will produce a path like the one I-P in the diagram below. The way this path was generated requires me to swap between the ...
1
vote
0answers
86 views

Dirichlet conditions being ignored

I have the following domain: ...
1
vote
1answer
76 views

Toroidal implicit region looks weird

I have the following toroid surface: ...
5
votes
3answers
140 views

Find Unconnected Subregions

If I have a region, how can I identify sub regions that may be disconnected, if any exist? region defines a rectangular region given two diagonally opposed ...
1
vote
0answers
56 views

How can I define a metric in xAct?

I'm using "xAct" package and I want to define a my metric, that is a non standard metric. For example, my metric is diagonal ...
4
votes
2answers
178 views

Extracting ragged array from an image

I have a list of points, which represent positions of peaks in an image. The nature of the image itself shouldn't matter, as I already have the peak positions. As a simple example, consider the ...
24
votes
2answers
309 views

Bug in ArcLength?

fixed in 10.1 (windows) With Mathematica 10.0.2: ArcLength[Line[{{0, 0}, {1, 0}, {2, 0}}]] ArcLength[Line[{{0}, {1}, {2}}]] (* 2 *) (* 2 *) However, ...
3
votes
3answers
240 views

Cut a polygon by a line

I have a polygon, says, Polygon[{0,0},{10,0},{10,10}{0,10}]. I would like to cut it by a line (through two points) and take one half of it. Could you please suggest ...
1
vote
2answers
154 views

Only show part of a cube below an intersecting plane

I plot a cube and a plane. I just want to show the part below the plane. The code: ...
5
votes
2answers
144 views

Test existence of a path from one side of a graph to another

I'm trying to determine how I can test if a path exists from one side of a graph to another as efficiently as possible. If I have the Lines given by: ...
6
votes
5answers
919 views

How to check if a line segment intersects with a polygon?

The naive method is to bisect the line segment iteratively as asked here, and then check the bisection points using How to check if a 2D point is in a polygon?. Would there be an other way? I'm ...
6
votes
1answer
173 views

Obtain polygons describing all intersections of many polygons

I have 6894 polygons describing zones in a state plane (i.e., cartesian) coordinate system. Most are not very complex, and I believe none have holes. A random example is Polygon[{{351633., ...
0
votes
0answers
51 views

How to determine if a point is within a geopositioned RegionMember

I have a KML file which contains an area of interest, I also have a number of lat/long geo positions. I'm trying to filter out the points not within my AOI. So I have my KML file. I convert it to a ...
2
votes
1answer
59 views

RegionUnion issues with many Regions

The new RegionUnion[] function is just what I needed if only I could get it to work. I have many non-overlapping regions that I will need to use as plotting domains ...
17
votes
5answers
298 views

Find the nearest locations for multiple points

Assume that there are many holes with their locations fixed, and the same number of balls distributed randomly. What is the smallest total distance for the balls fitting into the holes on the ...
1
vote
0answers
66 views

projecting a RegionProduct into 3D space

Apparently, RegionProduct should allow you to generate convolution-generated shapes. For instance, take a 1D curve and a sphere, and the region product I would ...
1
vote
2answers
182 views

Rotating a plane about an arbitrary axis

I would like to rotate a plane by $k$ degrees about an arbitrary axis. How should I do it using RotationTransform? hmm i realise if I do the following ...
5
votes
1answer
298 views

Areas of Voronoi cells from image file

I have an binary image with non-point objects. Does anyone have any suggestions how to determine area of each Voronoi cell in Voronoi diagram (goal is area distribution)? Thank you in advance.
6
votes
1answer
320 views

Collision detection algorithm (discrete) with sweep and prune algorithm

For a more complex collision detection approach, I need an efficient (aka fast) algorithm to prune the elements by using boundary boxes. A classical algorithm is the so called sweep and prune (SAP) ...
5
votes
3answers
344 views

Triangulated Mesh from Voronoi Diagram

I want to generate a mesh (using Mathematica 10) in the following manner: Generate a Voronoi diagram, like so: and then triangulate each individual Voronoi grain, were an edge is formed by ...
3
votes
1answer
93 views

Region plot of transformed region giving odd result

I tried applying a transformation to a rectangle: RegionPlot[TransformedRegion[Rectangle[{0, 0}, {1, 1}], {#1^(1/3) + #2, 1 + #2} &]] giving In reality, ...
11
votes
3answers
707 views

Finding the surface area of a 3D convex hull

I have noted several instances here and here where ConvexHullMesh, introduced in v10 has been used to greatly simplify some geometry problems. Determining the ...
1
vote
0answers
68 views

Use of Mathematica to put equation into vector form

Is there a way to put the following equation of a line into vector form using Mathematica (or a Mathematical package)? $\displaystyle ...
7
votes
2answers
204 views

A question regarding “DiscretizeGraphics”

I want to find the volume of a torus torus = RevolutionPlot3D[{2 + Cos[t], Sin[t]}, {t, 0, 2 Pi}] ...
6
votes
3answers
222 views

Speed of ConvexHullMesh

Pick $N$ random points on the surface of the sphere, then use ConvexHullMesh[] to compute their convex hull. Empirically, this takes time quadratic time in $N,$ ...
1
vote
1answer
112 views

how to find the vector intersection in a collection of triangulated 3D points?

I'm trying to calculate the 3D point coordinates for the intersection of a vector with a plane. I have been using the following code to do this: ...
7
votes
1answer
310 views

How to draw quantum circuit with mathematica?

How to draw quantum circuit as the following one with mathematica? I only find the quantum package which is designed for MMA 7.0 as the author said. But the version of my Mathematica is 9.0 and when ...
30
votes
6answers
1k views

Finding length of intersection of two surfaces

I would like to know how we find the length of the intersection of two surfaces. For instance, in the following example,a surface intersects with a plane: How do we find the length of intersection ...
16
votes
3answers
393 views

Site - Cell Correspondence in Voronoi Diagram obtained via VoronoiMesh

Consider the following: ...
19
votes
2answers
494 views

Object separation from a 2.5D surface

I'm trying to identify the shape and the boundaries of objects. The data was generated with a laser scanner and represent the surface of an area in which many boulders lay on the ground and making up ...
4
votes
5answers
408 views

Ordering the Boundary points of a Polygon

I feel like this should be simple, but I keep running into walls. Say someone gives you the coordinates of the vertices of a pentagon and the center point of the hexagon. Is there any way to get an ...