Questions tagged [geometry]

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

1
vote
2answers
104 views

Finding the radius of a circle given that it is tangent to both axes and contains (10, 9)

A circle is tangent to both axes in the 1st quadrant of the xy-plane. If the point (10, 9) is on the circle, what is the circle radius?
0
votes
1answer
51 views

Analytic geometry - triangle [closed]

I have three points: A[1, 2]; B[3, 5] and C[5, 7] I have some random points, like this: E [4, 4] etc. I need to check if these random point are a part of the ABC triangle, or not.
1
vote
1answer
111 views

Unfolding a polyhedron

I wanted to know how unfolding a Polyhedron in Mathematica works. I can't seem to make it work even when I have all the coordinates I need. The Polyhedron of reference is ...
3
votes
1answer
103 views

Area of Generalized Koch Snowflake

I asked on the Math Stack Exchange here how I could find the area of a "generalized Koch snowflake". An $n$th generalized Koch snowflake, in my case, is formed almost the same as the Koch snowflake - ...
3
votes
1answer
90 views

Minimum path on a rectangular prism

First of all, this is a fun question that I have seen from here. We have a rectangular prism with dimension $30\times12\times12$ cubic inches. Assume that there is an ant at the blue point 1 inch ...
6
votes
3answers
334 views

How to do this Padovan spiral using Mathematica?

how to do this unusual pendovan spriral? can anyone help me ?
1
vote
1answer
111 views

Numerical simulation for density of strings in a ball

I am trying to numerically reproduce the Mathematica result for the density of strings in a sphere as explained here. The program is to generate random, uniformly distributed pair points on a unit ...
1
vote
0answers
26 views

RegionDifference not working with one Cuboid and large number of embedded cylinders

I am trying to create a Cuboid with embedded hollow cylindrical regions. It seems to work fine when I use a relatively small number of cylinders (about 20) but does not work when I use a large number ...
0
votes
0answers
52 views

Find two points (of maximum distance) lying on perpendicular intersecting polygon border

On a randomly generated convex hull, I found the two points of maximum distance on the region's perimeter (the points in black). I would like to find two points that lie on the perpendicular to this ...
0
votes
3answers
53 views

Checking whether the line is parallel to the plane

I have tried to write a code to check whether a line is parallel to the plane in Mathematica. Using that a plane has the normal vector of $\vec{n}=(a,b,c)$ and a line has a direction vector $\vec{L}=(...
0
votes
0answers
29 views

Table with two functions to output matrix with values

So I have a wing modeled as an .STL and I am analyzing its structure so I need its cross sectional area and moment of inertia at points along its span. I do this by moving an infinite plane across the ...
2
votes
0answers
29 views

How to generate a list of values related to calculating angles of a polygon? (One solution already created) [duplicate]

I want to generate this exact list I have this code and it works perfectly however I want to do it in a different way without using these functions, can someone please help me do this? ...
11
votes
1answer
167 views

Plotting cities with Callout labels on a globe?

This question essentially amounts to implementing a very basic version of GeoGraphics3D: ...
2
votes
1answer
131 views

Creating 2d-HexagonalLattice and 3d-HexagonalClosePacking lattice with LatticeData function

I found here a solution by s0rce on how one can for example create a 3d FaceCenteredCubic lattice structure: ...
0
votes
1answer
102 views

Derive a polygon from the midpoints of the sides of a given polygon [closed]

Write a function that creates a new figure (a new broken line) out of a given broken line. It would take as parameter a list of (max) 20 points representing the closed broken line. The output must be ...
0
votes
0answers
18 views

How to find a,b, and R for the given circle [duplicate]

Given the three points (x1,y1), (x2,y2),(x3,y3) find a,b,and R for the circle (x-a)^2 +(y - b)^2 =R that passes through them. Notice that the solutions have the same denominator or its square. What ...
12
votes
1answer
275 views

Packing arbitrary shapes

I'm looking for a general method of packing any set of 2D glyphs. For example, say I had 30 randomly transformed english characters: ...
1
vote
1answer
67 views

From Free-Form linguistic input to function expression to calculate spheroid surface

I need to calculate the surface area of an oblate spheroid. My first step is to get the surface equation from Free-Form input. But I have trouble converting to a WM function and replace the focus ...
1
vote
2answers
84 views

Trouble with Calculating Area of Parametric Region

This question stems from an attempt to solve the following question: How to calculate specific area on surface of sphere? First, I parametrize a circular loop: ...
4
votes
0answers
58 views

How to calculate specific area on surface of sphere?

I am trying to calculate the solid angle subtended by arbitrary-shaped loops on a sphere's surface. First, I parametrize circular loops by: $$\theta(t,k_{x0},r) = k_{x_0} + r \cos(t);$$ $$\phi(t,k_{...
1
vote
2answers
100 views

How to calculate arbitrary area on surface of sphere?

I am trying to calculate the solid angle subtended by arbitrary-shaped loops on a sphere's surface. First, I parametrize circular loops by: $$\theta(t,k_{x0},r) = k_{x_0} + r \cos(t);$$ $$\phi(t,k_{...
1
vote
0answers
51 views

Create a Weighted Region

I am trying the make (not super accurate, just for fun really) simulations of light curves, as just circles with various sizes and temperatures, then computing the ...
1
vote
2answers
67 views

How can I make an arrow's shaft more visible?

{Graphics[{Arrowheads[.1], Arrow[{{0, 0}, {2, 1}}]}], Graphics[{Arrowheads[.1], Arrow[BezierCurve[{{0, 0}, {1, 1}, {2, 0}}]]}]} say I have the above code. Can I ...
0
votes
1answer
65 views

Make Arrows Smaller

I have the following program that describes a 3D curve in space with an osculating circle and TNB vectors moving with the curve. The arrows indicating the TNB vectors are way too large making it seem ...
2
votes
1answer
67 views

Perpendicular chord lengths from the boundary points of an arbitary 2D shape

Let's generate an arbitrary convex domain with smooth boundaries: Graphics[BSplineCurve[{{1, 4}, {5, 3}, {9, 4}, {5, 5}, {8, 7}}, SplineClosed -> True]] I'...
8
votes
3answers
532 views

Find bounding box of arbitrary 3d graphics?

What's the best workaround for this limitation: RegionBounds[ BoundaryDiscretizeGraphics[Graphics3D[{Cone[], Cuboid[]}]]]
3
votes
0answers
78 views

How to implement projective geometry in MMA?

I'd like to implement 2D projective geometry in Mathematica, making use of the FindEquationalProof command. Up to Wiki ru.wikipedia.org (This topic is better ...
0
votes
1answer
79 views

How can I make a convex catenoid (minimum surface of revolution that closes on -1 and 1? [closed]

In Wolfram MathWorld I see the catenoid (minimum surface of revolution which is concave and open ended, but I want the one where the sides are convex and close on the long axis (say z) at -1 and 1. I ...
2
votes
1answer
73 views

How to use Normal to recover translated points [duplicate]

I'm working through a coding exercise to program a matrix of Lissajour Curves in Mathematica but have encountered an obstacle when trying to recover the translated ...
12
votes
2answers
175 views

How to Interpolate a 3D MeshRegion?

If you were given some discrete MeshRegion called r (you don't know R): ...
2
votes
1answer
88 views

Plotting 2-dimensional polytopes embedded in n-dimensional Euclidean spaces

My minimal working example is Graphics3D[Polygon[{{0, 0, 2}, {0, 3, 4}, {0, -1, 2}}]] How can I plot the polygon I have listed above on a 2-dimensional plane (...
1
vote
2answers
98 views

The easiest way to get centroids of triangles tiling sphere

I need to tile a unit sphere with N equal equilateral spherical triangles and get an array of the coordinates {Phi, Theta} of the centroids of those triangles. What is the most straightforward way to ...
3
votes
1answer
89 views

How to find the cells of a region that intersect a line?

I'm looking for the fastest way to access the mesh cell (i.e. polygon) in a Region that intersects a Line in 3D. For example, <...
1
vote
1answer
63 views

Why does trying to plot the solution to this system of ODEs this way lead to errors?

I would like to plot the curve $\alpha(s) = (l(s), h(s))$, where $l$ and $h$ are the solutions to the system $l'^2 + h'^2 = 1$ and $l'h''-l''h'=h'\tan(l)$. Here's what I tried: ...
2
votes
4answers
150 views

Subdivision of a line into n intervals of linearly changing length

This question is separate, but connected to my previous question on this site, that can be found here. Let's say that we have a line of length X (in this case X=5), defined by a list ...
2
votes
6answers
913 views

Another way to write equation of the line passing through two points? [closed]

I am trying to write equation of the line passing through two points pA={1, -3} and pB={-33, -1} in the form ...
3
votes
0answers
116 views

Finding triangles where the coordinates of vertices, centroid, orthocenter and circumcenter are all integers

I am trying to find all triangles that satisfy the following conditions: Each vertex {x, y} is a pair of integers such that -20 <= x, y <= 20. The ...
3
votes
1answer
73 views

Given two lines find the four circles that have the lines as tangents

Given two lines, each defined by two points, and a radius find the four circles that have the lines as tangents. I give my attempt below but there ought to be a nice mathematica way of doing this. <...
3
votes
1answer
60 views

RegionCentroid issue

This example shows an unexpected result from RegionCentroid: ...
5
votes
3answers
319 views

Calculating curvature of a contour

I have an equation of a scalar field in the form $$f(x, y) = x^2 + y^2 + xy + c$$ I want to find the curvature of the contour of the curve at $f_c = f(0.5, 0.5)$. So I need to calculate the ...
3
votes
2answers
173 views

Having trouble visualizing a polygon on a sphere

I'm trying to generate a spherical polygon on a unit-sphere from a set of points, but I'm running into some trouble. I've looked through previous answers to questions similar to/identical to mine: ...
4
votes
1answer
119 views

Converting 3D graphics primitives to 3D image data

My goal is to produce a 3D dataset, from a scene of simple transformed shapes. The idea is that this data serves as a ground truth for some tomographic reconstruction problems. (For this, it is ...
6
votes
2answers
167 views

How does CirclePoints function actually work when drawing a polygon?

By reading that CirclePoints gives the positions of n points equally spaced around the unit circle, I understood that : ...
9
votes
1answer
437 views

Distance of a point from the closest surface

Consider the situation in which I have a cuboid: Cuboid[{0,0,0},{1,1,1}] and a point in the cubiod {0.9,0.4,0.6} How do I ...
5
votes
1answer
92 views

Annulus distribution in n dimensions: normalising constant, normed mean and variance

I would like to know the normalising constant of a distribution which has the pdf, $$f(x) \propto \sqrt{\frac{1}{2\pi\sigma^2}}\text{exp}(-\frac{(|x|-r_0)^2}{\sigma^2}),$$ where $x\in\mathbb{R}^d$ ...
1
vote
1answer
50 views

Working with a geometry that spans 4 orders of magnitude

I have to work with a geometry described by: slab = Cuboid[{0, 0, 0}, {7, 7, 0.3*10^-4}]; describing an electrode 7 cm wide and 0.3 micrometers thick. The ...
7
votes
2answers
338 views

Calculate mean normed distance and normed variance of cone-shaped distribution in N-dimensions

I would like to calculate the mean and variance of the normed distance of a cone-shaped distribution, $f(x) \propto \exp(-|x|)$, where $x\in\mathbb{R}^d$, where $d$ can be any positive integer. In ...
5
votes
1answer
103 views

Cubes inscribed into a tetrahedron

I am trying to visualize a geometry concept by using Wolfram Mathematica. Here is a sample image. I have found the source code for tetrahedron online, but I can't find a source code for inscribed ...
3
votes
2answers
52 views

How can I animate the plot of solutions to this system with different initial conditions?

I would like to plot the curves given by $\alpha(s) = (u(s), v(s))$, where $u$ and $v$ are like below. ...
3
votes
3answers
117 views

How can I animate the plot of this curve also showing its tangent/normal vectors at each point?

I want to animate the curve given by $\alpha(t) = (u(t), v(t))$ being traced out (and also showing the tangent and normal vector at each point), where $u$ and $v $ are the solutions below ...