6
$\begingroup$

I want to use a router to carve anamorphic projections of polyhedron wireframes onto two adjacent walls of my office. Like this:

enter image description here

In order to do this I need to transfer the positions of the vertices and edges onto my walls. Ideally I would end up with values for the positions expressed as (x,z) and (y,z) that I can transfer directly onto the wall.

Obviously, this question is related to the Rubik's cube illusion and QRcode/shopping trolley questions. However, I found it difficult to translate these examples to my current problem. Perhaps I just need the methodology explained more succinctly and/or in a more general way.

Update

I have managed to define a polyhedron in terms that will work in Dr belisarius' answer,

polyh = Map[
         Polygon, 
         PolyhedronData["RhombicDodecahedron", "VertexCoordinates"][[#]] & /@
         PolyhedronData["RhombicDodecahedron", "FaceIndices"], {1}]

The transform looks like

lin[cam_, obj_][t_] := cam t + (1 - t) obj
s[cam_, obj_] := First@Solve[lin[cam, obj][t][[3]] == 0, t];
tr[cam_, obj_] := lin[cam, obj][t] /. s[cam, obj] // FullSimplify

Graphics3D[
    polyh /. Polygon[x_] :> Polygon[tr[{10, -10, 10}, #] & /@ x], 
      Lighting -> "Neutral", ViewVector -> {{10, -10, 10}, {0, 3, 0}}, 
      Boxed -> True]

enter image description here

(Not quite sure why bounding box is 3D...?)

to create a printable projection,

Framed@Graphics[
   {EdgeForm[{Thick, Blue}], FaceForm[],
   polyh /. (Polygon[x_] :> Polygon[tr[{10, -10, 10}, #] & /@ x]) /. 
    Polygon[x_] :> Polygon[Most /@ x]}]

Progress... also, need to define two planes (x,z) and (y,z) rather than (x,y) in transform to emulate the room corner.

![enter image description here

Not yet sure how to get from here to marking lines on my wall ready for routing...

$\endgroup$
  • $\begingroup$ Is this a question about the Mathematica programming language? $\endgroup$ – David G. Stork Feb 7 '17 at 2:31
  • $\begingroup$ @DavidG.Stork, yes. $\endgroup$ – geordie Feb 7 '17 at 3:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.