# Questions tagged [geometry]

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

370 questions
Filter by
Sorted by
Tagged with
938 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 ...
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 ...
350 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 ...
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, ...
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 ...
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 ...
2k 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 ...
417 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 ...
1k 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 ...
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, ...
601 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 ...
241 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 ...
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$ ...