Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [3d]

For challenges involving either three-dimensional graphics, three-dimensional geometry or spatial data structures in three dimensions (e.g. octrees).

Filter by
Sorted by
Tagged with
21 votes
18 answers
4k views

Convince me Gabriel's Horn is possible

From Wikipedia, Gabriel's Horn is a particular geometric figure that has infinite surface area but finite volume. I discovered this definition in this Vsauce's video (starting at 0:22) where I took ...
user avatar
37 votes
20 answers
7k views

I give you ascii-art, you make it pseudo-3d

Do you know the optical effect of a tridimensional hand painted whit horizontal lines? Examples This challenge consists of making something like that effect with ascii, and transforming one 2d input ...
user avatar
21 votes
26 answers
3k views

Print a 3D shape

Write a program or a function to print the following cube (if you allow me to call it so) in different sizes: ...
user avatar
  • 1,081
12 votes
5 answers
644 views

Ellipsoid surface area

Related: Ellipse circumference Introduction An ellipsoid (Wikipedia / MathWorld) is a 3D object analogous to an ellipse on 2D. Its shape is defined by three principal semi-axes \$a,b,c\$: $$ \frac{x^2}...
user avatar
  • 62.1k
16 votes
7 answers
1k views

Counting painted sides of cubic shapes

Sandbox Many of us have seen math problems where a shape made of unit cubes is dipped in paint, and the answer is the number of painted sides. We'll generalize that problem in this challenge. Input A ...
user avatar
14 votes
4 answers
946 views

Reconstruct a 3d arrangement of cubes from two of its projections

Setup Take the following 4x4x4 cube along with a 2D view of 3 of its faces, with a common 1x1x1 cube highlighted: The arrows ...
user avatar
  • 13.8k
20 votes
2 answers
1k views

Golf Lathe Machine

You probably know what a Turing Machine is but do you know what is a Turning Machine (lathe)? Ok you already know.. and what about a Golf Turning Machine ?? Ok I tell you.. A Golf Turning Machine is ...
user avatar
  • 9,426
18 votes
2 answers
1k views

ASCII TURNED SHAPE

How can we depict a turned shape simply and nicely using ascii characters in 3D space? I suggest this method : Instead of a circle we use a square rotated by 45° for the cutting section so that we ...
user avatar
  • 9,426
14 votes
6 answers
803 views

Binary self-rotation

Given a binary 3D array, for each layer, cyclically rotate up each of its columns as many steps as indicated by the binary encoding of the columns of the layer above it, and then cyclically rotate ...
user avatar
  • 27.1k
31 votes
2 answers
790 views

Will Mario fall into the Shrinking Satellite? (Diagram added)

Super Mario Galaxy features two rhombicuboctahedron-shaped* planets tiled with platforms that shrink as Mario runs across. Should Mario fall into a triangular hole or a gap left by a tile he ...
user avatar
  • 7,781
0 votes
1 answer
1k views

Menger Sponge Generator [duplicate]

Challenge My challenge, is for you to generate a Menger Sponge based on the level/iteration given. You need to draw it in ...
user avatar
33 votes
1 answer
2k views

Totally Cubular

Create a program or function to unjumble a 9x9x9 cube of digits by rotating individual 3x3 cubes within it. This is similar to (but, I suspect, a bit harder than) my Flippin' Squares question. Input ...
user avatar
  • 11.2k
5 votes
3 answers
253 views

Contiguous Block Count

Count the number of contiguous blocks within a given 3D input. Input The input will consist of one or more rectangles of characters separated by blank lines. Each rectangle represents a cross ...
user avatar
  • 11.2k
21 votes
8 answers
887 views

Wrap a seasonal present

Task Given a wrapper element and a non-jagged 3D array, wrap the array top, bottom, and all-around. You must handle both character and numeric data, but the wrapper and the present will have the same ...
user avatar
  • 27.1k
4 votes
6 answers
428 views

Find the intersection point of a plane and ray

Given a ray with a point and a vector and a plane with a point and a normal vector to the plane. You have to find the intersection point of the plane and the ray.. So your job if you choose to accept ...
user avatar
12 votes
3 answers
2k views

Draw a simple cube

We don't have a single challenge about drawing a real 3 dimensional cube, so here it goes: Challenge Your task is to draw a rotated, cube with perspective. It can be in a separate window or as an ...
user avatar
  • 1,857
13 votes
8 answers
534 views

Typesetting multidimensional labels

In a steam-punk multidimensional world, our boss wants to affix printed index labels to each drawer in our conglomerate's multidimensional file cabinet. The boss wants to typeset the entire label ...
user avatar
  • 27.1k
16 votes
1 answer
3k views

Ray-trace a shiny sphere

I downloaded POV-ray and rendered this shiny metal sphere 90s style: Your task is to do the same thing, but to do it by implementing the rendering engine yourself in as few bytes as possible. You don'...
user avatar
  • 7,102
3 votes
1 answer
403 views

GPS: Golfed Positioning System

Your mission, should you choose to accept it, is to write code for a GPS receiver. Input The current time, as nanoseconds from the Unix epoch. [EDIT: This is optional, please state whether you ...
user avatar
16 votes
8 answers
840 views

Tetrahedron Surface Area

The challenge This challenge is very straightforward. Given four 3-dimensional points, calculate the surface area of the tetrahedron that they form. This is code-golf, so shortest code wins. Standard ...
user avatar
  • 981
32 votes
10 answers
11k views

3D: Discrete Dogfighting Duel (Now open to non Java submissions)

UPDATE: isSuicidal() was added to the plane class, this allows you to check if a plane is on an irreversible collision course with the walls!! UPDATE: updateCoolDown() separated from simulateMove() ...
user avatar
  • 3,550
35 votes
6 answers
3k views

Check if three letters can form a "Godel-Escher-Bach cube"

This question is inspired by the cover of the book "Godel, Escher, Bach": The challenge here is to write a function that tells if three given letters can produce a 3D sculpture that can be read from ...
user avatar
  • 5,769