Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [geometry]

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

0
votes
3answers
44 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
23 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
27 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
154 views

Plotting cities with Callout labels on a globe?

This question essentially amounts to implementing a very basic version of GeoGraphics3D: ...
2
votes
1answer
109 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
100 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
17 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
251 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
58 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
71 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
53 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
92 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
48 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
64 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
61 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
62 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
510 views

Find bounding box of arbitrary 3d graphics?

What's the best workaround for this limitation: RegionBounds[ BoundaryDiscretizeGraphics[Graphics3D[{Cone[], Cuboid[]}]]]
3
votes
0answers
69 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
67 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
71 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
169 views

How to Interpolate a 3D MeshRegion?

If you were given some discrete MeshRegion called r (you don't know R): ...
2
votes
1answer
73 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
91 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
80 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, <...
0
votes
1answer
45 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
140 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
897 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
102 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
71 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
59 views

RegionCentroid issue

This example shows an unexpected result from RegionCentroid: ...
5
votes
3answers
318 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
1answer
131 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
102 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
159 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
430 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
87 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
49 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
334 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 ...
4
votes
1answer
97 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
50 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
106 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 ...
3
votes
1answer
68 views

How to replace the old Rotate2D in the recent versions with RotationTransform [closed]

I have a very old code and I am trying to Evaluate it with a recent version (10.0.0.0). I used Rotate2D and now it must be replaced by ...
3
votes
0answers
192 views

Automated searching for maximal 2D point configurations

I have some black-box function that takes lists of 2D points, and I would like to find some practical methods of searching for collections of points that maximize it. Motivation I've come across ...
7
votes
0answers
80 views

Higher order Laplacian flows

Given disjoint surfaces $q_i$ in 3D and their 1D boundary curves $\partial q_i = \gamma_i$, I seek a surface $p$ that joins the $q_i$, where $p \cup q_i$ forms a (piecewise) $C^k$ surface that ...
3
votes
1answer
80 views

Plotting functions on surfaces

So I have a 2D surface which can be parameterized by a vector $X(u1,u2)$ which I am plotting with ParametricPlot3D[X, {u1,...}, {u2,...}] I have a scalar function, ...
11
votes
5answers
523 views

Evenly spaced points on boundary of polygon

I have a polygon and I would like to generate $n$ evenly spaced points along the boundary.
4
votes
1answer
83 views

Plotting over simple geometric region gives error invalid domain dimension

This is my first time posting a question. In general, I am trying to plot a polynomial over a parallelogram but ran into trouble with a square. ...
3
votes
2answers
169 views

How to draw right angled triangle with a, b and c lengths shown?

I'm trying to draw a right angled triangle with hypotenuse length 1,opposite length b and adjacent length c in Mathematica. How ...
3
votes
4answers
218 views

How to use Mathematica to plot an ellipse given foci and semimajor axis?

How can I use Mathematica (version 9) to plot an ellipse, given the coordinates of its two foci and the length of its semimajor axis, where the major axis is not necessarily parallel to either the $x$-...
0
votes
0answers
63 views

Hyperbola ContourPlot missing input

I'm trying to plot a hyperbola using ContourPlot, but I can't understand what I'm missing on its call. The error says it's incorrect syntax, although I can't see any errors. ...