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
3 votes
2 answers
172 views

Intersection point of two lines given starting points and ending points of both lines

I'm creating a program which requires me to get intersection point of two lines. I have tried using different formulas but none of them works perfectly for me. Following is one example which I found ...
4 votes
3 answers
299 views

Unify Polyhedrons into a single Polyhedron

Consider these two simple Polyhedrons which share a sub-face: ...
2 votes
3 answers
386 views

Shortcut of finding a tangent line and tangent point to a curve that's explicitly or implicitly defined

Any shortcut command of finding a tangent line and tangent point to a curve that's explicitly or implicitly defined? The focus is on implicit curves. An implicit curve could be sth like $(x/exp(y)-1)^...
2 votes
2 answers
327 views

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

The two fixed circle equations given are known to be: x^2 + y^2 == 1 (x - 3)^2 + (y - 4)^2 == 16 By calculating that they have three common tangents ...
3 votes
1 answer
104 views

Nearest neighbor graph corresponding to 3d sphere packing

I had used ...
0 votes
2 answers
168 views

Finding the acute angle between two arbitrary lines

Given two arbitrary lines using primitives such as Line[{p1, p2}] in the plane, how can the acute angle between them be computed? ...
3 votes
1 answer
73 views

Detecting lines in a 3D dataset

Premise I have a 3D dataset of a system responding to different frequencies https://pastebin.com/9MyQ6S74 (x: imposed frequency (f1) y: response frequency z: response amplitude) I know that the system ...
5 votes
2 answers
224 views

RegionMember Bug in 12.2?

Bug introduced in 12.2.0 or earlier. Fixed in 13.0.0 or earlier. There appears to be an issue with RegionMember in Mathematica 12.2 when it comes to simple polygons and points. ...
8 votes
5 answers
832 views

Create a regular polygon with n vertices given two points

I want to create a regular polygon from the initial two points $A$, $B$ and number of vertices $n$, regularPolygon[{0, 0}, {1, 0}, 3] gives ...
3 votes
2 answers
148 views

Is there a buit-in way to get a surface patch of a sphere for Graphics3D?

Mathematica 12.0 for Windows. Is there a buit-in way to get a surface patch of a sphere for Graphics3D? In this Graphics3D output, the sphere is only there for backing, and I only need (and want) part ...
6 votes
3 answers
221 views

Annular cylinder with varying dimensions

Consider a figure looking like the annular cylinder, with the longitudinal size extended from $z = 1$ to $z = 10$, but with the transverse boundaries depending on the distance from the origin $z$: the ...
1 vote
1 answer
88 views

The different solution compare to the book solution?

On a book I found an integral with its solution I'm trying to solve it as well in Mathematica 13.2.0 but They are very different?!!!! If anyone can help it out!(integral : Sqrt[(3 x)/(x + 2 d)] d/(x -...
3 votes
0 answers
112 views

Obtain a graph from a set of vertices

I have been looking into constructing a polyhedron from the coordinates of its vertices as discussed in the question linked below. Construct a polyhedron from the coordinates of its vertices and ...
2 votes
0 answers
34 views

Generalise ImageLines to Image3DPlanes?

Context I am interested in detecting (multiple) planes in a cube. Test case Let me first define a test case: ...
5 votes
2 answers
222 views

Why the difference in GeometricScenes?

Studying a new GeometricScene command, I try ...
1 vote
1 answer
112 views

Define a function on a MeshRegion

This looks like a simple question with the answer to be easily found, but unfortunately I could not find it either on the web or in the documentation browser. Let us assume we have a MeshRegion ...
7 votes
4 answers
288 views

Numerically determining the minimum/maximum distance between two ellipses

The smaller ellipse is contained within the larger one. By 'minimum distance', I mean the distance that minimises; Sqrt[(y1 - y2)^2 + (x1 - x2)^2] By maximum, I ...
2 votes
2 answers
200 views

Region between finite lines or extracting a finite tesselation

EDIT2 the answers here (How to compute intersections of circles on a lattice) seem like they could help or solve the problem. EDIT: I saw this question about finding regions between lines before I ...
5 votes
2 answers
172 views

Strange behaviour in GeometricTransformation

Bug introduced in 13.0 **Bug is fixed in Version 13.1 ** I came across the following strange behaviour with the GeometricTransformation function. ...
-1 votes
1 answer
206 views

Tangents of 2 circles [duplicate]

I am trying to write a function, tanCircles[], that finds the common tangents to two given circles (one not inside the other). The function's parameters are two list, each containing the x and y ...
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 ...
2 votes
1 answer
89 views

Inaccuracy in triangles computation

The below link on MSE was a question assuming a second solution was obtained on Mathematica by second method. Appears to be a question of accuracy. Big Side of Triangle Given are three side lengths $ (...
2 votes
2 answers
390 views

I need to find the obtuse angle between the following two lines

I need to find the obtuse angle between two lines but I am not sure how to code it. my two angles are 𝑥+√3𝑦=1 and (1−√3)𝑥+(1+√3)𝑦=8 I already did the calculations but im just not sure how ...
5 votes
2 answers
528 views

How could I generate random convex polygons of area 1?

How could you random convex polygons where the points of the graph $A(x_1,y_1) , B(x_2,y_2), ... $ come out, hopefully in rational format (a/b) in such a way that the total area of ​​the polygon is ...
1 vote
2 answers
112 views

How to randomly insert a region inside another region like RandomPoint?

With RandomPoint one can find a random point inside of a region. I would like to instead obtain a region randomly placed inside another region. One possibility ...
3 votes
2 answers
264 views

Confusion surrounding Mesh for a complicated function

I have two different setting with the command Mesh, one is at All and the other one is at 2000. I just don't have the math to understand what I am seeing. ...
3 votes
3 answers
422 views

How to find the angle of a rotation matrix

I know there is post about finding angles of rotation matrix, but all of them required more than a rotation matrix, I want to know that If I have a matrix ...
1 vote
0 answers
64 views

How to get the closest point from the known point to a fractal tree?

Given a known point, how to analytically find the nearest point from the point to the fractal tree? The fractal tree code: ...
2 votes
1 answer
91 views

How to create a line with a label centered above it?

Can anyone help me create a line with a label shown in the picture below? The line is discontinuous near the middle to accomodate the label. The label is placed on top to avoid the problem when the ...
7 votes
3 answers
517 views

Track chord movement

The point $P$ on the circle and the point $F$ inside the circle, perpendicular bisector of line $PF$ intersects the circle at two points $A, B$, the envelope of $AB$ is an ellipse. I use the following ...
2 votes
0 answers
46 views

How to make an efficient SimplyConnectedQ (check for abscence of holes)?

I would like to find an efficient way to detect whether a region has a hole regardless of how many it has. This question (Separate boundaries of multiply connected region) shows some methods but it ...
3 votes
1 answer
254 views

Enlarge polygon by fixed edge distance [duplicate]

I wish to create a larger polygon from a smaller one through orthogonally translating each edge by a fixed distance. RegionResize with a bounding box given by ...
1 vote
1 answer
62 views

Circumference of an ImplicitRegion

I define an ellipse by using an ImplicitRegion: R = ImplicitRegion[4 z^2 + r^2 == 10, {z, r}] I would like to get the perimeter of this ellipse. I was hoping to ...
5 votes
1 answer
187 views

Sort symbols or characters by image complexity

As an example, I would like to sort the following characters by some sort of complexity measure: ...
1 vote
1 answer
71 views

Calculate the area using parametric plot

i would like to ask a question if we have some parametric plot and it will be a shape, can we use "area" function to calculate that shape? Here is the simple program ...
0 votes
1 answer
73 views

Region Plot using Point data [closed]

so far I use a listplot to create a geometry from a data point. to use the are feature, it requires using the region. anyone know how to make a geometry from point data using region plot? ...
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)? ...
6 votes
5 answers
2k views

Distance between two line segments in 3-space

I need to compute the distance between two line segments in a project. After googling, I found this algorithm and used it to implement a Mathematica version: ...
4 votes
1 answer
158 views

Fill in color for transparent area in 3D plot

I have a lattice of large spheres: ...
5 votes
1 answer
394 views

Obtaining the curve parallel to the function a/(x^2+b)

I would like to obtain a curve that is parallel to the function: y(x) = -a/(x^2 + b) I have tried to calculate the said curve by solving parametric equations, but ...
2 votes
0 answers
175 views

How to convert a lat long Earth position at a given time to J2000 inertial coordinate system coordinates

Given a Date object (i.e. a moment in time) and an Earth relative position (lat long and altitude), how does one derive the position expressed in J2000 celestial inertial coordinates? Thanks! Kerry ...
2 votes
4 answers
225 views

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

I have a list of points pts that fluctuate around some mean line. pts is pre-sorted by the projection of the points onto this ...
3 votes
2 answers
167 views

Plotting a $3$-dimensional convex shape consisting of portions of six spheres

How can we plot a convex shape $C$ in the $3$-dimensional Euclidean space, whose boundary $\partial C$ is formed by portions of six different spheres, one portion per sphere? The radius of each sphere ...
-1 votes
1 answer
147 views

Distance of a point from a line using multiplicative distance [closed]

How can we determine the multiplicative distance (http://link.springer.com/article/10.1007/s10115-014-0813-4#page-1) of a point (x0,y0) from a line (ax+by+c=0)? Let X = (x_1, x_2 ..., x_m) be a ...
0 votes
1 answer
82 views

Graphing and calculating the volume using mathematica (or other)

I posted the following in MSE: (See Here) Consider two cylinders Cs (solid) and Ch (hollow): Cylinder Cs has a radius rs, and has the points (x1,y1,z1) and (x2,y2,z2) as the centers of its bases. ...
3 votes
5 answers
998 views

Calculating length of curve based on data points?

I had around $1000$ data points $(x,y,z)$ and when I plot them they seem to lie on a closed curve. I carefully checked the data points and the points do not repeat rather they are somewhat close to ...
2 votes
2 answers
394 views

How can I make points equally spaced along any line?

What I am looking for is something like the output of this code: ...
1 vote
4 answers
266 views

A square with different centers and sides of different lengths

As you can see the bottom square is in the ${((0,2),(0,2))}$ range The center of the square is indeterminate The length of a square is indeterminate The length of the square is indeterminate, and $1/...
6 votes
2 answers
211 views

Systematically generate Corner and Centered polygonal diagrams?

A polygonal number is a number represented as dots or pebbles arranged in the shape of a regular polygon. Namely, it is "a type of figurate number which is a generalization of triangular, square, ...
4 votes
2 answers
188 views

How to calculate different combinations of back and dotted perimeter

I have this code that generates the image below, my question is how to calculate the area and perimeter of the first figure and all the variations of it considering a side of square "L" or ...

1 2
3
4 5
18