Skip to main content

Questions tagged [geometry]

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

Filter by
Sorted by
Tagged with
32 votes
4 answers
26k views

Finding unit tangent, normal, and binormal vectors for a given r(t)

For my Calc III class, I need to find $T(t), N(t)$, and $B(t)$ for $t=1, 2$, and $-1$, given $r(t)=\{t,t^2,t^3\}$. I've got Mathematica, but I've never used it before and I'm not sure how to coerce ...
a98's user avatar
  • 423
59 votes
6 answers
7k views

Generating evenly spaced points on a curve

In the KnotData package a simple command such as points = Table[KnotData[{3, 1}, "SpaceCurve"][t], {t, 0, 2 Pi, 0.1}]; will ...
scallionpancake's user avatar
55 votes
8 answers
9k views

How to plot ternary density plots?

How can I get a ternary density plot just like the plots from OriginLab? ContourPlot and DensityPlot seemingly can accept the <...
Scott Wang's user avatar
49 votes
7 answers
10k views

Intersecting graphics

Does the Mathematica graphics system have any concept of intersecting graphics? I've not found much in the documents so far. For example, if I want to show the intersection of two shapes: ...
cormullion's user avatar
  • 24.3k
73 votes
4 answers
6k 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 ...
user avatar
27 votes
3 answers
3k views

Uniformly distributed n-dimensional probability vectors over a simplex

What's the right way to generate a random probability vector $p={p_1,\ldots,p_n} \in {(0,1)}^n$ where $\sum_i p_i=1$, uniformly distributed over the $(n-1)$-dimensional simplex? What I have is ...
Schiphol's user avatar
  • 375
28 votes
6 answers
23k views

How to determine the center and radius of a circle given some points in 3D?

I was wondering if anyone could give me a hand with this problem I have. I have six points on a plane, and I am trying to determine if they form a circle or not. I know that any three points in 2D ...
RedPotatoe's user avatar
28 votes
3 answers
3k views

How to simulate the true reflective movement of a particle bouncing around in an ellipse?

Please help me to simulate the movement of a particle inside a region with elliptical walls such that particle is reflected from the walls and continues to move. A friend was able write code to ...
Spizhen's user avatar
  • 283
25 votes
7 answers
5k views

Find intersection of pairs of straight lines

I have a list of 24 points, in which two consecutive points (1st and 2nd, 3rd and 4th, …) are supposed to form a line: ...
seismatica's user avatar
  • 5,101
42 votes
6 answers
7k views

2D random walk within a bounded area

I want to simulate a random walk in two dimensions within a bounded area, such as a square or a circle. I am thinking of using an If statement to define a boundary. ...
MOON's user avatar
  • 3,864
21 votes
1 answer
2k views

How do I create a triangulated surface from points?

I have a set of points in a nx3 matrix and I would like to convert them into a surface, so that I may calculate its surface area. The function ListSurfacePlot3D creates the surface how I want it. ...
Symphos's user avatar
  • 215
63 votes
4 answers
11k views

Create a torus with a hexagonal mesh for 3D-printing

I am new to Mathematica, and I'm looking for a way to create patterns on the surface of 3D objects. One thing I have not been able to do is to create a hexagonal mesh on a torus. What I would like to ...
Manna's user avatar
  • 631
28 votes
12 answers
8k views

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

We can get $n$ equidistributed points in the unit circle using CirclePoints. But how do you get $n$ equidistributed points on the unit sphere(surface of a ball)? ...
yode's user avatar
  • 26.8k
19 votes
2 answers
3k views

Rebuild a polygon so it doesn't self intersect [duplicate]

If you consider the following Polygon: ...
Öskå's user avatar
  • 8,587
55 votes
2 answers
4k views

Numerically solving Helmholtz equation in 3D for arbitrary shapes

Context While studying manifold Learning I got interested in finding the eigenvectors of the Laplacian. (also in connection to this problem of solving the heat equation) Following this and that ...
chris's user avatar
  • 23k
26 votes
4 answers
7k views

How do I calculate the area of a polygon given its coordinates?

I have a polygon: Polygon[{{0, 200 }, {200, 100}, {500, 300}, {100, 700}}] How can I figure out its area? The docs page does not have any example. So far I've ...
d.k's user avatar
  • 485
20 votes
5 answers
10k views

How to draw a great circle on a sphere?

I apologize for the text description, but new users are not allowed to post images. I want to draw a circle that cuts through the center of a sphere and has an inclination of 15 degrees with the ...
Tesseract's user avatar
  • 209
43 votes
4 answers
8k views

How to create this four-dimensional cube animation?

This is a tesseract, a four-dimensional cube, which contains two cubes. Here, each side length of the smaller one is 1, while the side length of the bigger one is 2. How do make I it? I am still ...
withparadox2's user avatar
  • 2,481
39 votes
6 answers
3k 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 ...
Bryan Shih's user avatar
22 votes
2 answers
4k views

How do I split up a curve into chords of equal length?

I have a curve that is defined as f[x] and what I'm attempting to do is to divide the curve into equal straight lengths for a number of segments of my choosing that I've defined as nSeg. I've created ...
ASBO Allstar's user avatar
  • 1,106
20 votes
6 answers
8k views

Axis/Angle from rotation matrix

With r = RotationMatrix[a, {x, y, z}] I can compute a 3D rotation matrix from its axis/angle representation. Given a 3D rotation matrix ...
Danvil's user avatar
  • 1,505
15 votes
3 answers
2k views

Make an offset curve (parallel curve)

I have a polynomial curve that I got through interpolation. ...
LCarvalho's user avatar
  • 9,233
14 votes
6 answers
7k views

How to find lattice points on a line segment?

How do I find points on the line segment joining {-4, 11} and {16, -1} whose coordinates are positive integers?
Saket Kumar's user avatar
20 votes
5 answers
5k views

Plotting an epicycloid

I am fairly new to Mathematica, and I cannot figure out how to plot an epicycloid. I have plotted some neat looking things in my attempts, but I still can't make one. I am not looking to make an ...
btalbot's user avatar
  • 311
13 votes
5 answers
2k views

Construct a polyhedron from the coordinates of its vertices and calculate the area of each face

I have the 3D coordinates for a set of points. I want to construct the convex polyhedron with those points as vertices. I know I can use functions like DelaunayMesh ...
Dennis's user avatar
  • 437
9 votes
2 answers
2k views

Plotting the sum of two points on an elliptic curve

I am doing an experiment to prove the associativity of the addition of points on an elliptic curve. So far, I have produced a code which allows me to move points on my curve. To find their sum, I ...
Michael Freimann's user avatar
6 votes
3 answers
624 views

Assumptions for RotationMatrix

I'm making C++ program, and in my program I need a rotation matrix around any vector. I wanted to extract RotationMatrix[fi,{x,y,z}] output and put it in my program....
user avatar
4 votes
2 answers
571 views

generating randomly oriented non-intersecting cylinders

I could not find anything relevant with "googling" (only this) I can create a set of randomly oriented cylinders (code found here) ...
Dimitris's user avatar
  • 4,794
2 votes
2 answers
1k views

Finding the volume enclosed by two surfaces of revolution

I've come this far as to combine both functions in a graph: f = Plot[4 - x^2, {x, -10, 10}] g = Plot[-1 + 4 x, {x, -10, 10}] Show[g, f, PlotRange -> All] ...
BlkPengu's user avatar
  • 123
27 votes
5 answers
2k views

Plot a partition of the sphere given vertices of polygons

I saw in this question that Mathematica can draw spherical triangles. I guess something similar can be done to plot a spherical polygon. I am interested in something similar: I have a set of points ...
Beni Bogosel's user avatar
20 votes
3 answers
2k views

Approximating an ornamental curve

How do I go about approximating this ornamental curve? Note variable thickness typical in calligraphy. Handbook and Atlas of Curves by E.V. Shikin (1995) contains many directions, including curve ...
alancalvitti's user avatar
  • 15.1k
20 votes
5 answers
1k views

Divide a geometric region by (many) lines

Given a shape (e.g., a rectangle, a circle, etc.), how to divide it by $n$ randomly chosen lines. It is trivial to plot those lines (see figure below), using code like ...
Taozi's user avatar
  • 519
17 votes
6 answers
2k views

Mathematica for teaching orthographic projection

Edit: All the four answers to this question are great, and if you're interested, you should take a look at all the answers. Nevertheless, belisarius' code was accepted since it was closest to what I ...
Vincent Tjeng's user avatar
17 votes
3 answers
2k views

How to convert a surface into a solid

Context I am interested in converting surfaces into solids (so I can make a 3D mesh out of them using ToElementMesh) Say I have the following cool surface ...
chris's user avatar
  • 23k
15 votes
6 answers
910 views

How to separate the regions enclosed by curves

There are three arbitrary curves that defined by three implicit functions. How to separate the 12 regions(one of them is the outside infinite region) Although we can use image methods to distinguish ...
herbertfederer's user avatar
11 votes
3 answers
1k views

How to generate 3D spherical sector

I looked but haven't found an answer to this one: I'd like to create a region that represents a sector of a ball, bounded between radii $r_1$ and $r_2$, polar angles $\theta_1$ and $\theta_2$, and ...
Pirx's user avatar
  • 4,139
8 votes
1 answer
438 views

Unexpected behavior of GeometricTransformation

Bug introduced in 8.0 or earlier and persisting through 13.2 or later. Fixed in 13.3.1 on Windows 10 I have the following mapping on the complex plane: $$ z \mapsto \tau \mu z-1, $$ where $\mu$ is ...
faleichik's user avatar
  • 12.7k
8 votes
3 answers
936 views

Finding volume of a segment

I'm still pretty new to Mathematica, so I would like to seek advice regarding a geometrical problem. I am currently trying to define that as an extra condition in the Mathematica code below. ...
Corse's user avatar
  • 459
7 votes
2 answers
2k views

Triangle mapped on a sphere in $\mathbb R^3$?

How can I map a triangle on a sphere? I want to visualize (plot or animate) it for my student in Non-Euclidean geometry. I have no restrictions on the triangle's kind or on the sphere in $\mathbb R^3$....
Mikasa's user avatar
  • 211
3 votes
2 answers
284 views

How to get a perpendicular segment inside of a triangle

I created a graphic to obtain a triangle with three vertices. The code is as follows: ...
LCarvalho's user avatar
  • 9,233
36 votes
4 answers
7k views

Why is raytracing so slow?

I'm trying to get some rays to bounce in a circle. But I want to be able to control the reflections, i.e. the direction the rays bounce in the circle. I have a MWE below, and it is severely limited by ...
Tomi's user avatar
  • 4,376
30 votes
2 answers
3k views

How can I pack circles of different sizes into a spiral?

Given a list of circles of different areas, I need to arrange them tangentially in order of increasing area and spiraling outward. An example of the type of packing I'm attempting is shown by the ...
M.R.'s user avatar
  • 31.5k
25 votes
6 answers
15k views

Drawing a square root spiral

Here is a start. I'm looking for a nice way to draw it. ...
matrix42's user avatar
  • 6,996
23 votes
7 answers
6k views

Distance between point and line segments

How would you determine the shortest distance between a point and one or more segments? For example, what is the shortest distance between the point and the two segments below? Clearly the point is ...
sjdh's user avatar
  • 7,757
22 votes
5 answers
2k views

Transform sphere to an ellipse in $\mathbb{R}^2$

In Lay's Linear Algebra and Its Applications textbook, he defines the matrix $$A=\begin{bmatrix} 4 & 11 & 14\\8 & 7 & -2 \end{bmatrix}$$ and claims that the transformation $T(x)=A x$ ...
David's user avatar
  • 14.9k
18 votes
2 answers
1k views

How to roll a graph on the y-axis

I want to roll the function f(x)=sqrt(x), x∈[0,1] along the y-axis. I know how to rotate the graph around a point, but I'm not sure how to rotate along an axis in 2D. Rotating around a point e.g. (0,...
LLCJ's user avatar
  • 382
17 votes
5 answers
5k views

How to generate approximately equally spaced points efficiently

I don't very content with current method.So a better solution is expected still.I hope it meet two conditions in following. That space is approximately equivalence. We can control how many points to ...
yode's user avatar
  • 26.8k
17 votes
5 answers
702 views

Is there a numerical method/built-in to calculate the boundary of a set of graphs?

Recently, I encounted a geometry problem in my work. For a curve-family that owns the following parametric equation: $$E(t,\theta)= \begin{pmatrix} x_E(t,\theta) \\ y_E(t,\theta) \end{pmatrix}$$ ...
xyz's user avatar
  • 625
16 votes
9 answers
4k views

To inscribe a circle in a given triangle

I am trying to to inscribe a circle in a given triangle but it isn't working. I've used GeoGebra with this construction and worked but as I'm new to Mathematica, I am missing something. It can't be so ...
Luiz Meier's user avatar
16 votes
3 answers
1k views

How to manipulate a circle in GeoGebra style?

I want to emulate the GeoGebra app. I want to get an effect like this in Mathematica. I don't know how to move whole circle without changing the radius of the circle. My sample code: ...
matrix42's user avatar
  • 6,996

1
2 3 4 5