Questions tagged [geometry]

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

81 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
17 votes
0 answers
2k views

Circle with negative radius?

Bug introduced in 9.0 or earlier and fixed in 11.0.0 Why does this work: Graphics[{Circle[{0, 0}, -Pi/4]}] But this doesn't? ...
David's user avatar
  • 14.9k
9 votes
0 answers
121 views

Order of PolygonCoordinates[] is undefined in Mathematica 12?

Probably I am missing something fundamental. I try to get a polygon's ordered coordinates, but PolygonCoordinates[] yields something pretty unordered. Am I missing some essential function? ...
Bernhard Liebl's user avatar
8 votes
0 answers
1k views

Minimalistic code challenge on Apollonian gaskets

I've been recently fascinated by the beauty, symmetry and mathematical richness of the Apollonian gaskets. So I felt myself challenged to see if it was possible to generate one in Mathematica with a ...
Luca M's user avatar
  • 997
7 votes
0 answers
187 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 ...
Greg Hurst's user avatar
6 votes
1 answer
895 views

How to Export to/Import from GeoGebra?

I'd like to convert geometric figures between Mathematica and GeoGebra. Does anyone know how to do that?
pdmclean's user avatar
  • 1,398
6 votes
0 answers
109 views

Need help understanding weird RegionUnion behavior

I'm trying to understand some weird behaviors of RegionUnion in a small piece of code. In particular, RegionUnion is not ...
jwarley's user avatar
  • 61
6 votes
0 answers
366 views

Anamorphic projection onto the corner of a room

I want to use a router to carve anamorphic projections of polyhedron wireframes onto two adjacent walls of my office. Like this: In order to do this I need to transfer the positions of the vertices ...
geordie's user avatar
  • 3,693
6 votes
0 answers
784 views

Death of parallel sub-kernels

EDIT : Finally, the new Mathematica 10.0 seems to fix it. I have a little parallelization problem. I wrote a code to generate a quasicrystal by dynamical generation. Here the code: ...
physicien's user avatar
  • 407
5 votes
0 answers
120 views

CirclePoints and CircleThrough

$Version 12.2.0 for Microsoft Windows (64-bit) (December 12, 2020) For points (located on a unit circle), ...
Syed's user avatar
  • 54.1k
5 votes
0 answers
402 views

Volume Deformation

I want to do a volume deformation based on Bezier volumes. For example, if I have a triangle mesh, then I want to deform the mesh into a weird shape like the example image attached here. Can anyone ...
BayWilson's user avatar
  • 347
4 votes
0 answers
92 views

Why am I losing photons in a window?

I'm trying to model a window. For some distribution of light rays hitting the window, I'd like to determine the output angles, and the number of photons which are reflected or transmitted. I'd like ...
Tomi's user avatar
  • 4,378
4 votes
0 answers
345 views

Interpolating vertex colors with trilinear coordinates instead of barycentric

In 3D graphics, vertex attributes like vertex normals, texture coordinates, and vertex colors are interpolated over the surface of triangles using barycentric coordinates. In actual fact it's more ...
flinty's user avatar
  • 25.3k
4 votes
0 answers
210 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 ...
minhthien_2016's user avatar
4 votes
0 answers
272 views

Generating an obstacle-avoiding closed-curve with a fixed perimeter and a target area

I was wondering if there was a neat way to solve the following problem in Mathematica v9 - Provided a binarized image (where we call black pixels "obstacles" or vice versa, whichever is most ...
TilePath's user avatar
3 votes
0 answers
114 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 ...
P Teeuwen's user avatar
  • 347
3 votes
0 answers
189 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 ...
user64494's user avatar
  • 26.4k
3 votes
0 answers
244 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 ...
M.R.'s user avatar
  • 31.5k
3 votes
0 answers
127 views

RandomPoint not evaluating on RegionQ and ConstantRegionQ regions

When attempting to recreate and generalise the MatLab code for Random Vectors with Fixed Sum by first principles I came across a few issue with RandomPoint. ...
Edmund's user avatar
  • 42.3k
3 votes
0 answers
341 views

How to solve or prove some plane geometry problems by Mathematica?

There are some plane geometry problems as my homework. I tried to solve one of them by Sketchpad which involved concurrent lines. I wonder if there is some way made through Mathematica? For example, ...
user avatar
2 votes
0 answers
36 views

GeoProjection used in area computation of relatively small regions

Let's define a relatively small region via GeoPosition as follows. pos = GeoPosition[{{48, 9}, {48.0001, 9}, {48.0001, 9.0001}, {48, 9.0001}}, "WGS84"] ...
Math Gaudium's user avatar
2 votes
1 answer
117 views

How can I compute the maximum value of a ConditionalExpression?

If we use GeometricSolveValues in version 14.0, we can use this code to get a ConditionalExpression expr: ...
yode's user avatar
  • 26.7k
2 votes
0 answers
42 views

Inconsistence in calculating zero geometric area

First, let us see disk ...
matheorem's user avatar
  • 17.1k
2 votes
0 answers
103 views

How can I define a d-dimensional metric on mathematica with abstract components?

I want to define on Mathematica the (d+1)-dimensional metric: $ ds^2 =G_{\mu\nu}dx^{\mu}dx^{\nu}= 2tdt^2 + g_{ij}(t,x)dx^idx^j $ where latin indices go $i,j=1,...,d-1$ and $g_{ij}$ are unknown ...
Mike Ehrmantraut's user avatar
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: ...
chris's user avatar
  • 23k
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 ...
userrandrand's user avatar
  • 5,882
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 ...
Kerry M. Soileau's user avatar
2 votes
0 answers
94 views

Difference between a region and its convex hull

I have a volume enclosing a certain region. The region is non-convex, and I calculate its convex hull with the built-in Mathematica function. I want to know the difference between the region and its ...
akr's user avatar
  • 177
2 votes
0 answers
145 views

How to write on a surface?

How do I include text on a curved surface? For example, and as a starting point, how can I reproduce the following image I've seen some examples where people geometrically described letters to do ...
sam wolfe's user avatar
  • 4,693
2 votes
0 answers
111 views

Inner polygon approximation

Suppose you want to perform an inner approximation of a planar semialgebraic set by a finite set of polygons. The following is a quick way to yield an approximation but I am not convinced that it is ...
Math Gaudium's user avatar
2 votes
0 answers
65 views

How to speedup RegionIntersection?

Consider a circle circle located at the origin of a coordinate frame and with a radius ROffAxisArb (it is parametrized by two ...
John Taylor's user avatar
  • 5,733
2 votes
0 answers
94 views

How can I calculate the ratio of the line segments in the following geometric scene?

The following code can draw the corresponding geometric scene. By observing for many times, we can know that the length ratio of line CE and line ...
user avatar
2 votes
0 answers
115 views

measuring a rectangle length and width from a table of data

For a table of x,y,z data points: ...
Jamie M's user avatar
  • 515
2 votes
0 answers
121 views

Resolve implicit region into explicit one

Does Mathematica provide a way to take, for instance: ImplicitRegion[x^2 + y^2 <= 1, {x,y}] and convert it into a region defined explicitly in terms of x and ...
1110101001's user avatar
  • 1,989
2 votes
0 answers
151 views

ConvexHullMesh fails for collinear points

I've got a List of PointLists, of which some contain only collinear points. I now want to obtain all ConvexHullMeshes of my PointLists. For more than two ...
DPF's user avatar
  • 1,067
2 votes
0 answers
427 views

Plotting Seifert surfaces

Is it possible to make a Seifert surface in Mathematica, such as a Seifert surface for a trefoil knot? I was thinking of taking the parametrization equations for a trefoil knot and then somehow ...
ematth7's user avatar
  • 121
2 votes
0 answers
232 views

Implementation of Lubaehevsky-Stillinger Algorithm to pack hard spheres

To generate a model of a polycrystalline material with specified grain size distribution (e.g coming from a Monte Carlo Grain Growth simulation) the Paper "Effects of grain size distribution and ...
Rainer's user avatar
  • 2,891
1 vote
0 answers
74 views

Solving the expression of tortoise coordinate differential equation in Mathematica

I want to solve the differential equation of the form $\dfrac{dr_*}{dr} = \dfrac{1}{\left(1-\dfrac{2M}{r}\right)}$ under the boundary conditions $\lim_{r \rightarrow 2M}r_*(r) \rightarrow - \infty$ ...
darkphysics's user avatar
1 vote
0 answers
54 views

SameTest for arrays of points

I need to gather arrays of points by some intuitive SameTest, so for some tolerance the next arrays will be treated as the same: Next code looks like suitable for ...
lesobrod's user avatar
  • 1,667
1 vote
0 answers
73 views

faster way to find intersections?

I'm writing a g-code generator for a CNC hot wire foam cutter. I have a block of foam (blue cuboid), and two airfoils that define the root and tip of a wing (shown as black curves on the ends of the ...
rhomboidRhipper's user avatar
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: ...
kathy's user avatar
  • 11
1 vote
0 answers
163 views

How to find the center of gravity of fibers in image

I am trying to find the centers of gravity of my particles in a SEM image. I binarized the image (img) and with the input and help of previous suggestions on that topic (Creating graph out of ...
Nebcfc's user avatar
  • 11
1 vote
0 answers
134 views

How to find quadrilateral with maximum area?

Let the lengths of the sides of a quadrilateral equal a,b,c,d. What is the maximum area of such quadrilaterals? Wiki says that the quadrilateral with its maximum ...
user64494's user avatar
  • 26.4k
1 vote
0 answers
153 views

Computations on differential geometry

I have to do some really long computations of basic riemannian geometry. I am trying to use Mathematica to check them. This is the kind of computations I want to do. Let $M$ be a riemannian manifold ...
davidivadful's user avatar
1 vote
0 answers
45 views

Find the ratio of two volumes of 6 x 6 positive-definite symmetric matrices

Consider the class $A$ of $6 \times 6$ positive definite matrices with real entries and unit trace (that is, the sum of the six diagonal entries is 1). (In quantum information-theoretic parlance, this ...
Paul B. Slater's user avatar
1 vote
0 answers
67 views

Finding the shared edged between two polygons

Imagine I have two convex polygons pol1 and pol2 with a shared edge. Take, as an example, ...
sam wolfe's user avatar
  • 4,693
1 vote
0 answers
75 views

RandomInstance of GeometricScene producing unexpected result

Consider the following scene as an example: ...
user13892's user avatar
  • 9,395
1 vote
0 answers
69 views

Symmetry of Command Dot

I would like to work with the command Dot assuming symmetry. Specifically with the order D[v[t].v[t], t] I get the following output ...
davidivadful's user avatar
1 vote
0 answers
39 views

Find the (unique) 9-dimensional ellipsoid of maximum volume lying with the convex set of 4 x 4 symmetric, positive-definite (trace 1) matrices

Find the unique (JohnEllipsoid) maximum volume ellipsoid lying within the 9-dimensional convex set formed by the $4 \times 4$ symmetric, positive-definite ("density") matrices with fixed ...
Paul B. Slater's user avatar
1 vote
0 answers
156 views

Find the intersection coordinate of a line and a 3D surface defined by a contour plot

I have two points, for instance {1, 1, 1} and {10, 11, 15} that connected to form a line. I also have an enclosed surface region ...
Dennis's user avatar
  • 437
1 vote
0 answers
49 views

An apparent bug in Geometry`ConvexHull2

I was replacing some usages of Geometry`ConvexHull2 with ConvexHullMesh and found one of my tests failing. It turned out the ...
Vladimir Reshetnikov's user avatar