Search Results
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 |
Questions on the application of Mathematica to geometric problems. You might also consider adding the [graphics] tag, if appropriate.
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 …
22
votes
how to get $n$ equidistributed points on the unit sphere
If more ad hoc, inexact approaches are welcome, one way to generate relatively uniform density of points on a sphere is to use Monte Carlo Lloyd's algorithm (modified for the spherical case):
With[{p …
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 …
18
votes
Plotting an epicycloid
It is easiest to use ParametricPlot and RotationTransform.
ParametricPlot[
RotationTransform[a][{1, 0}] + RotationTransform[4 a][{1/4, 0}],
{a, 0, 2 Pi}, Evaluated -> True]
Evaluated -> T …
18
votes
Find intersection of pairs of straight lines
Turning my comment into an answer per (now deleted?) comment which requested it.
This is documented to work only in Wolfram Language at this point (specifically Wolfram Programming Cloud). Interestin …
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 …
11
votes
Spacing out random walks so they don't overlap
This solution is primarily a proof of concept; its run-time complexity makes it impractical for large amounts of items. Large amount means more than six, in this case.
Nonetheless, the idea is the fo …
10
votes
how to get $n$ equidistributed points on the unit sphere
Correct me if I'm wrong... but I suppose, pedantically speaking, there are only five solutions defined by Platonic solids, and trivial solutions for 0-3 points (extension of CirclePoints).
Thus:
Cle …
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 …
6
votes
How can I plot two concentric circles with a polygon inscribed in one and circumscribed abou...
There are numerous ways to do this in Mathematica, and it's hard to say which would be most useful for learning. Here's one; a unit circle is drawn, then a polygon with no filling and black edge on ba …
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}]; …
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 …
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 …
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, …
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 …