Skip to main content

Questions tagged [geometry]

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

14 votes
9 answers
951 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 ...
noodle person's user avatar
12 votes
1 answer
298 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, ...
guest4308's user avatar
  • 1,053
3 votes
7 answers
341 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 ...
bigyihsuan's user avatar
  • 10.1k
8 votes
4 answers
472 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 ...
George Glebov's user avatar
11 votes
4 answers
572 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. ...
l4m2's user avatar
  • 25k
13 votes
16 answers
3k views

The primitive circle problem

Challenge The primitive circle problem is the problem of determining how many coprime integer lattice points \$x,y\$ there are in a circle centered at the origin and with radius \$r \in \mathbb{Z}^+ \...
vengy's user avatar
  • 2,211
17 votes
19 answers
1k views

Ellipse Lattice Point Counter

Challenge Determine how many integer lattice points there are in an ellipse $$\frac{x^2}{a^2} + \frac{y^2}{b^2} \leq 1$$ centered at the origin with width \$2a\$ and height \$2b\$ where integers \$a, ...
vengy's user avatar
  • 2,211
-6 votes
1 answer
183 views

Where to stand to throw circles over sticks

Consider a horizontal line with vertical lines centered on the x-axis and placed at gaps of \$\sqrt{2}/2\$. For a positive integer \$n \geq 3\$, the first half of the lines have lengths \$0, \sqrt{2},...
Simd's user avatar
  • 3,098
10 votes
12 answers
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 ...
vengy's user avatar
  • 2,211
1 vote
1 answer
558 views

Where to put a circle?

Consider an \$n \times n\$ grid of integers which is part of an infinite grid. The top left coordinate of the \$n \times n\$ grid of integers is \$(0, 0)\$. The task is to find a circle which when ...
Simd's user avatar
  • 3,098
16 votes
2 answers
601 views

Construct this point

Given a constructible point \$(x, y) \in \mathbb R^2\$, output the steps required to construct \$(x, y)\$ Constructing a point Consider the following "construction" of a point \$(\alpha, \...
caird coinheringaahin g's user avatar
14 votes
1 answer
276 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 ...
caird coinheringaahin g's user avatar
10 votes
6 answers
980 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 ...
ATaco's user avatar
  • 10.9k
20 votes
9 answers
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 ...
Yousername's user avatar
  • 4,040
11 votes
4 answers
418 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 ...
Karl's user avatar
  • 621

15 30 50 per page
1
2 3 4 5
26