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.
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 …
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}]; …
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 …
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 …
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 …
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 …
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 …
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 …
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 …
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 …
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 …
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 …
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 …
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, …
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, …