Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 3056

Questions on the application of Mathematica to geometric problems. You might also consider adding the [graphics] tag, if appropriate.

3 votes

A simpler or more concise way to divide the boundary of a polygon into equal arc lengths?

My primary tool is Interpolation: With[{poly = RandomPolygon[10], n = 50}, With[{len = ArcLength@RegionBoundary@poly}, (* Get a sequence of line segments. *) Partition[MeshPrimitives[poly, 2] …
kirma's user avatar
  • 19.1k
4 votes

How do you calculate all the common tangents given two fixed circles and draw an image?

This solution is a little bit... elaborate for the task, but shows how one can use GeometricTest to find solutions using synthetic geometry tools: With[ {c1 = {0, 0}, r1 = 1, c2 = {3, 4}, r2 = 4, …
kirma's user avatar
  • 19.1k
1 vote
Accepted

Region between finite lines or extracting a finite tesselation

I'm not entirely sure if your problem is fully defined, but here's one approach to start with, discretizing boundaries of finite components and showing them. CylindricalDecomposition is not limited to …
kirma's user avatar
  • 19.1k
2 votes

Counting number of points in fluctuating lines that fall within a circle

EDIT: I've updated the answer to use BinCounts, which suits this problem in multiple ways. Most of the old description below applies to this solution, but here the counts for intervals between (square …
kirma's user avatar
  • 19.1k
23 votes
Accepted

Divide a geometric region by (many) lines

You can find symbolic connected components (which are those regions you are asking about) in this case using CylindricalDecomposition. This can be a bit of an overkill if your goal is only to visualiz …
kirma's user avatar
  • 19.1k
5 votes

How to generate approximately equally spaced points efficiently

Since Mma v12.2 spatial point processes have opened yet another possibility with HardcorePointProcess, which prevents processes from resulting points being pairwise closer than a specified distance fr …
kirma's user avatar
  • 19.1k
3 votes
Accepted

How to use Mathematica to plot an ellipse given foci and semimajor axis?

You can find a geometric solution to this problem by using an implicit region definition directly based on the definition of an ellipse: sum of distances from foci equals twice the semimajor axis. Wi …
kirma's user avatar
  • 19.1k
3 votes
1 answer
210 views

Performing queries on mesh structure in a clean way

I have the following problem, which can be stated geometrically as follows: List all pairs of vertex coordinates in a mesh region of measure 2 (a surface consisting of triangles) where these points a …
kirma's user avatar
  • 19.1k
5 votes

Circle-Line intersection

Assuming I understood your question correctly (there's really no need to use Module), here's one method which delegates calculating intersections to Solve: ClearAll@circleChord; circleChord[{xc_, yc …
kirma's user avatar
  • 19.1k
22 votes

How to generate approximately equally spaced points efficiently

Many solutions similar to how to get $n$ equidistributed points on the unit sphere are possible, especially if one can accept that points are not on the edges of a region. For instance, one can use an …
kirma's user avatar
  • 19.1k
8 votes

how to get $n$ equidistributed points on the unit sphere

Mathematica 11.1 has a built-in function for this task: SpherePoints. This roughly corresponds CirclePoints for three-dimensional case; thus I wouldn't rely on it to get any sort of randomness on the …
kirma's user avatar
  • 19.1k
13 votes
Accepted

How can I find least squares intersection of 3D rays?

EDIT: As @nikie noted, using FindArgMin (a variant of FindMinimum) instead of (N)ArgMin can improve the speed of finding a solution. Since in the case of this problem only one minimum exists, this sho …
kirma's user avatar
  • 19.1k
3 votes

How to fit the curve that this lines made? The length of lines are all fixed

Based on your image, but not your statement on lengths of lines: With[{eqn = a - a x / (1 - a)}, Show[ Quiet@Plot[Table[eqn, {a, 0, 1, 1 / 20}], {x, 0, 1}, Evaluated -> True, AspectRatio -> Aut …
kirma's user avatar
  • 19.1k
2 votes

Intersection coordinates of two spheres

If you want to simply sample the intersection, you can do this: RandomPoint[ ImplicitRegion[ RegionMember[ RegionIntersection[Sphere[{0, 0, 0}, 1], Sphere[{1, 1, 1}, 1.5]], {x, y, …
kirma's user avatar
  • 19.1k
5 votes

Inflate and unite a list of 0D to 2D regions

Somewhat dumb method (for instance, every line has both two Disks and a StadiumShape overlapping), but it's not at least very complicated: hulls0 = ConvexHullMesh /@ RandomReal[{-10, 10}, {3, 1, 2}]; …
kirma's user avatar
  • 19.1k

15 30 50 per page