Questions tagged [geometry]

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

52 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
16
votes
0answers
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? ...
8
votes
0answers
82 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? ...
8
votes
0answers
946 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 ...
7
votes
0answers
134 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 ...
6
votes
0answers
290 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 ...
6
votes
0answers
642 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: ...
5
votes
0answers
90 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 ...
5
votes
0answers
267 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 ...
4
votes
0answers
39 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 ...
4
votes
0answers
258 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 ...
4
votes
1answer
497 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?
3
votes
0answers
91 views

Symbolic formula from GeometricScene?

I'm trying to solve the following problem with GeometricScene What is the shortest circular arc of which the altitude above its chord is one? I have the following code: ...
3
votes
0answers
143 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 ...
3
votes
0answers
160 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
0answers
226 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 ...
3
votes
0answers
125 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. ...
3
votes
0answers
292 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, ...
2
votes
0answers
61 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 ...
2
votes
0answers
76 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 ...
2
votes
0answers
112 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 ...
2
votes
0answers
131 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 ...
2
votes
0answers
343 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 ...
2
votes
0answers
185 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 ...
1
vote
0answers
31 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 ...
1
vote
0answers
33 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, ...
1
vote
0answers
44 views

RandomInstance of GeometricScene producing unexpected result

Consider the following scene as an example: ...
1
vote
0answers
37 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 ...
1
vote
0answers
46 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 ...
1
vote
0answers
37 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 ...
1
vote
0answers
86 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 ...
1
vote
0answers
43 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 ...
1
vote
0answers
30 views

NearestMeshCells in Mathematica 11.3

Is there an efficient way of writing a function equivalent to NearestMeshCells (Mathematica 12.1) in Mathematica 11.3? I'm trying to write my own code, which I can ...
1
vote
0answers
97 views

How to use Mathematica to find the coordinates of 7 points?

Could anyone please help me with using Mathematica to find the coordinates of 7 equally spaced points on the unit sphere $S^3$ in $\mathbb{R}^4$? Thanks a lot!
1
vote
0answers
49 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 ...
1
vote
0answers
57 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
0answers
65 views

Finsler or Lagrange geometry package?

I was wondering if there exist any packages or examples of work on Finsler-Lagrange geometry. I need it to do symbolic calculations, as for example calculations of non-linear connection coefficients, ...
1
vote
0answers
49 views

Find rectangle boundries with any angle

I have a rectangle that has an angle and i need to find its boundaries in an equality form ( less than, greater than). so i guess the best way to start is to tell you what i know CENTER: (...
1
vote
0answers
169 views

Equilateral triangulation of a polyfile-defined surface

I would like to be able to make a (low fidelity) triangulation of a given surface with constant edge lengths (using equilateral triangles). This requirement limits the Gaussian curvature at each ...
0
votes
0answers
37 views

How can Integrate of conjugate transpose in mathematica?

please help me to integrate this matrix in matematica: 0 ConjugateTranspose[u[x,t]] (u_x)[x,t]+I vx,t[x,t] 0 -ConjugateTranspose[u[x,t]] (u^(1,0))[x,t]-I vx,t[x,t] 0 0 0 ...
0
votes
0answers
63 views

Rotate 120-Cell Animation

I have seen some code (https://mathematica.stackexchange.com/a/9593) to create an animation of a hypercube rotating, but I'm really struggling to understand how it works. I find it quite complicated. ...
0
votes
0answers
52 views

How can I connect and combine individual active areas in a geometric shape?

I am new in Mathematica and I do not know how I can get the following into a square. I need 4 "active areas" but in a single square which I can easily access and manipulate. Here's what I've ...
0
votes
0answers
50 views

Eliminate doesn't work

I tried to define r by the polynomials a,b,c only. The result which I want is r=4/3 a. But this eliminate doesn't work! It is continue running without stop and without any output. Eliminate[{a == x[1] ...
0
votes
0answers
29 views

How to reorient a Sphere[] and associated point based on some arbitrary axis?

Suppose I have a unit Sphere[] sitting at the center {0,0,0}, with a point on its "north pole", like this one: ...
0
votes
0answers
43 views

Torus Hex Mesh - Need Unique Hex Dimensions

I'm looking to laser cut a bunch of hexagons and assemble them into a torus (using hot glue or tape). How do I get the dimensions of the individual unique hexagons? I've seen Create a torus with a ...
0
votes
0answers
51 views

How to use MMA to make these triangles into a Pentagon according to the equal length side?

I tried to use Polygon but failed. ...
0
votes
0answers
43 views

PlanarAngle symbolic equalities return contradictory results

PlanarAngle[OO->{A,B}]==PlanarAngle[OO->{B,A}]/.{OO->{0,0},A->{1,0},B->{1,1}} False ...
0
votes
0answers
100 views

Discrete Sum of Function over a Region

I might have completely missed something in my search. I want to discretely sum over a function, $f(x_i,y_j)$ multiplied by some other function $g$ over a general region $S$. $$\sum_{(x,y)\in S}f(x,...
0
votes
0answers
74 views

How can I create a Delaunay mesh in set of points inside an image?

Is there a possible way to create a Delaunay mesh inside an image given a set of points inside the image? for instance use the pixel coordinates to create the Delaunay mesh.
0
votes
0answers
138 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. ...
0
votes
0answers
111 views

Intersection of ellipsoids with planes sometimes not working!

I am trying to find the intersection of an ellipsoid and a plane and I am getting strange results.... Sometimes it works and some others it does not. ...