Drawing a curve (not necessarily an arc) in tikz-3dplot

Plausible reason for gold-digging ant

I have trouble understanding this fallacy: "If A, then B. Therefore if not-B, then not-A."

How to not let the Identify spell spoil everything?

Cat is tipping over bed-side lamps during the night

Explanation of a regular pattern only occuring for prime numbers

Treasure Hunt Riddle

Construct a section (or slice) through 3D Regions

TikZ graph edges not drawn nicely

Square Root Distance from Integers

Does diversity provide anything that meritocracy does not?

Do authors have to be politically correct in article-writing?

What makes papers publishable in top-tier journals?

Why is there a prohibition of gevinat aku"m?

What happens when the wearer of a Shield of Missile Attraction is behind total cover?

Bash script to truncate subject line of incoming email

Why did Luke use his left hand to shoot?

How would an AI self awareness kill switch work?

False written accusations not made public - is there law to cover this?

Play Zip, Zap, Zop

What happened to my GE option?

Why did the villain in the first Men in Black movie care about Earth's Cockroaches?

What is the difference between rolling more dice versus fewer dice?

Why was Lupin comfortable with saying Voldemort's name?

Is a new boolean field better than null reference when a value can be meaningfully absent?



Drawing a curve (not necessarily an arc) in tikz-3dplot














0















I'm trying to draw a curve in tikz-3dplot that isn't the arc of a circle. I would like for it to specified by control points, similar to how tikz has (0,0) to [controls=+(45:1) and +(135:1)] (1,0). I know I can draw an arc of a circle, with tdplotdrawpolytopearc, but I couldn't find anything in the documentation about how to draw any other type of curve. If I use the same syntax as for 2D curves, it seems a default plane is chosen in which the control points act (seems like the xy-plane). Maybe there's a way to choose that plane (and change it for every point)?



Here's a MWE and output for what I have:



documentclass[tikz]{standalone}
usepackage{tikz,tikz-3dplot}
begin{document}
tdplotsetmaincoords{75}{130}
begin{tikzpicture}[tdplot_main_coords]
% Shape and boundary
draw[blue] (0,0,0)--(-1,1,0);
fill[green,fill opacity=.8] (0,0,0)--(0,1,0)--(-1,1,0)--(-1,1,1)--(0,0,1);
draw[blue] (0,0,0)--(0,1,0)--(-1,1,0)--(-1,1,1)--(0,1,1)--(0,0,1)--(0,0,0);
draw[blue] (0,0,1)--(-1,1,1) (0,1,0)--(0,1,1);
% Natural guess how to draw curve
draw[red] (0,0,0) to [controls=+(45:1) and +(135:1)] (0,1,0);
% Closest documented way how to draw curve
tdplotdefinepoints(0,.5,-.3)(0,-.5,.3)(0,1.5,.3)
tdplotdrawpolytopearc{.583}{}{}
end{tikzpicture}
end{document}


enter image description here



I would like to draw a curve on the "face" of this prism that's facing left, like the black curve, but with more "strength" at the end points (like a sine curve). The failed attempt is the red curve that seems to be in the plane of the "bottom" face of the prism.



So, my question is: How can I draw a curve in 3D that is not the arc of a circle?









share



























    0















    I'm trying to draw a curve in tikz-3dplot that isn't the arc of a circle. I would like for it to specified by control points, similar to how tikz has (0,0) to [controls=+(45:1) and +(135:1)] (1,0). I know I can draw an arc of a circle, with tdplotdrawpolytopearc, but I couldn't find anything in the documentation about how to draw any other type of curve. If I use the same syntax as for 2D curves, it seems a default plane is chosen in which the control points act (seems like the xy-plane). Maybe there's a way to choose that plane (and change it for every point)?



    Here's a MWE and output for what I have:



    documentclass[tikz]{standalone}
    usepackage{tikz,tikz-3dplot}
    begin{document}
    tdplotsetmaincoords{75}{130}
    begin{tikzpicture}[tdplot_main_coords]
    % Shape and boundary
    draw[blue] (0,0,0)--(-1,1,0);
    fill[green,fill opacity=.8] (0,0,0)--(0,1,0)--(-1,1,0)--(-1,1,1)--(0,0,1);
    draw[blue] (0,0,0)--(0,1,0)--(-1,1,0)--(-1,1,1)--(0,1,1)--(0,0,1)--(0,0,0);
    draw[blue] (0,0,1)--(-1,1,1) (0,1,0)--(0,1,1);
    % Natural guess how to draw curve
    draw[red] (0,0,0) to [controls=+(45:1) and +(135:1)] (0,1,0);
    % Closest documented way how to draw curve
    tdplotdefinepoints(0,.5,-.3)(0,-.5,.3)(0,1.5,.3)
    tdplotdrawpolytopearc{.583}{}{}
    end{tikzpicture}
    end{document}


    enter image description here



    I would like to draw a curve on the "face" of this prism that's facing left, like the black curve, but with more "strength" at the end points (like a sine curve). The failed attempt is the red curve that seems to be in the plane of the "bottom" face of the prism.



    So, my question is: How can I draw a curve in 3D that is not the arc of a circle?









    share

























      0












      0








      0








      I'm trying to draw a curve in tikz-3dplot that isn't the arc of a circle. I would like for it to specified by control points, similar to how tikz has (0,0) to [controls=+(45:1) and +(135:1)] (1,0). I know I can draw an arc of a circle, with tdplotdrawpolytopearc, but I couldn't find anything in the documentation about how to draw any other type of curve. If I use the same syntax as for 2D curves, it seems a default plane is chosen in which the control points act (seems like the xy-plane). Maybe there's a way to choose that plane (and change it for every point)?



      Here's a MWE and output for what I have:



      documentclass[tikz]{standalone}
      usepackage{tikz,tikz-3dplot}
      begin{document}
      tdplotsetmaincoords{75}{130}
      begin{tikzpicture}[tdplot_main_coords]
      % Shape and boundary
      draw[blue] (0,0,0)--(-1,1,0);
      fill[green,fill opacity=.8] (0,0,0)--(0,1,0)--(-1,1,0)--(-1,1,1)--(0,0,1);
      draw[blue] (0,0,0)--(0,1,0)--(-1,1,0)--(-1,1,1)--(0,1,1)--(0,0,1)--(0,0,0);
      draw[blue] (0,0,1)--(-1,1,1) (0,1,0)--(0,1,1);
      % Natural guess how to draw curve
      draw[red] (0,0,0) to [controls=+(45:1) and +(135:1)] (0,1,0);
      % Closest documented way how to draw curve
      tdplotdefinepoints(0,.5,-.3)(0,-.5,.3)(0,1.5,.3)
      tdplotdrawpolytopearc{.583}{}{}
      end{tikzpicture}
      end{document}


      enter image description here



      I would like to draw a curve on the "face" of this prism that's facing left, like the black curve, but with more "strength" at the end points (like a sine curve). The failed attempt is the red curve that seems to be in the plane of the "bottom" face of the prism.



      So, my question is: How can I draw a curve in 3D that is not the arc of a circle?









      share














      I'm trying to draw a curve in tikz-3dplot that isn't the arc of a circle. I would like for it to specified by control points, similar to how tikz has (0,0) to [controls=+(45:1) and +(135:1)] (1,0). I know I can draw an arc of a circle, with tdplotdrawpolytopearc, but I couldn't find anything in the documentation about how to draw any other type of curve. If I use the same syntax as for 2D curves, it seems a default plane is chosen in which the control points act (seems like the xy-plane). Maybe there's a way to choose that plane (and change it for every point)?



      Here's a MWE and output for what I have:



      documentclass[tikz]{standalone}
      usepackage{tikz,tikz-3dplot}
      begin{document}
      tdplotsetmaincoords{75}{130}
      begin{tikzpicture}[tdplot_main_coords]
      % Shape and boundary
      draw[blue] (0,0,0)--(-1,1,0);
      fill[green,fill opacity=.8] (0,0,0)--(0,1,0)--(-1,1,0)--(-1,1,1)--(0,0,1);
      draw[blue] (0,0,0)--(0,1,0)--(-1,1,0)--(-1,1,1)--(0,1,1)--(0,0,1)--(0,0,0);
      draw[blue] (0,0,1)--(-1,1,1) (0,1,0)--(0,1,1);
      % Natural guess how to draw curve
      draw[red] (0,0,0) to [controls=+(45:1) and +(135:1)] (0,1,0);
      % Closest documented way how to draw curve
      tdplotdefinepoints(0,.5,-.3)(0,-.5,.3)(0,1.5,.3)
      tdplotdrawpolytopearc{.583}{}{}
      end{tikzpicture}
      end{document}


      enter image description here



      I would like to draw a curve on the "face" of this prism that's facing left, like the black curve, but with more "strength" at the end points (like a sine curve). The failed attempt is the red curve that seems to be in the plane of the "bottom" face of the prism.



      So, my question is: How can I draw a curve in 3D that is not the arc of a circle?







      tikz-pgf diagrams tikz-3dplot





      share












      share










      share



      share










      asked 58 secs ago









      Jānis LazovskisJānis Lazovskis

      3,3821232




      3,3821232






















          0






          active

          oldest

          votes











          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
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f476860%2fdrawing-a-curve-not-necessarily-an-arc-in-tikz-3dplot%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          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%2f476860%2fdrawing-a-curve-not-necessarily-an-arc-in-tikz-3dplot%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

          IEEEtran - How to include ORCID in TeX/PDF with PdfLatexIs there a standard way to include ORCID in TeX /...

          Cicindela nigrior Przypisy | Menu nawigacyjneCicindela varians unicolorManual for the Identification of the...

          Glossaries-extra: Adding glossaries package to “Clas­sicTh­e­sis” template by Dr. André Miede v. 4.6 ...