Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I know that Mathematica isn't built to model 3D, but most of my models are equation-defined so here's my question: is it somehow possible to combine ad-hoc 3D objects as well as ordinary/parametric/closed-form 3-dimensional plots into a single rendering?

I know about the ability to export and recombine elsewhere, but I don't want to do that right now. (Also, for some reason, SolidWorks crashes when importing complicated models.)

share|improve this question
2  
What kind of ad-hoc 3D objects are you using? –  belisarius Apr 26 '12 at 14:16
1  
Short answer: yes, just make sure your scales are good. See Show, Graphics3D and associated functions –  tkott Apr 26 '12 at 14:16
    
You need to look at these Wolfram Blog posts by Chrisopher Carlson : blog.wolfram.com/2009/09/11/twisted-architecture and blog.wolfram.com/2011/07/28/… –  Artes Apr 26 '12 at 14:45
add comment

1 Answer 1

up vote 14 down vote accepted

Indeed it's very easy. Just use Show. Here is an example:

adhock = Graphics3D[{Blue, Cylinder[], Red, Sphere[{0, 0, 2}], Black, 
    Thick, Dashed, 
    Line[{{-2, 0, 2}, {2, 0, 2}, {0, 0, 4}, {-2, 0, 2}}], Yellow, 
    Polygon[{{-3, -3, -2}, {-3, 3, -2}, {3, 3, -2}, {3, -3, -2}}], 
    Green, Opacity[.3], Cuboid[{-2, -2, -2}, {2, 2, -1}]}];


parametric = 
  ParametricPlot3D[{(3 + Cos[v]) Cos[u], (3 + Cos[v]) Sin[u], 
    Sin[v]}, {u, 0, 2 Pi}, {v, 0, 2 Pi}, 
   PlotStyle -> Specularity[White, 50], Mesh -> None];


Show[adhock, parametric]

Mathematica graphics

share|improve this answer
    
Awesome, thanks! –  Dmitri Nesteruk Apr 26 '12 at 14:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.