# Questions tagged [geometry]

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

571 questions
Filter by
Sorted by
Tagged with
16k views

### How to make a Spherical Cow?

Being a theoretical physicist, I always have a great respect for Spherical Cow. So I thought about making one myself. I am not sure how can I create (something considered to be the simplest!) this ...
4k 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 ...
7k 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 ...
5k 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 ...
3k 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 ...
7k 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 <...
8k 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: ...
6k 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 ...
5k 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. ...
2k 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 ...
1k views

### Proving the hairy ball theorem using xAct

I would like to formally prove the hairy ball theorem in Mathematica, initially just for $S^2$, and then see about generalizing. An approach I thought about to use the xAct package to define $S^2$ ...
6k 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 ...
21k 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 ...
424 views

### Bug in RegionMember?

Bug introduced in 10.0 and persisting through 12.1 RegionMember is new in 10.0 A commenter notes that the issue is with ...
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 ...
453 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, ...
20k 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 ...
1k views

### Generating Doyle spiral painting

I recently came across an interesting paining by Nicola Sutcliffe: This painting is actually related to Doyle spirals. From author's website: The central part of the picture shows the Doyle ...
2k 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 ...
5k 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)? ...
4k 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: ...
13k views

### Drawing a square root spiral

Here is a start. I'm looking for a nice way to draw it. ...
6k views

### How do I draw a triangle given the lengths of the sides?

I know, of course, how to draw a triangle in the plane given the vertices: Graphics[Polygon[{{1, 0}, {0, Sqrt}, {-1, 0}}]] But I'm not sure how to simply draw ...
6k 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 ...
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 ...
1k views

### Creating sculptural forms using graphics primitives

This is a question based on this answer by halirutan. Some amazing images can be created with this code, and I was wondering whether it was possible to extend the principle to different shapes. I ...
5k 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 ...
629 views

### Spacing out random walks so they don't overlap

From an external simulation program, I have lots of particle tracks which follow random walks, all of which start at or near the origin $(0,0)$. This means that when I plot the walks in Mathematica, ...
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$ ...
3k 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 ...
340 views

### The fastest thing since sliced cubes?

I've fallen down a rabbit hole recently, and need a reality check. Suppose you have an arbitrary unit vector, $u \in \mathbf{R}^3$, and you cut up the unit cube into slices orthogonal to $u$ with ...
8k 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 ...
1k 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. ...
4k 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 ...
1k 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 ...
2k 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 ...
1k views

### Pentagonal spiral in Mathematica

I would like to plot an image of what I call a pentagonal spiral with Mathematica. A sample image of what I'd like to obtain is this (sorry for low-quality): My initial idea was to get some kind of ...
4k views

### Fitting ellipse to 5 given points on the plane

Five points are required to define a unique ellipse. An ellipse has five degrees of freedom: the $x$ and $y$ coordinates of each focus, and the sum of the distance from each focus to a point on the ...
6k 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 ...
2k views

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 ...
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 ...
1k views

### Solve a trig equation system

Background of the problem In the same plane, P is a fixed point, A,B,C are moving point, PA=a, PB=b, PC=c, find the maximize perimeter of △ABC. let ∠BPC=A, ∠CPA=B, ∠APB=2*Pi-A-B, then the perimeter ...
1k 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 ...