1

I would like to know if it is possible to define a Plot a Plot3D or any other Plot command as a graphic primitive.

For instance, I have defined a torus, and I would like to use it as a Graphics3D[] primitive with a command like

Own[torus,{x,y,z}]

where

torus = First[
   ParametricPlot3D[{(4 + Cos[2 \[Pi] v]) Sin[
       2 \[Pi] u], (4 + Cos[2 \[Pi] v]) Cos[2 \[Pi] u], 
     Sin[2 \[Pi] v]}, {u, 0, 1}, {v, 0, 1}, Boxed -> False, 
    Axes -> False, MeshFunctions -> {#3 &}, Mesh -> 0, 
    ColorFunction -> "BrownCyanTones"]];

{x, y, z} being the position of my command.

I ask this because it is elementary to do that with Latex PsTricks and I would appreciate to do this directly inside Mathematica ( if it is possible it would simplify a lot some drawings).

cyrille.piatecki
  • 4,582
  • 13
  • 26
  • 1
    Yes, but don't do it unless you know that a function that evaluates to whatever you want (instead of staying unevaluated like a primitive) is not a better solution. The usual way is to just create a function that returns a list of graphics primitives that represent the graphics object you need. – Szabolcs Apr 10 '17 at 14:35
  • Related: http://mathematica.stackexchange.com/q/111403/1871 – xzczd Apr 10 '17 at 15:08
  • Thanks for signaling that my question is a duplicate, but I stay a dummy in front of Mathematica complexity --- whith pstricks things are simpler. But I want to master mathematica could some one explain simply how to creat in my case a createPrimitive3D – cyrille.piatecki Apr 10 '17 at 16:07

0 Answers0