4
$\begingroup$

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.)

$\endgroup$
3

1 Answer 1

14
$\begingroup$

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

$\endgroup$
1
  • $\begingroup$ Awesome, thanks! $\endgroup$ Apr 26, 2012 at 14:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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