Message Boards Message Boards

0
|
3672 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:

Project a 3D surface plot onto x, y, and z planes?

Posted 4 years ago

Greetings – hope I've chosen a reasonable group for this question. I'm interested in how best to "collapse" (project) a 3D list surface plot in xyz onto each of the 3 cartesian planes. Take this example from the ListSurfacePlot3D examples:

data = ExampleData[{"Geometry3D", "StanfordBunny"}, "VertexData"];
ListSurfacePlot3D[data, MaxPlotPoints -> 50]

I'd like to create what I would call the shadows, or projections, of this 3D object onto each of the x, y, and z planes. I thought maybe (haha) I could zero out each of the coordinates in the data list (for example, {3,2,1} ? {3,2,0}) and redo ListSurfacePlot3D (no I wasn't really expecting this to work but I tried it anyway).

So what is the best way to do this? Either there is a function I can call to do this after zeroing out one of the coordinates as I was thinking, or perhaps I need to express the 3D data for object/rabbit in a different way that will then be convenient for making the projections.

POSTED BY: Stefan Jeglinski

You can zero out the points in the GraphicsComplex intead of the original data:

data = ExampleData[{"Geometry3D", "StanfordBunny"}, "VertexData"];
bn = ListSurfacePlot3D[data, MaxPlotPoints -> 50]
bn /. GraphicsComplex[pts_, other___] :> 
  GraphicsComplex[pts /. {x_Real, y_, _} :> {x, y, 0}, other]

Alternatively, you can use Scale:

Graphics3D[Scale[bn[[1]], {1, 1, 0}]]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract