# Questions tagged [geometry]

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

109 questions
Filter by
Sorted by
Tagged with
893 views

### Infinite Snake game

Infinite Snake is just like the video game Snake, except for that the snake is infinitely long, there are no items to eat, and the Snake needs to move in a repeating ...
• 8,679
2k views

### Create a grid as close to a square as possible

Create a function or program that makes a grid as close to an square as possible You will be given an integer N as input, whole numbers (1,2,3,25, etc) The output must be a perfect rectangular grid ...
• 743
1k views

### Counting Collinear Points

Given two points $(x_1, y_1)$ and $(x_2, y_2)$ with integer coordinates, calculate the number of integer points (excluding the given points) that lie on the straight line segment joining these two ...
• 2,163
465 views

### 3D rotation matrix to quaternion

There are multiple ways to represent a 3D rotation. The most intuitive way is the rotation matrix – A=\begin{bmatrix}A_{11}&A_{12}&A_{13}\\A_{21}&A_{22}&A_{23}\\A_{31}&A_{32}&...
• 3,737
2k views

### Circle packing in a rectangle

Your task is to write a program that finds the largest radius that N circles can have and still fit inside of a rectangle that is X by Y pixels large. (similar to this wikipedia article) Your program ...
• 59.2k
637 views

### Hilbertize an image

For a computer vision app I want to do a mapping of an image, in such a way that every pixel fit hilbert curve, instead of conventional layout. So task could be as follows: Task description Given ...
• 313
319 views

### Line through Polygon

Input: A line of the standard slope-and-intercept form: mx+b, as well as a set of Cartesian points determining the vertices of a polygon. Assume that the x and y ...
• 4,350
515 views

### Embedded Triangles!

Your task: given an integer n, output an embedded triangle to the nth depth. Standard methods of input and output, input in any ...
• 6,844