3D Volume in TIKZDrawing Loops in TikZMaking a 3D colored pyramid in tikzmultiple relative positioning in tikzRotating rectangle node in tikz without getting the right angleThree dimensional Regression Plan with ResidualsHelp with drawing tikz diagrams of worldsheet topologiestikz: fancy polyhedron in three dimensional spaceLatex Tikz - Process flow imageDraw curve in the plane by using tikzDrawing a DNA/SNP genome double helix in TikZ

How can I roleplay a follower-type character when I as a player have a leader-type personality?

Has a commercial or military jet bi-plane ever been manufactured?

I need a disease

Something that can be activated/enabled

Where can I go to avoid planes overhead?

How do LIGO and VIRGO know that a gravitational wave has its origin in a neutron star or a black hole?

Is there a word that describe the non-justified use of a more complex word?

Word for Food that's Gone 'Bad', but is Still Edible?

Where are the "shires" in the UK?

What was Bran's plan to kill the Night King?

US born but as a child of foreign diplomat

Can there be a single technologically advanced nation, in a continent full of non-technologically advanced nations?

A factorization game

Why do people keep telling me that I am a bad photographer?

ZSPL language, anyone heard of it?

Decoupling cap routing on a 4 layer PCB

Copy previous line to current line from text file

Nominativ or Akkusativ

Appropriate certificate to ask for a fibre installation (ANSI/TIA-568.3-D?)

Floor of Riemann zeta function

How to write a 12-bar blues melody

How can internet speed be 10 times slower without a router than when using a router?

IP addresses from public IP block in my LAN

Do I add modifiers to the Charisma check roll of 15 granted by the Glibness spell?



3D Volume in TIKZ


Drawing Loops in TikZMaking a 3D colored pyramid in tikzmultiple relative positioning in tikzRotating rectangle node in tikz without getting the right angleThree dimensional Regression Plan with ResidualsHelp with drawing tikz diagrams of worldsheet topologiestikz: fancy polyhedron in three dimensional spaceLatex Tikz - Process flow imageDraw curve in the plane by using tikzDrawing a DNA/SNP genome double helix in TikZ













1















enter image description here



I need to make the square base volume below any function in a three-dimensional space.
It can be any function.
I need help getting this job started.
The image is bad, but that's the idea.










share|improve this question







New contributor




Ícaro Viterbre is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 3





    Welcome to TeX.SE! What have you tried so far?

    – Kurt
    3 hours ago















1















enter image description here



I need to make the square base volume below any function in a three-dimensional space.
It can be any function.
I need help getting this job started.
The image is bad, but that's the idea.










share|improve this question







New contributor




Ícaro Viterbre is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 3





    Welcome to TeX.SE! What have you tried so far?

    – Kurt
    3 hours ago













1












1








1








enter image description here



I need to make the square base volume below any function in a three-dimensional space.
It can be any function.
I need help getting this job started.
The image is bad, but that's the idea.










share|improve this question







New contributor




Ícaro Viterbre is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












enter image description here



I need to make the square base volume below any function in a three-dimensional space.
It can be any function.
I need help getting this job started.
The image is bad, but that's the idea.







tikz-pgf






share|improve this question







New contributor




Ícaro Viterbre is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




Ícaro Viterbre is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




Ícaro Viterbre is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 4 hours ago









Ícaro ViterbreÍcaro Viterbre

61




61




New contributor




Ícaro Viterbre is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Ícaro Viterbre is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Ícaro Viterbre is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







  • 3





    Welcome to TeX.SE! What have you tried so far?

    – Kurt
    3 hours ago












  • 3





    Welcome to TeX.SE! What have you tried so far?

    – Kurt
    3 hours ago







3




3





Welcome to TeX.SE! What have you tried so far?

– Kurt
3 hours ago





Welcome to TeX.SE! What have you tried so far?

– Kurt
3 hours ago










2 Answers
2






active

oldest

votes


















4














The tikz-3dplot package allows you to draw things in 3d and perform orthographic projections.



documentclass[tikz,border=3.14mm]standalone
usepackagetikz-3dplot
begindocument
tdplotsetmaincoords60110
begintikzpicture[tdplot_main_coords,>=stealth,declare function=%
pfft(x)=pi+0.3*sin(deg(x));]
draw[->] (0,0,0) coordinate (O) -- (5,0,0) coordinate(X) node[pos=1.1]$x$;
draw[->] (O) -- (0,5,0) node[pos=1.1]$y$;
draw[->] (O) -- (0,0,5) node[pos=1.1]$z$;
draw[thick] plot[variable=x,domain=0.8*pi:1.1*pi,smooth] (2.2,x,pfft(2*x))
coordinate (T1)--
plot[variable=x,domain=1.1*pi:0.8*pi,smooth] (0.8,x,pfft(2*x)) coordinate
(T3)-- cycle;
draw (2.2,0.8*pi,0) coordinate (B4)-- (2.2,1.1*pi,0) coordinate (B1)
-- (0.8,1.1*pi,0) coordinate (B2) -- (0.8,0.8*pi,0) coordinate (B3) -- cycle;
path (2.2,0.8*pi,pfft(2*0.8*pi)) coordinate (T4)
(0.8,1.1*pi,pfft(2*1.1*pi)) coordinate (T2);
foreach X in 1,...,4
draw (BX) -- (TX);
path[opacity=0.3,left color=blue,right color=blue,middle color=blue!20,shading
angle=72]
plot[variable=x,domain=0:1.1*pi,smooth] (3,x,pfft(2*x)) --
plot[variable=x,domain=1.1*pi:0,smooth] (0,x,pfft(2*x)) -- cycle;
path[opacity=0.3,left color=blue,right color=blue,middle color=blue!20,shading
angle=72]
plot[variable=x,domain=1.1*pi:2.2*pi,smooth] (3,x,pfft(2*x)) --
plot[variable=x,domain=2.2*pi:1.1*pi,smooth] (0,x,pfft(2*x)) -- cycle;
draw plot[variable=x,domain=0:2.2*pi,smooth] (3,x,pfft(2*x)) --
plot[variable=x,domain=2.2*pi:0,smooth] (0,x,pfft(2*x)) -- cycle;
endtikzpicture
enddocument


enter image description here



You may want to store the parameters in pgf keys.



documentclass[tikz,border=3.14mm]standalone
usepackagetikz-3dplot
begindocument
tdplotsetmaincoords60110
foreach X in 0,...,35
pgfmathsetmacroObjymax1.6*pi+0.5*sin(10*X)*pi
begintikzpicture[tdplot_main_coords,>=stealth,declare function=%
pfft(x)=2+0.3*sin(deg(x));,/tikz/3D surface/.cd,
ymin/.initial=0,ymax/.initial=2.2*pi,xmin/.initial=1,xmax/.initial=4,
/tikz/3D object/.cd,
ymin/.initial=0.8*pi,ymax/.initial=Objymax,xmin/.initial=1.8,xmax/.initial=3.2]
draw[->] (0,0,0) coordinate (O) -- (5,0,0) coordinate(X) node[pos=1.1]$x$;
draw[->] (O) -- (0,5,0) node[pos=1.1]$y$;
draw[->] (O) -- (0,0,5) node[pos=1.1]$z$;
draw[thick] plot[variable=x,domain=pgfkeysvalueof/tikz/3D object/ymin:pgfkeysvalueof/tikz/3D object/ymax,smooth]
(pgfkeysvalueof/tikz/3D object/xmax,x,pfft(2*x))
coordinate (T1)--
plot[variable=x,domain=pgfkeysvalueof/tikz/3D object/ymax:pgfkeysvalueof/tikz/3D object/ymin,smooth]
(pgfkeysvalueof/tikz/3D object/xmin,x,pfft(2*x)) coordinate
(T3)-- cycle;
draw (pgfkeysvalueof/tikz/3D object/xmax,pgfkeysvalueof/tikz/3D object/ymin,0) coordinate (B4)--
(pgfkeysvalueof/tikz/3D object/xmax,pgfkeysvalueof/tikz/3D
object/ymax,0) coordinate (B1)
-- (pgfkeysvalueof/tikz/3D object/xmin,pgfkeysvalueof/tikz/3D object/ymax,0) coordinate (B2) -- (pgfkeysvalueof/tikz/3D object/xmin,pgfkeysvalueof/tikz/3D object/ymin,0) coordinate (B3) -- cycle;
path (pgfkeysvalueof/tikz/3D object/xmax,pgfkeysvalueof/tikz/3D object/ymin,pfft(2*pgfkeysvalueof/tikz/3D object/ymin)) coordinate (T4)
(pgfkeysvalueof/tikz/3D object/xmin,pgfkeysvalueof/tikz/3D
object/ymax,pfft(2*pgfkeysvalueof/tikz/3D object/ymax)) coordinate (T2);
foreach X in 1,...,4
draw (BX) -- (TX);
path[opacity=0.3,left color=blue,right color=blue,middle color=blue!20,shading
angle=72]
plot[variable=x,domain=pgfkeysvalueof/tikz/3D surface/ymin:(pgfkeysvalueof/tikz/3D
surface/ymax+pgfkeysvalueof/tikz/3D surface/ymin)/2,smooth]
(pgfkeysvalueof/tikz/3D surface/xmax,x,pfft(2*x)) --
plot[variable=x,domain=(pgfkeysvalueof/tikz/3D
surface/ymax+pgfkeysvalueof/tikz/3D surface/ymin)/2:pgfkeysvalueof/tikz/3D surface/ymin,smooth] (pgfkeysvalueof/tikz/3D surface/xmin,x,pfft(2*x)) -- cycle;
path[opacity=0.3,left color=blue,right color=blue,middle color=blue!20,shading
angle=72]
plot[variable=x,domain=(pgfkeysvalueof/tikz/3D
surface/ymax+pgfkeysvalueof/tikz/3D surface/ymin)/2:pgfkeysvalueof/tikz/3D surface/ymax,smooth]
(pgfkeysvalueof/tikz/3D surface/xmax,x,pfft(2*x)) --
plot[variable=x,domain=pgfkeysvalueof/tikz/3D surface/ymax:(pgfkeysvalueof/tikz/3D
surface/ymax+pgfkeysvalueof/tikz/3D surface/ymin)/2,smooth] (pgfkeysvalueof/tikz/3D surface/xmin,x,pfft(2*x)) -- cycle;
draw plot[variable=x,domain=pgfkeysvalueof/tikz/3D surface/ymin:pgfkeysvalueof/tikz/3D surface/ymax,smooth]
(pgfkeysvalueof/tikz/3D surface/xmax,x,pfft(2*x)) --
plot[variable=x,domain=pgfkeysvalueof/tikz/3D surface/ymax:pgfkeysvalueof/tikz/3D surface/ymin,smooth]
(pgfkeysvalueof/tikz/3D surface/xmin,x,pfft(2*x)) -- cycle;
endtikzpicture
enddocument


enter image description here






share|improve this answer
































    2














    enter image description here



    To help you get started:



    documentclassarticle


    usepackagetikz



    begindocument

    begintikzpicture[x=(210:1cm),y=(0:1cm),z=(90:1cm)]
    draw (0,0,0) -- (3,0,0) -- (3,3,0)--(0,3,0)--cycle;
    draw (3,0,0) -- (3,0,4) .. controls (3,1,3.5) and (3,2,3) .. (3,3,3) -- (3,3,0);
    draw (3,3,3) .. controls (2,3,3) and (1,3,5) .. (0,3,5)--(0,3,0);
    draw (0,3,5) .. controls (0,2,4) and (0,1,4) .. (0,0,4)--(0,0,0);
    draw (0,0,4) -- (3,0,4);
    endtikzpicture
    enddocument





    share|improve this answer























      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "85"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );






      Ícaro Viterbre is a new contributor. Be nice, and check out our Code of Conduct.









      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f488865%2f3d-volume-in-tikz%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      4














      The tikz-3dplot package allows you to draw things in 3d and perform orthographic projections.



      documentclass[tikz,border=3.14mm]standalone
      usepackagetikz-3dplot
      begindocument
      tdplotsetmaincoords60110
      begintikzpicture[tdplot_main_coords,>=stealth,declare function=%
      pfft(x)=pi+0.3*sin(deg(x));]
      draw[->] (0,0,0) coordinate (O) -- (5,0,0) coordinate(X) node[pos=1.1]$x$;
      draw[->] (O) -- (0,5,0) node[pos=1.1]$y$;
      draw[->] (O) -- (0,0,5) node[pos=1.1]$z$;
      draw[thick] plot[variable=x,domain=0.8*pi:1.1*pi,smooth] (2.2,x,pfft(2*x))
      coordinate (T1)--
      plot[variable=x,domain=1.1*pi:0.8*pi,smooth] (0.8,x,pfft(2*x)) coordinate
      (T3)-- cycle;
      draw (2.2,0.8*pi,0) coordinate (B4)-- (2.2,1.1*pi,0) coordinate (B1)
      -- (0.8,1.1*pi,0) coordinate (B2) -- (0.8,0.8*pi,0) coordinate (B3) -- cycle;
      path (2.2,0.8*pi,pfft(2*0.8*pi)) coordinate (T4)
      (0.8,1.1*pi,pfft(2*1.1*pi)) coordinate (T2);
      foreach X in 1,...,4
      draw (BX) -- (TX);
      path[opacity=0.3,left color=blue,right color=blue,middle color=blue!20,shading
      angle=72]
      plot[variable=x,domain=0:1.1*pi,smooth] (3,x,pfft(2*x)) --
      plot[variable=x,domain=1.1*pi:0,smooth] (0,x,pfft(2*x)) -- cycle;
      path[opacity=0.3,left color=blue,right color=blue,middle color=blue!20,shading
      angle=72]
      plot[variable=x,domain=1.1*pi:2.2*pi,smooth] (3,x,pfft(2*x)) --
      plot[variable=x,domain=2.2*pi:1.1*pi,smooth] (0,x,pfft(2*x)) -- cycle;
      draw plot[variable=x,domain=0:2.2*pi,smooth] (3,x,pfft(2*x)) --
      plot[variable=x,domain=2.2*pi:0,smooth] (0,x,pfft(2*x)) -- cycle;
      endtikzpicture
      enddocument


      enter image description here



      You may want to store the parameters in pgf keys.



      documentclass[tikz,border=3.14mm]standalone
      usepackagetikz-3dplot
      begindocument
      tdplotsetmaincoords60110
      foreach X in 0,...,35
      pgfmathsetmacroObjymax1.6*pi+0.5*sin(10*X)*pi
      begintikzpicture[tdplot_main_coords,>=stealth,declare function=%
      pfft(x)=2+0.3*sin(deg(x));,/tikz/3D surface/.cd,
      ymin/.initial=0,ymax/.initial=2.2*pi,xmin/.initial=1,xmax/.initial=4,
      /tikz/3D object/.cd,
      ymin/.initial=0.8*pi,ymax/.initial=Objymax,xmin/.initial=1.8,xmax/.initial=3.2]
      draw[->] (0,0,0) coordinate (O) -- (5,0,0) coordinate(X) node[pos=1.1]$x$;
      draw[->] (O) -- (0,5,0) node[pos=1.1]$y$;
      draw[->] (O) -- (0,0,5) node[pos=1.1]$z$;
      draw[thick] plot[variable=x,domain=pgfkeysvalueof/tikz/3D object/ymin:pgfkeysvalueof/tikz/3D object/ymax,smooth]
      (pgfkeysvalueof/tikz/3D object/xmax,x,pfft(2*x))
      coordinate (T1)--
      plot[variable=x,domain=pgfkeysvalueof/tikz/3D object/ymax:pgfkeysvalueof/tikz/3D object/ymin,smooth]
      (pgfkeysvalueof/tikz/3D object/xmin,x,pfft(2*x)) coordinate
      (T3)-- cycle;
      draw (pgfkeysvalueof/tikz/3D object/xmax,pgfkeysvalueof/tikz/3D object/ymin,0) coordinate (B4)--
      (pgfkeysvalueof/tikz/3D object/xmax,pgfkeysvalueof/tikz/3D
      object/ymax,0) coordinate (B1)
      -- (pgfkeysvalueof/tikz/3D object/xmin,pgfkeysvalueof/tikz/3D object/ymax,0) coordinate (B2) -- (pgfkeysvalueof/tikz/3D object/xmin,pgfkeysvalueof/tikz/3D object/ymin,0) coordinate (B3) -- cycle;
      path (pgfkeysvalueof/tikz/3D object/xmax,pgfkeysvalueof/tikz/3D object/ymin,pfft(2*pgfkeysvalueof/tikz/3D object/ymin)) coordinate (T4)
      (pgfkeysvalueof/tikz/3D object/xmin,pgfkeysvalueof/tikz/3D
      object/ymax,pfft(2*pgfkeysvalueof/tikz/3D object/ymax)) coordinate (T2);
      foreach X in 1,...,4
      draw (BX) -- (TX);
      path[opacity=0.3,left color=blue,right color=blue,middle color=blue!20,shading
      angle=72]
      plot[variable=x,domain=pgfkeysvalueof/tikz/3D surface/ymin:(pgfkeysvalueof/tikz/3D
      surface/ymax+pgfkeysvalueof/tikz/3D surface/ymin)/2,smooth]
      (pgfkeysvalueof/tikz/3D surface/xmax,x,pfft(2*x)) --
      plot[variable=x,domain=(pgfkeysvalueof/tikz/3D
      surface/ymax+pgfkeysvalueof/tikz/3D surface/ymin)/2:pgfkeysvalueof/tikz/3D surface/ymin,smooth] (pgfkeysvalueof/tikz/3D surface/xmin,x,pfft(2*x)) -- cycle;
      path[opacity=0.3,left color=blue,right color=blue,middle color=blue!20,shading
      angle=72]
      plot[variable=x,domain=(pgfkeysvalueof/tikz/3D
      surface/ymax+pgfkeysvalueof/tikz/3D surface/ymin)/2:pgfkeysvalueof/tikz/3D surface/ymax,smooth]
      (pgfkeysvalueof/tikz/3D surface/xmax,x,pfft(2*x)) --
      plot[variable=x,domain=pgfkeysvalueof/tikz/3D surface/ymax:(pgfkeysvalueof/tikz/3D
      surface/ymax+pgfkeysvalueof/tikz/3D surface/ymin)/2,smooth] (pgfkeysvalueof/tikz/3D surface/xmin,x,pfft(2*x)) -- cycle;
      draw plot[variable=x,domain=pgfkeysvalueof/tikz/3D surface/ymin:pgfkeysvalueof/tikz/3D surface/ymax,smooth]
      (pgfkeysvalueof/tikz/3D surface/xmax,x,pfft(2*x)) --
      plot[variable=x,domain=pgfkeysvalueof/tikz/3D surface/ymax:pgfkeysvalueof/tikz/3D surface/ymin,smooth]
      (pgfkeysvalueof/tikz/3D surface/xmin,x,pfft(2*x)) -- cycle;
      endtikzpicture
      enddocument


      enter image description here






      share|improve this answer





























        4














        The tikz-3dplot package allows you to draw things in 3d and perform orthographic projections.



        documentclass[tikz,border=3.14mm]standalone
        usepackagetikz-3dplot
        begindocument
        tdplotsetmaincoords60110
        begintikzpicture[tdplot_main_coords,>=stealth,declare function=%
        pfft(x)=pi+0.3*sin(deg(x));]
        draw[->] (0,0,0) coordinate (O) -- (5,0,0) coordinate(X) node[pos=1.1]$x$;
        draw[->] (O) -- (0,5,0) node[pos=1.1]$y$;
        draw[->] (O) -- (0,0,5) node[pos=1.1]$z$;
        draw[thick] plot[variable=x,domain=0.8*pi:1.1*pi,smooth] (2.2,x,pfft(2*x))
        coordinate (T1)--
        plot[variable=x,domain=1.1*pi:0.8*pi,smooth] (0.8,x,pfft(2*x)) coordinate
        (T3)-- cycle;
        draw (2.2,0.8*pi,0) coordinate (B4)-- (2.2,1.1*pi,0) coordinate (B1)
        -- (0.8,1.1*pi,0) coordinate (B2) -- (0.8,0.8*pi,0) coordinate (B3) -- cycle;
        path (2.2,0.8*pi,pfft(2*0.8*pi)) coordinate (T4)
        (0.8,1.1*pi,pfft(2*1.1*pi)) coordinate (T2);
        foreach X in 1,...,4
        draw (BX) -- (TX);
        path[opacity=0.3,left color=blue,right color=blue,middle color=blue!20,shading
        angle=72]
        plot[variable=x,domain=0:1.1*pi,smooth] (3,x,pfft(2*x)) --
        plot[variable=x,domain=1.1*pi:0,smooth] (0,x,pfft(2*x)) -- cycle;
        path[opacity=0.3,left color=blue,right color=blue,middle color=blue!20,shading
        angle=72]
        plot[variable=x,domain=1.1*pi:2.2*pi,smooth] (3,x,pfft(2*x)) --
        plot[variable=x,domain=2.2*pi:1.1*pi,smooth] (0,x,pfft(2*x)) -- cycle;
        draw plot[variable=x,domain=0:2.2*pi,smooth] (3,x,pfft(2*x)) --
        plot[variable=x,domain=2.2*pi:0,smooth] (0,x,pfft(2*x)) -- cycle;
        endtikzpicture
        enddocument


        enter image description here



        You may want to store the parameters in pgf keys.



        documentclass[tikz,border=3.14mm]standalone
        usepackagetikz-3dplot
        begindocument
        tdplotsetmaincoords60110
        foreach X in 0,...,35
        pgfmathsetmacroObjymax1.6*pi+0.5*sin(10*X)*pi
        begintikzpicture[tdplot_main_coords,>=stealth,declare function=%
        pfft(x)=2+0.3*sin(deg(x));,/tikz/3D surface/.cd,
        ymin/.initial=0,ymax/.initial=2.2*pi,xmin/.initial=1,xmax/.initial=4,
        /tikz/3D object/.cd,
        ymin/.initial=0.8*pi,ymax/.initial=Objymax,xmin/.initial=1.8,xmax/.initial=3.2]
        draw[->] (0,0,0) coordinate (O) -- (5,0,0) coordinate(X) node[pos=1.1]$x$;
        draw[->] (O) -- (0,5,0) node[pos=1.1]$y$;
        draw[->] (O) -- (0,0,5) node[pos=1.1]$z$;
        draw[thick] plot[variable=x,domain=pgfkeysvalueof/tikz/3D object/ymin:pgfkeysvalueof/tikz/3D object/ymax,smooth]
        (pgfkeysvalueof/tikz/3D object/xmax,x,pfft(2*x))
        coordinate (T1)--
        plot[variable=x,domain=pgfkeysvalueof/tikz/3D object/ymax:pgfkeysvalueof/tikz/3D object/ymin,smooth]
        (pgfkeysvalueof/tikz/3D object/xmin,x,pfft(2*x)) coordinate
        (T3)-- cycle;
        draw (pgfkeysvalueof/tikz/3D object/xmax,pgfkeysvalueof/tikz/3D object/ymin,0) coordinate (B4)--
        (pgfkeysvalueof/tikz/3D object/xmax,pgfkeysvalueof/tikz/3D
        object/ymax,0) coordinate (B1)
        -- (pgfkeysvalueof/tikz/3D object/xmin,pgfkeysvalueof/tikz/3D object/ymax,0) coordinate (B2) -- (pgfkeysvalueof/tikz/3D object/xmin,pgfkeysvalueof/tikz/3D object/ymin,0) coordinate (B3) -- cycle;
        path (pgfkeysvalueof/tikz/3D object/xmax,pgfkeysvalueof/tikz/3D object/ymin,pfft(2*pgfkeysvalueof/tikz/3D object/ymin)) coordinate (T4)
        (pgfkeysvalueof/tikz/3D object/xmin,pgfkeysvalueof/tikz/3D
        object/ymax,pfft(2*pgfkeysvalueof/tikz/3D object/ymax)) coordinate (T2);
        foreach X in 1,...,4
        draw (BX) -- (TX);
        path[opacity=0.3,left color=blue,right color=blue,middle color=blue!20,shading
        angle=72]
        plot[variable=x,domain=pgfkeysvalueof/tikz/3D surface/ymin:(pgfkeysvalueof/tikz/3D
        surface/ymax+pgfkeysvalueof/tikz/3D surface/ymin)/2,smooth]
        (pgfkeysvalueof/tikz/3D surface/xmax,x,pfft(2*x)) --
        plot[variable=x,domain=(pgfkeysvalueof/tikz/3D
        surface/ymax+pgfkeysvalueof/tikz/3D surface/ymin)/2:pgfkeysvalueof/tikz/3D surface/ymin,smooth] (pgfkeysvalueof/tikz/3D surface/xmin,x,pfft(2*x)) -- cycle;
        path[opacity=0.3,left color=blue,right color=blue,middle color=blue!20,shading
        angle=72]
        plot[variable=x,domain=(pgfkeysvalueof/tikz/3D
        surface/ymax+pgfkeysvalueof/tikz/3D surface/ymin)/2:pgfkeysvalueof/tikz/3D surface/ymax,smooth]
        (pgfkeysvalueof/tikz/3D surface/xmax,x,pfft(2*x)) --
        plot[variable=x,domain=pgfkeysvalueof/tikz/3D surface/ymax:(pgfkeysvalueof/tikz/3D
        surface/ymax+pgfkeysvalueof/tikz/3D surface/ymin)/2,smooth] (pgfkeysvalueof/tikz/3D surface/xmin,x,pfft(2*x)) -- cycle;
        draw plot[variable=x,domain=pgfkeysvalueof/tikz/3D surface/ymin:pgfkeysvalueof/tikz/3D surface/ymax,smooth]
        (pgfkeysvalueof/tikz/3D surface/xmax,x,pfft(2*x)) --
        plot[variable=x,domain=pgfkeysvalueof/tikz/3D surface/ymax:pgfkeysvalueof/tikz/3D surface/ymin,smooth]
        (pgfkeysvalueof/tikz/3D surface/xmin,x,pfft(2*x)) -- cycle;
        endtikzpicture
        enddocument


        enter image description here






        share|improve this answer



























          4












          4








          4







          The tikz-3dplot package allows you to draw things in 3d and perform orthographic projections.



          documentclass[tikz,border=3.14mm]standalone
          usepackagetikz-3dplot
          begindocument
          tdplotsetmaincoords60110
          begintikzpicture[tdplot_main_coords,>=stealth,declare function=%
          pfft(x)=pi+0.3*sin(deg(x));]
          draw[->] (0,0,0) coordinate (O) -- (5,0,0) coordinate(X) node[pos=1.1]$x$;
          draw[->] (O) -- (0,5,0) node[pos=1.1]$y$;
          draw[->] (O) -- (0,0,5) node[pos=1.1]$z$;
          draw[thick] plot[variable=x,domain=0.8*pi:1.1*pi,smooth] (2.2,x,pfft(2*x))
          coordinate (T1)--
          plot[variable=x,domain=1.1*pi:0.8*pi,smooth] (0.8,x,pfft(2*x)) coordinate
          (T3)-- cycle;
          draw (2.2,0.8*pi,0) coordinate (B4)-- (2.2,1.1*pi,0) coordinate (B1)
          -- (0.8,1.1*pi,0) coordinate (B2) -- (0.8,0.8*pi,0) coordinate (B3) -- cycle;
          path (2.2,0.8*pi,pfft(2*0.8*pi)) coordinate (T4)
          (0.8,1.1*pi,pfft(2*1.1*pi)) coordinate (T2);
          foreach X in 1,...,4
          draw (BX) -- (TX);
          path[opacity=0.3,left color=blue,right color=blue,middle color=blue!20,shading
          angle=72]
          plot[variable=x,domain=0:1.1*pi,smooth] (3,x,pfft(2*x)) --
          plot[variable=x,domain=1.1*pi:0,smooth] (0,x,pfft(2*x)) -- cycle;
          path[opacity=0.3,left color=blue,right color=blue,middle color=blue!20,shading
          angle=72]
          plot[variable=x,domain=1.1*pi:2.2*pi,smooth] (3,x,pfft(2*x)) --
          plot[variable=x,domain=2.2*pi:1.1*pi,smooth] (0,x,pfft(2*x)) -- cycle;
          draw plot[variable=x,domain=0:2.2*pi,smooth] (3,x,pfft(2*x)) --
          plot[variable=x,domain=2.2*pi:0,smooth] (0,x,pfft(2*x)) -- cycle;
          endtikzpicture
          enddocument


          enter image description here



          You may want to store the parameters in pgf keys.



          documentclass[tikz,border=3.14mm]standalone
          usepackagetikz-3dplot
          begindocument
          tdplotsetmaincoords60110
          foreach X in 0,...,35
          pgfmathsetmacroObjymax1.6*pi+0.5*sin(10*X)*pi
          begintikzpicture[tdplot_main_coords,>=stealth,declare function=%
          pfft(x)=2+0.3*sin(deg(x));,/tikz/3D surface/.cd,
          ymin/.initial=0,ymax/.initial=2.2*pi,xmin/.initial=1,xmax/.initial=4,
          /tikz/3D object/.cd,
          ymin/.initial=0.8*pi,ymax/.initial=Objymax,xmin/.initial=1.8,xmax/.initial=3.2]
          draw[->] (0,0,0) coordinate (O) -- (5,0,0) coordinate(X) node[pos=1.1]$x$;
          draw[->] (O) -- (0,5,0) node[pos=1.1]$y$;
          draw[->] (O) -- (0,0,5) node[pos=1.1]$z$;
          draw[thick] plot[variable=x,domain=pgfkeysvalueof/tikz/3D object/ymin:pgfkeysvalueof/tikz/3D object/ymax,smooth]
          (pgfkeysvalueof/tikz/3D object/xmax,x,pfft(2*x))
          coordinate (T1)--
          plot[variable=x,domain=pgfkeysvalueof/tikz/3D object/ymax:pgfkeysvalueof/tikz/3D object/ymin,smooth]
          (pgfkeysvalueof/tikz/3D object/xmin,x,pfft(2*x)) coordinate
          (T3)-- cycle;
          draw (pgfkeysvalueof/tikz/3D object/xmax,pgfkeysvalueof/tikz/3D object/ymin,0) coordinate (B4)--
          (pgfkeysvalueof/tikz/3D object/xmax,pgfkeysvalueof/tikz/3D
          object/ymax,0) coordinate (B1)
          -- (pgfkeysvalueof/tikz/3D object/xmin,pgfkeysvalueof/tikz/3D object/ymax,0) coordinate (B2) -- (pgfkeysvalueof/tikz/3D object/xmin,pgfkeysvalueof/tikz/3D object/ymin,0) coordinate (B3) -- cycle;
          path (pgfkeysvalueof/tikz/3D object/xmax,pgfkeysvalueof/tikz/3D object/ymin,pfft(2*pgfkeysvalueof/tikz/3D object/ymin)) coordinate (T4)
          (pgfkeysvalueof/tikz/3D object/xmin,pgfkeysvalueof/tikz/3D
          object/ymax,pfft(2*pgfkeysvalueof/tikz/3D object/ymax)) coordinate (T2);
          foreach X in 1,...,4
          draw (BX) -- (TX);
          path[opacity=0.3,left color=blue,right color=blue,middle color=blue!20,shading
          angle=72]
          plot[variable=x,domain=pgfkeysvalueof/tikz/3D surface/ymin:(pgfkeysvalueof/tikz/3D
          surface/ymax+pgfkeysvalueof/tikz/3D surface/ymin)/2,smooth]
          (pgfkeysvalueof/tikz/3D surface/xmax,x,pfft(2*x)) --
          plot[variable=x,domain=(pgfkeysvalueof/tikz/3D
          surface/ymax+pgfkeysvalueof/tikz/3D surface/ymin)/2:pgfkeysvalueof/tikz/3D surface/ymin,smooth] (pgfkeysvalueof/tikz/3D surface/xmin,x,pfft(2*x)) -- cycle;
          path[opacity=0.3,left color=blue,right color=blue,middle color=blue!20,shading
          angle=72]
          plot[variable=x,domain=(pgfkeysvalueof/tikz/3D
          surface/ymax+pgfkeysvalueof/tikz/3D surface/ymin)/2:pgfkeysvalueof/tikz/3D surface/ymax,smooth]
          (pgfkeysvalueof/tikz/3D surface/xmax,x,pfft(2*x)) --
          plot[variable=x,domain=pgfkeysvalueof/tikz/3D surface/ymax:(pgfkeysvalueof/tikz/3D
          surface/ymax+pgfkeysvalueof/tikz/3D surface/ymin)/2,smooth] (pgfkeysvalueof/tikz/3D surface/xmin,x,pfft(2*x)) -- cycle;
          draw plot[variable=x,domain=pgfkeysvalueof/tikz/3D surface/ymin:pgfkeysvalueof/tikz/3D surface/ymax,smooth]
          (pgfkeysvalueof/tikz/3D surface/xmax,x,pfft(2*x)) --
          plot[variable=x,domain=pgfkeysvalueof/tikz/3D surface/ymax:pgfkeysvalueof/tikz/3D surface/ymin,smooth]
          (pgfkeysvalueof/tikz/3D surface/xmin,x,pfft(2*x)) -- cycle;
          endtikzpicture
          enddocument


          enter image description here






          share|improve this answer















          The tikz-3dplot package allows you to draw things in 3d and perform orthographic projections.



          documentclass[tikz,border=3.14mm]standalone
          usepackagetikz-3dplot
          begindocument
          tdplotsetmaincoords60110
          begintikzpicture[tdplot_main_coords,>=stealth,declare function=%
          pfft(x)=pi+0.3*sin(deg(x));]
          draw[->] (0,0,0) coordinate (O) -- (5,0,0) coordinate(X) node[pos=1.1]$x$;
          draw[->] (O) -- (0,5,0) node[pos=1.1]$y$;
          draw[->] (O) -- (0,0,5) node[pos=1.1]$z$;
          draw[thick] plot[variable=x,domain=0.8*pi:1.1*pi,smooth] (2.2,x,pfft(2*x))
          coordinate (T1)--
          plot[variable=x,domain=1.1*pi:0.8*pi,smooth] (0.8,x,pfft(2*x)) coordinate
          (T3)-- cycle;
          draw (2.2,0.8*pi,0) coordinate (B4)-- (2.2,1.1*pi,0) coordinate (B1)
          -- (0.8,1.1*pi,0) coordinate (B2) -- (0.8,0.8*pi,0) coordinate (B3) -- cycle;
          path (2.2,0.8*pi,pfft(2*0.8*pi)) coordinate (T4)
          (0.8,1.1*pi,pfft(2*1.1*pi)) coordinate (T2);
          foreach X in 1,...,4
          draw (BX) -- (TX);
          path[opacity=0.3,left color=blue,right color=blue,middle color=blue!20,shading
          angle=72]
          plot[variable=x,domain=0:1.1*pi,smooth] (3,x,pfft(2*x)) --
          plot[variable=x,domain=1.1*pi:0,smooth] (0,x,pfft(2*x)) -- cycle;
          path[opacity=0.3,left color=blue,right color=blue,middle color=blue!20,shading
          angle=72]
          plot[variable=x,domain=1.1*pi:2.2*pi,smooth] (3,x,pfft(2*x)) --
          plot[variable=x,domain=2.2*pi:1.1*pi,smooth] (0,x,pfft(2*x)) -- cycle;
          draw plot[variable=x,domain=0:2.2*pi,smooth] (3,x,pfft(2*x)) --
          plot[variable=x,domain=2.2*pi:0,smooth] (0,x,pfft(2*x)) -- cycle;
          endtikzpicture
          enddocument


          enter image description here



          You may want to store the parameters in pgf keys.



          documentclass[tikz,border=3.14mm]standalone
          usepackagetikz-3dplot
          begindocument
          tdplotsetmaincoords60110
          foreach X in 0,...,35
          pgfmathsetmacroObjymax1.6*pi+0.5*sin(10*X)*pi
          begintikzpicture[tdplot_main_coords,>=stealth,declare function=%
          pfft(x)=2+0.3*sin(deg(x));,/tikz/3D surface/.cd,
          ymin/.initial=0,ymax/.initial=2.2*pi,xmin/.initial=1,xmax/.initial=4,
          /tikz/3D object/.cd,
          ymin/.initial=0.8*pi,ymax/.initial=Objymax,xmin/.initial=1.8,xmax/.initial=3.2]
          draw[->] (0,0,0) coordinate (O) -- (5,0,0) coordinate(X) node[pos=1.1]$x$;
          draw[->] (O) -- (0,5,0) node[pos=1.1]$y$;
          draw[->] (O) -- (0,0,5) node[pos=1.1]$z$;
          draw[thick] plot[variable=x,domain=pgfkeysvalueof/tikz/3D object/ymin:pgfkeysvalueof/tikz/3D object/ymax,smooth]
          (pgfkeysvalueof/tikz/3D object/xmax,x,pfft(2*x))
          coordinate (T1)--
          plot[variable=x,domain=pgfkeysvalueof/tikz/3D object/ymax:pgfkeysvalueof/tikz/3D object/ymin,smooth]
          (pgfkeysvalueof/tikz/3D object/xmin,x,pfft(2*x)) coordinate
          (T3)-- cycle;
          draw (pgfkeysvalueof/tikz/3D object/xmax,pgfkeysvalueof/tikz/3D object/ymin,0) coordinate (B4)--
          (pgfkeysvalueof/tikz/3D object/xmax,pgfkeysvalueof/tikz/3D
          object/ymax,0) coordinate (B1)
          -- (pgfkeysvalueof/tikz/3D object/xmin,pgfkeysvalueof/tikz/3D object/ymax,0) coordinate (B2) -- (pgfkeysvalueof/tikz/3D object/xmin,pgfkeysvalueof/tikz/3D object/ymin,0) coordinate (B3) -- cycle;
          path (pgfkeysvalueof/tikz/3D object/xmax,pgfkeysvalueof/tikz/3D object/ymin,pfft(2*pgfkeysvalueof/tikz/3D object/ymin)) coordinate (T4)
          (pgfkeysvalueof/tikz/3D object/xmin,pgfkeysvalueof/tikz/3D
          object/ymax,pfft(2*pgfkeysvalueof/tikz/3D object/ymax)) coordinate (T2);
          foreach X in 1,...,4
          draw (BX) -- (TX);
          path[opacity=0.3,left color=blue,right color=blue,middle color=blue!20,shading
          angle=72]
          plot[variable=x,domain=pgfkeysvalueof/tikz/3D surface/ymin:(pgfkeysvalueof/tikz/3D
          surface/ymax+pgfkeysvalueof/tikz/3D surface/ymin)/2,smooth]
          (pgfkeysvalueof/tikz/3D surface/xmax,x,pfft(2*x)) --
          plot[variable=x,domain=(pgfkeysvalueof/tikz/3D
          surface/ymax+pgfkeysvalueof/tikz/3D surface/ymin)/2:pgfkeysvalueof/tikz/3D surface/ymin,smooth] (pgfkeysvalueof/tikz/3D surface/xmin,x,pfft(2*x)) -- cycle;
          path[opacity=0.3,left color=blue,right color=blue,middle color=blue!20,shading
          angle=72]
          plot[variable=x,domain=(pgfkeysvalueof/tikz/3D
          surface/ymax+pgfkeysvalueof/tikz/3D surface/ymin)/2:pgfkeysvalueof/tikz/3D surface/ymax,smooth]
          (pgfkeysvalueof/tikz/3D surface/xmax,x,pfft(2*x)) --
          plot[variable=x,domain=pgfkeysvalueof/tikz/3D surface/ymax:(pgfkeysvalueof/tikz/3D
          surface/ymax+pgfkeysvalueof/tikz/3D surface/ymin)/2,smooth] (pgfkeysvalueof/tikz/3D surface/xmin,x,pfft(2*x)) -- cycle;
          draw plot[variable=x,domain=pgfkeysvalueof/tikz/3D surface/ymin:pgfkeysvalueof/tikz/3D surface/ymax,smooth]
          (pgfkeysvalueof/tikz/3D surface/xmax,x,pfft(2*x)) --
          plot[variable=x,domain=pgfkeysvalueof/tikz/3D surface/ymax:pgfkeysvalueof/tikz/3D surface/ymin,smooth]
          (pgfkeysvalueof/tikz/3D surface/xmin,x,pfft(2*x)) -- cycle;
          endtikzpicture
          enddocument


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 51 mins ago

























          answered 3 hours ago









          marmotmarmot

          123k6160301




          123k6160301





















              2














              enter image description here



              To help you get started:



              documentclassarticle


              usepackagetikz



              begindocument

              begintikzpicture[x=(210:1cm),y=(0:1cm),z=(90:1cm)]
              draw (0,0,0) -- (3,0,0) -- (3,3,0)--(0,3,0)--cycle;
              draw (3,0,0) -- (3,0,4) .. controls (3,1,3.5) and (3,2,3) .. (3,3,3) -- (3,3,0);
              draw (3,3,3) .. controls (2,3,3) and (1,3,5) .. (0,3,5)--(0,3,0);
              draw (0,3,5) .. controls (0,2,4) and (0,1,4) .. (0,0,4)--(0,0,0);
              draw (0,0,4) -- (3,0,4);
              endtikzpicture
              enddocument





              share|improve this answer



























                2














                enter image description here



                To help you get started:



                documentclassarticle


                usepackagetikz



                begindocument

                begintikzpicture[x=(210:1cm),y=(0:1cm),z=(90:1cm)]
                draw (0,0,0) -- (3,0,0) -- (3,3,0)--(0,3,0)--cycle;
                draw (3,0,0) -- (3,0,4) .. controls (3,1,3.5) and (3,2,3) .. (3,3,3) -- (3,3,0);
                draw (3,3,3) .. controls (2,3,3) and (1,3,5) .. (0,3,5)--(0,3,0);
                draw (0,3,5) .. controls (0,2,4) and (0,1,4) .. (0,0,4)--(0,0,0);
                draw (0,0,4) -- (3,0,4);
                endtikzpicture
                enddocument





                share|improve this answer

























                  2












                  2








                  2







                  enter image description here



                  To help you get started:



                  documentclassarticle


                  usepackagetikz



                  begindocument

                  begintikzpicture[x=(210:1cm),y=(0:1cm),z=(90:1cm)]
                  draw (0,0,0) -- (3,0,0) -- (3,3,0)--(0,3,0)--cycle;
                  draw (3,0,0) -- (3,0,4) .. controls (3,1,3.5) and (3,2,3) .. (3,3,3) -- (3,3,0);
                  draw (3,3,3) .. controls (2,3,3) and (1,3,5) .. (0,3,5)--(0,3,0);
                  draw (0,3,5) .. controls (0,2,4) and (0,1,4) .. (0,0,4)--(0,0,0);
                  draw (0,0,4) -- (3,0,4);
                  endtikzpicture
                  enddocument





                  share|improve this answer













                  enter image description here



                  To help you get started:



                  documentclassarticle


                  usepackagetikz



                  begindocument

                  begintikzpicture[x=(210:1cm),y=(0:1cm),z=(90:1cm)]
                  draw (0,0,0) -- (3,0,0) -- (3,3,0)--(0,3,0)--cycle;
                  draw (3,0,0) -- (3,0,4) .. controls (3,1,3.5) and (3,2,3) .. (3,3,3) -- (3,3,0);
                  draw (3,3,3) .. controls (2,3,3) and (1,3,5) .. (0,3,5)--(0,3,0);
                  draw (0,3,5) .. controls (0,2,4) and (0,1,4) .. (0,0,4)--(0,0,0);
                  draw (0,0,4) -- (3,0,4);
                  endtikzpicture
                  enddocument






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 3 hours ago









                  JPiJPi

                  10.2k21551




                  10.2k21551




















                      Ícaro Viterbre is a new contributor. Be nice, and check out our Code of Conduct.









                      draft saved

                      draft discarded


















                      Ícaro Viterbre is a new contributor. Be nice, and check out our Code of Conduct.












                      Ícaro Viterbre is a new contributor. Be nice, and check out our Code of Conduct.











                      Ícaro Viterbre is a new contributor. Be nice, and check out our Code of Conduct.














                      Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f488865%2f3d-volume-in-tikz%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                      Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                      Ласкавець круглолистий Зміст Опис | Поширення | Галерея | Примітки | Посилання | Навігаційне меню58171138361-22960890446Bupleurum rotundifoliumEuro+Med PlantbasePlants of the World Online — Kew ScienceGermplasm Resources Information Network (GRIN)Ласкавецькн. VI : Літери Ком — Левиправивши або дописавши її