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

learn more… | top users | synonyms

4
votes
3answers
62 views

Number of holes in a polygon

The Problem: Count the number of holes in a connected polygon. Connectivity of the polygon is guaranteed by the condition that every triangle in the input triangulation shares at least 1 side with ...
12
votes
4answers
308 views

Find the Convex Hull of a set of 2D points

When you hammer a set of nails into a wooden board and wrap a rubber band around them, you get a Convex Hull. Your mission, should you decide to accept it, is to find the Convex Hull of a given set ...
4
votes
2answers
192 views

Polygon prefixes

Polygons are named after the number of sides that they have. A pentagon has 5 sides, an octagon has 8 sides. But how are they named? What's the name for a 248-sided polygon? All polygons are suffixed ...
-3
votes
1answer
107 views

What is the value of the following shape? [closed]

The following 3D shapes (see link below) are assigned values based on the number of faces, vertices and edges they have. Curved surfaces are considered a face and a vertex does not have to be formed ...
4
votes
3answers
202 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 values of the points will be integers. ...
9
votes
3answers
621 views

Solving triangles with trigonometry

Time to dig up your old trigonometry notes from high school! The challenge is to solve the unknown sides and angles of different triangles. And as is customary in code golf, the smallest working code ...
13
votes
4answers
468 views

Determine if a polygon is convex

Write a program to determine if the input polygon is convex. The polygon is specified with one line containing N, the number of vertices, then N lines containing the x and y coordinates of each ...
4
votes
7answers
359 views

Intersection of Two Lines

Given equation of two lines in the format Ax+By=C, determine their intersection point. If they are parallel print 'parallel' without quotes. For input/output format refer sample input/output. Input ...
7
votes
4answers
355 views

Code-Golf: Lattice Points inside a Circle

The following picture shows the problem: Write a function that, given an integer as the circle radius, calculates the number of lattice points inside the centered circle (including the boundary). ...
2
votes
1answer
82 views

Squares in Movement Range

There are two inputs, the first input is a map in 2D array, where 2 represents an obstacle and 0 represents a regular ground, and 1 represents the player's location (implies that the player is ...
5
votes
2answers
275 views

Simple Geometric problem

This problem (see below) has been given as High School Programming League code golf challange. The shortes codes submitted during the contest where: 177 bytes in Ruby, 212 bytes in Python 2.5, 265 ...
2
votes
2answers
271 views

Turn 2D boolean array into (rectilinear) polygons

Challenge Write a program which, given a 2-dimensional boolean array (equivalently, a monochromatic bitmap), outputs a series of polygons that describe the outline of the region that is “true” (1). ...