# How can I define a 3d-body through different views? [closed]

In one of the maths blogs I follow I stumbled upon the following question:

The bottom, side, and front views of an object are shown below:

How would the object look in three dimensions?

My question
Is it possible to use these views and construct a 3d body out of them that you can then turn in space with Mathematica?

-

## closed as off-topic by Artes, m_goldberg, ciao, bobthechemist, Dr. belisariusMar 19 '14 at 13:24

• The question does not concern the technical computing software Mathematica by Wolfram Research. Please see the help center to find out about the topics that can be asked here.
If this question can be reworded to fit the rules in the help center, please edit the question.

This question doesn't show any effort to solve the problem in Mathematica. – Artes Mar 17 '14 at 10:26
Some pretty good (if advanced) stuff by Michael Trott here – Yves Klett Mar 17 '14 at 10:28
@Artes: This is indeed true. The challenge for me is that I normally don't use Mathematica for graphics stuff and thought this a good opportunity to get a cold start. To cut a long story short: I don't have a clue where to start but obviously the task is not so trivial after all... what a pity, but thank you anyway. – vonjd Mar 17 '14 at 10:45
I don't think the provided constraints are sufficent to fully determine the shape, but a shape that is consistent with them is found easily. It is a stack of ellipses with major axis determined by the width of the rectangle and the minor axis (at every height) determined by the triangle. With this information you should be able to build the shape using ParametricPlot3D. – Sjoerd C. de Vries Mar 17 '14 at 11:50
Note carefully that the problem as you have posed it is very far from having a complete solution. This is showcased by the two answers already present, but you could also e.g. punch a diagonal hole in both of them without changing the projections. In general, you'll need a view from an infinity of angles. This isn't quite a tomography problem, but you may find the spirit of the Radon transform useful to read about. – Emilio Pisanty Mar 17 '14 at 15:12

Let's say we have the following 3 shapes.

An isosceles triangle with base and height $(b, h)$ centered at $(x_0,z_0)$,

The shape is given by 3 equations:

$$z > z_0- h/2$$ $$z < 2 h /b (x- (x_0-b/2)) +(z_0 -h/2)$$ $$z < -( 2 h /b (x- (x_0-b/2))) -2 h -(z_0 -h/2)$$

with a rectangle with width and height set by the triangle $(b,h)$ and centered at $(y_0,z_0)$ with the following equations:

$$y_0-b/2<y<y_0 +b/2$$ $$z_0 -h/2<z<z_0 +h/2$$

And a disk with center and radius given by $((x_0,y_0),b/2)$ with its equation given by

$$(x-x_0)^2+(y-y_0)^2 < (b/2)^2$$

We can then simply place these equations in RegionPlot3D Using the center as:

{cx,cy,cz}= {0.5,0.5,0.5};


and the base and height of the triangle to be

{b,h}={1,1};


We obtain the following result

RegionPlot3D[(x - cx)^2 + (y - cx)^2 < (b/2)^2 &&
(z > cz - h/2 && (z < (2 h/b (x - (cx - b/2) )) + (cz - h/2) &&
z < -(2 h/b (x - (cx - b/2)) - 2*h - (cz - h/2))))&&(
cy-b/2<y<cy+b/2 &&cz-h/2<z<cz+h/2),
{x, 0, 1}, {y, 0, 1}, {z, 0, 1}, PlotPoints -> 100];


This should allow you to easily check other possible solutions, if they exist

-
nice clear answer +1: more thoughtful than my impulse :)...also proves not unique as many commenters have observed – ubpdqn Mar 17 '14 at 13:32
When I use it as it stands I get nothing and when I take the last semicolon away I get an empty cube?!? What am I doing wrong? – vonjd Mar 17 '14 at 14:37
@vonjd I fixed a typo in the mathematica equation, I had the radius for the circle part as r, instead of b/2, so it wasn't defined. If you find any more mistakes let me know. – lalmei Mar 17 '14 at 15:17
Now it works! Thank you, great work! – vonjd Mar 17 '14 at 15:29

I post this as for this particular "puzzle" there is a straightforward approach. However, as has been commented some evidence of attempt is the norm.

triang[x_, y_] := {{x, 0, 1}, {x, -y, 0}, {x, y, 0}}


Now visualizing for this particular isoceles triangle.

Graphics3D[{Polygon[
Table[triang[j, Sqrt[1 - j^2]], {j, -1, 1, 0.005}]],
Polygon[Table[{Cos[t], Sin[t], -1}, {t, 0, 2 Pi , 0.001}]],
Polygon[{{2, -1, 0}, {2, 1, 0}, {2, 0, 1}}],
Polygon[{{-1, -2, 0}, {1, -2, 0}, {1, -2, 1}, {-1, -2, 1}}]},
Boxed -> False, PlotRange -> All]


-
That's just... bad-ass work! +! – ciao Mar 17 '14 at 12:17
@rasher very kind: inspired by art gallery: (fbcdn-sphotos-g-a.akamaihd.net/hphotos-ak-prn2/t1.0-9/…) this scuplture was made with Staedtler pencils. – ubpdqn Mar 17 '14 at 12:34
nice! It is important to note the solution is certainly not unique. Indeed we could just combine the three polygons and get those silhouettes. – george2079 Mar 17 '14 at 12:40
@george2079 yes...just the solution that sprang to mind...could not resist posting it – ubpdqn Mar 17 '14 at 12:42
Nice work! Seems like SphericalRegion -> True could do some magic though... – István Zachar Mar 17 '14 at 13:42