# Questions tagged [geometry]

This challenge is intended to be solved by using, manipulating, or creating shapes or other geometric structures.

385 questions
Filter by
Sorted by
Tagged with
284 views

### Snake a string through a simplex

An n-simplex is a generalization of 'triangleness' in any dimension (specifically, it is the simplest shape requiring n dimensions). Starting with 0 dimensions, the named simplexes are: point, line ...
• 1,225
1k views

### Draw a Regular Reuleaux Polygon

Related: Draw A Reuleaux Triangle!, Draw a regular polygon A Reuleaux polygon is a curve of constant width made up of circular arcs of constant radius. The most well-known Reuleaux polygon is the ...
• 9,261
390 views

### Plot the ground path of a satellite

If you model a satellite as a free point orbiting a body, you can pretty easily see it has 6 degrees of freedom: three for the X, Y, and Z position, and three for the X, Y, and Z velocity. However, ...
• 1,225
355 views

### Find the most isolated point

Given two non-empty sets of points $P,T = \{(x,y)\ |\ x,y \in \mathbb{Z} \}$, find the point $p \in P$ such that it is the "most isolated" from all points in $T$. The "most ...
• 10.4k
486 views

### How far are you?

Write a program that gets coordinates of two objects on Earth, and calculates how far they are from each other directly in space (a straight line through Earth) and on the surface (through the ...
577 views

### Construct the point with two segments

Given a rational point P, return four integral points A, B, C, and D, such that the line segments AB and CD intersect only at P. To make it a bit more interesting, segment AB doesn't include A and B. ...
• 26.1k
3k views

• 2,279
187 views

• 50.2k
279 views

### Construct the Constructability sequence

Consider compass-and-straightedge construction, where you can construct new points from existing ones by examining intersections of straight lines and circles constructed with one of the following two ...
• 50.2k
983 views

### Calculate the Distance to a Line Segment

The Challenge Given two vertexes and a point calculate the distance to the line segment defined by those points. This can be calculated with the following psudocode ...
• 10.9k
2k views

### Cutting a Circular Pizza Vertically

Most people would cut circular pizzas into circular sectors to divide them up evenly, but it's also possible to divide them evenly by cutting them vertically like so, where each piece has the same ...
• 4,060
433 views

### Generate the vertices of a geodesic sphere

As in this challenge, the task is to generate the vertices of a polyhedron. The polyhedron here is the one obtained by dividing a regular icosahedron's triangular faces into smaller triangles so that ...
• 621
2k views

### Vertices of a regular dodecahedron

A regular dodecahedron is one of the five Platonic solids. It has 12 pentagonal faces, 20 vertices, and 30 edges. Your task is to output the vertex coordinates of a regular dodecahedron. The size, ...
• 49.4k
1k views

### Euclidean distance on projective plane

Motivated by this challenge Background Let we have a square sheet of flexible material. Roughly speaking, we may close it on itself four ways: Here the color marks the edges that connect and the ...
• 3,423
4k views

### Given 4 fence lengths, what's the largest rectangular yard you can make?

Here's a very simple little problem that I don't believe has been asked before. Challenge Write a program or a function that takes in four positive integers that represents the lengths of movable but ...
• 809
3k views

### Calculate Euclidean distance on a torus

Euclidean distance between two lattice points $(x_1, y_1)$ and $(x_2, y_2)$ on a plane is: $\sqrt{(x_1 - x_2)^2 + (y_1 - y_2)^2}$. Imagine now a lattice ...
• 13.7k
634 views

### Enumeration of free polyominoes

A polyomino with $n$ cells is a shape consisting of $n$ equal squares connected edge to edge. No free polyomino is the rotation, translation or reflection (or a combination of these ...
• 9,438
2k views

### Draw the GKMS aperiodic tile

Chaim Goodman-Strauss, Craig Kaplan, Joseph Myers and David Smith found the following simple (both objectively and subjectively) polygon that tiles the plane, but only aperiodically: Indeed they ...
• 3,935
1k views

### Detect round trips on a hyperbolic grid

You're driving a car in an infinite city whose blocks are pentagons arranged in the order-4 pentagonal tiling. At each step, you proceed to the next intersection and choose whether to continue left, ...
• 621
634 views

### Voronoi-Lloyd ASCII art [closed]

Voronoi diagram is a partition of a plane (or part of plane) into regions close to each of a given set of objects ("seeds"). Here we’ll be dealing with discrete arrays or even rather with ...
• 3,423
283 views

### Canonical form of a cubic Bézier curve

On Pomax's Primer on Bézier Curves this "fairly funky image" appears: This is related to the fact that every cubic Bézier curve can be put in a "canonical form" by an affine ...
• 3,935
211 views

### 4D rotation matrix to quaternions

It is well-known that a 3D rotation can always be represented by a quaternion. It is less well-known that a 4D rotation can always be represented by two quaternions, sending a point $p=(a,b,c,d)^T$ ...
• 3,935
481 views

• 17.9k
2k views

### The Area of Rectangles

Getting the area covered by a rectangle is really easy; just multiply its height by its width. However in this challenge we will be getting the area covered by multiple rectangles. This is equally ...
• 99.6k