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

learn more… | top users | synonyms

4
votes
1answer
149 views

How to generate nonperiodic tilings?

I need to generate nonperiodic tilings which are similar to the attached figure (kite-domino tiling). I was thinking the code is similar to the code for the Penrose tiling. However, that code is too ...
1
vote
0answers
39 views

xCoba: evaluate tensor quantities, given an explicit metric

I am new to xAct packages and I'm having some problems to compute tensor quantities with xCoba. I defined a manifold and a metric. I computed All quantities of ...
3
votes
1answer
225 views

How to map vertex points from the surface of a straight pipe onto 2D plane

How to map vertex points from the surface of a straight pipe onto 2D plane. The 3D surface points of the straight pipe can be found here: data Working code: ...
4
votes
1answer
125 views

Construct a function that can generate a geometry by extruding a section

Toady I want to construct a geometry shown as below: I know the Mathematica has the functions like Cylinder, Sphere and so ...
1
vote
1answer
86 views

Generating and plotting hypocycloids [closed]

Hypocycloids are curves generated by following a fixed point on a smaller circle rolling around the inside of a larger circle. The following code is from the recent book of P. Wellin (with modified ...
2
votes
0answers
53 views

VoronoiMesh for 3D points

I believe that this is a doc error in V10 (this was programmed to be but not implemented). The new VoronoiMesh should work for 3D set of points. The ...
0
votes
0answers
57 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: ...
6
votes
2answers
592 views

Distribution of 10 points within a unit square

Related to some packing problems, following problem arose: Distribute 10 points within a square of sides 1, so that minimal distance between them is maximized. With the help of random simulation, or ...
15
votes
5answers
2k views

How do I draw a triangle given the lengths of the sides?

I know, of course, how to draw a triangle in the plane given the vertices: Graphics[Polygon[{{1, 0}, {0, Sqrt[3]}, {-1, 0}}]] But I'm not sure how to simply draw ...
3
votes
1answer
72 views

Symbolic Output after numerical computation

I have a small question about the symbolic output. I started to write a program that generates the coordinates of n-dimensional polytopes by Wythoff construction. For crystallographic groups, all is ...
14
votes
7answers
2k views

Distance between point and line segments

How would you determine the shortest distance between a point and one or more segments? For example, what is the shortest distance between the point and the two segments below? Clearly the point is ...
18
votes
4answers
2k views

How do I calculate the area of a polygon given its coordinates?

I have a polygon: Polygon[{{0, 200 }, {200, 100}, {500, 300}, {100, 700}}] How can I figure out its area? The docs page does not have any example. So far I've ...
34
votes
7answers
4k views

Intersecting graphics

Does the Mathematica graphics system have any concept of intersecting graphics? I've not found much in the documents so far. For example, if I want to show the intersection of two shapes: ...
1
vote
1answer
72 views

how to find iso-cost contours on a 2d plot efficiently

Consider a 2D plot in which dimension 1 and 2 represent quantity 1 and 2 respectively ranging over 0 to 100. Each point in the space corresponding to (x,y) represent cost of choosing quantity 1 as x ...
0
votes
1answer
64 views

How do I show cross sections of a basic shape using calculus? [closed]

Assume I have an object whose radius is modeled by the function $x^2$. Using calculus and circular cross-sections, the object's volume is given by $\pi\int_a^b(x^2)^2dx$. But given an arbitrary ...
1
vote
1answer
103 views

Generate a set of 3D coordinates subject to constraints

Generating a set of random 3D coordinates is ok, e.g. ...
10
votes
2answers
565 views

Rebuild a polygon so it doesn't self intersect

If you consider the following Polygon: ...
0
votes
1answer
112 views

Height average between 4 points

I have a $3D$ space, if I had a square in this space: square = {{ 0, 0, 100}, { 100, 100, 50}, { 0, 100, 22}, { 100, 0, 86}}; how could I get the average height ...
0
votes
1answer
141 views

Area of a convex polygon with a set of points [duplicate]

I have a set of points Pts[a_,b_,c_]:={{a, b}, {b, a}, {c, a}, {a, c}, {b, c}, {c, b}} which define a convex polygon and I would like to find its area. There is ...
23
votes
5answers
886 views

How to plot ternary density plots?

How can I get a ternary density plot just like the plots from OriginLab? ContourPlot and DensityPlot seemingly can solve the ...
0
votes
0answers
104 views
17
votes
3answers
505 views

Creating sculptural forms using graphics primitives

This is a question based on this answer by halirutan. Some amazing images can be created with this code, and I was wondering whether it was possible to extend the principle to different shapes. I ...
7
votes
1answer
773 views

How does one draw a parallelepiped in Mathematica?

I'm a bit new to the application, and I'm not sure how to draw a parallelepiped in Mathematica.
3
votes
2answers
254 views

Intersection of surface with parallel planes

Consider the code (adapted from here) ...
4
votes
4answers
210 views

Choosing $n$ equidistant points on a circle with given radius and center

I would like to have a function circle which takes two inputs: a tuple {x,y} and a real number ...
1
vote
1answer
139 views

How to get the dimensions of a rectangle?

Suppose I create a Rectangle of dimensions 1 and 3. Is there any function in Mathematica that I can use to recover the dimensions of the original rectangle? If there is no such a function, is there a ...
0
votes
0answers
56 views

Drawing Target Layers on the Top of 3D Heart for the Women's Day? [closed]

For the sake of Women's Day, I would like to draw target sign on the heart and write there something like "Best Mother" or just ...
2
votes
0answers
219 views

Visualising Special Relativity

Mathematica newbie learning by doing (or not so far, in this case). Problem: Special Relativity - consider two inertial frames $A$ & $A'$ in relative motion. At a time $t0$ as measured in $S$, ...
1
vote
0answers
90 views

Extract coefficients of differential form in package RGTC

I am using the Package RGTC to do some calculations in Supergravity. It allows to define differential forms after specifying a co-frame. I am working in with the 10d coordinates ...
8
votes
2answers
234 views

Counting and extracting hit circles/triangles for randomly chosen points

Below, you see a triangle in which the incircle was inscribed. As we know, the center of this circle is the intersection of the angle bisectors. At this point, one could go further and find the ...
11
votes
6answers
1k views

How to find lattice points on a line segment?

How do I find points on the line segment joining {-4, 11} and {16, -1} whose coordinates are positive integers?
1
vote
1answer
328 views

Plot in a 2-dimensional simplex

I have a row vector as $P=(p_1,p_2,p_3)$ which should be obtained from the following constraints: $a_1p_1 + a_2p_2 + a_3p_3 = b_1p_1 + b_2p_2 + b_3p_3$ ($a_i$'s and $b_i$'s are known) $p_1 + p_2 + ...
5
votes
1answer
204 views

Generate regularly spaced points from the surface of simplexes

I need to generate regularly spaced samples (points) from the surface of unit simplexes with 2 or greater vertices or end points. I can generate random samples pretty straightforwardly: ...
11
votes
2answers
593 views

How to plot a barycentric line

I want to plot a barycentric function on an equilateral triangle (ternary plot). For example f1 = {Abs[Sin[x]], Mod[x, 2], Abs[Cos[x]]}; At the moment I evaluate ...
1
vote
1answer
120 views

Return “true” if point is in Convex Hull [duplicate]

I have a set of points Z: Z = {{x1,y1},{x2,y2},..,} I would like to obtain a function that returns ...
4
votes
1answer
182 views

Plot a cone in spherical co-ordinates

As we all know in spherical coordinates a function phi = π/3 gives us a cone. The cone makes an angle of π/3 with the imagined ...
9
votes
6answers
8k views

How to determine the center and radius of a circle given three points in 3D?

I was wondering if anyone could give me a hand with this problem I have. I have six points on a plane, and I am trying to determine if they form a circle or not. I know that any three points in 2D ...
8
votes
1answer
431 views

Uniformly distributed n-dimensional probability vectors

What's the right way to generate a random probability vector $p={p_1,\ldots,p_n} \in {(0,1)}^n$ where $\sum_i p_i=1$, uniformly distributed over the $(n-1)$-dimensional simplex? What I have is ...
5
votes
1answer
262 views

Imposing a Periodic Boundary Condition in Nearest Neighbour Search

I am trying to find first nearest neighbour distributions of randomly dispersed point-like objects in an infinite system. To do this I make a finite sized box unit cell with a chosen concentration of ...
21
votes
2answers
891 views

How can I pack circles of different sizes into a spiral?

Given a list of circles of different areas, I need to arrange them tangentially in order of increasing area and spiraling outward. An example of the type of packing I'm attempting is shown by the ...
11
votes
1answer
524 views

Solving Killing equations

Is it possible to solve Killing equations in Mathematica for a general vector? I am looking for a way to create Killing equations and then find what the vectors are, but I have a problem with this. ...
9
votes
2answers
421 views

Is there a triangle like this?

I want to find the numbers $a$, $b$, $c$, $d$ of the function $y = \dfrac{a x + b}{c x + d}$ so that the triangle $ABC$ with three points $A$, $B$, $C$ have integer coordinates and lies on the graph ...
2
votes
1answer
255 views
0
votes
2answers
101 views

How can I plot the integral of a unit tangent vector? [closed]

The questions states: Let r[t_]:= {E^(-t), 3t^2, 4 Sin[t]} Plot and compare r[t] and the integral of ...
7
votes
4answers
567 views

Plotting an epicycloid

I am fairly new to Mathematica and I cannot figure out how to plot an epicycloid. I have plotted some neat looking things in my attempts, but can't make one. I am not looking to make an animation, ...
4
votes
2answers
151 views

Assumptions for RotationMatrix

I'm making C++ program, and in my program I need a rotation matrix around any vector. I wanted to extract RotationMatrix[fi,{x,y,z}] output and put it in my ...
0
votes
1answer
122 views

Are there built in functions to perform a geometric transform to rotate a set of points around an arbitrary point?

I have a list of points {{4,5},{6,7},{9,8},...} in two-dimensions. I'd like to rotate these points some number of degrees $\theta$ around an arbitrary anchor point ...
1
vote
1answer
161 views

Efficiently determining if a morphological component overlaps a polygon with vertices at real number coordinates

I have a list of morphological components $m$, a set of vertices for a polytope $P$ (at real number coordinates), and I'd like to be able to calculate a list of morphological components $m'$ that ...
3
votes
0answers
163 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 ...
0
votes
1answer
192 views