Cube around 2 points with correct perspectiveDraw 3D Cubes around centreTikz: How to use multiple parameters in pic?TikZ: Cropping the Bounding BoxRotate a node but not its content: the case of the ellipse decorationTikZ/ERD: node (=Entity) label on the insideTikZ: Drawing an arc from an intersection to an intersectionDotted lines with border around the dots?cube folding with tikzLine up nested tikz enviroments or how to get rid of themPutting labels on a cube with perspectivePlaying around with a Rubik's Cube in TikZTikz image within a defined box (& the textpos package)

Story/1980s sci fi anthology novel where a man is sucked into another world through a gold painting

Plausibility and performance of a composite longbow

What's the purpose of autocorrelation?

Who are the people reviewing far more papers than they're submitting for review?

Why are two-stroke engines nearly unheard of in aviation?

Is a global DNS record a security risk for phpMyAdmin?

What is this WWII four-engine plane on skis?

Is it possible that the shadow of The Moon is a single dot during solar eclipse?

Does Forgotten Realms setting count as “High magic”?

How do rulers get rich from war?

Paradox regarding phase transitions in relativistic systems

Why do things cool off?

Output Distinct Factor Cuboids

Should I inform my future product owner that there are big chances that a team member will leave the company soon?

Should the pagination be reset when changing the order?

Amortized Loans seem to benefit the bank more than the customer

What’s a “dissipated” garment supposed to be?

How to generate short fixed length cryptographic hashes?

Why is belonging not transitive?

Abilities interrupting effects on a cast card

Do encumbered characters suffer any penalties when exploring and/or traveling?

Where did Otto von Bismarck say "lying awake all night, hating"?

How do we know that black holes are spinning?

Microservices and Stored Procedures



Cube around 2 points with correct perspective


Draw 3D Cubes around centreTikz: How to use multiple parameters in pic?TikZ: Cropping the Bounding BoxRotate a node but not its content: the case of the ellipse decorationTikZ/ERD: node (=Entity) label on the insideTikZ: Drawing an arc from an intersection to an intersectionDotted lines with border around the dots?cube folding with tikzLine up nested tikz enviroments or how to get rid of themPutting labels on a cube with perspectivePlaying around with a Rubik's Cube in TikZTikz image within a defined box (& the textpos package)






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








3















I'd like to display a moving rigid body with 2 coordinate frames attached to it. The body should be displayed around every link in the image below, so that the body is parallel to the line connecting the upper and lower frames in the image below. And it appears as if both frames are in/on the body. I know this needs great 3D skills, which I seem to lack. Even though I know how to rotate the coordinate systems, I can't figure out how to rotate the cubes accordingly.



I imagine that one needs to draw the body/cube with the frames, group it somehow and maybe then rotate it into a couple of different positions as a group.



The code of the plot below can be found in my previous question, or alternatively I can provide this:



documentclassarticle
usepackagetikz
usepackage[graphics, active, tightpage]preview
PreviewEnvironmenttikzpicture

usetikzlibraryshapes.geometric, arrows.meta, 3d, calc
usepackagetikz-3dplot
usetikzlibraryshapes,positioning


begindocument
begintikzpicture[scale=2,axis/.style=->,dashed,thick, >=latex]

tikzsetpics/coordsys/.style n args=4
code =
draw [->, #1] (0,0,0) -- +(1,0,0)[red] node [pos=1.2]#2;
draw [->, #1] (0,0,0) -- +(0,1,0)[green] node [pos=1.2]#3;
draw [->, #1] (0,0,0) -- +(0,0,1)[blue] node [pos=1.2]#4;



coordinate (origin) at (0,0,0);
coordinate (t1M) at (-2,4,0);
coordinate (t1B) at (-1.2,5.5,-2);
coordinate (t2M) at (2,5,0);
coordinate (t2B) at (2,6,-2);
coordinate (t3M) at (5,6,0);
coordinate (t3B) at (5,6,-2);
coordinate (t4M) at (12,6,0);
coordinate (t4B) at (12,6,-2);

% origin
draw (origin) pic coordsys=very thickxyz;
node [below right] at (origin.south) textitG;
draw [->, dotted] (origin) -- (t1M) node [midway,fill=white] $q_1, t_1$;
draw [->, dotted] (origin) -- (t2M) node [midway,fill=white] $q_2, t_2$;
draw [->, dotted] (origin) -- (t3M) node [midway,fill=white] $q_3, t_3$;
draw [->, dotted] (origin) -- (t4M) node [midway,fill=white] $q_4, t_4$;

% set fixed rotation of the two frames
tdplotsetmaincoords00;
tdplotsetrotatedcoords0-4530;

% Time t1
draw (t1M) pic coordsys=;
draw [->, thick] (t1M) -- (t1B) node [midway,fill=white] $q,t$;
node [above left] at (t1M.north) $M_1$;
draw [->, dashed] (t1M) .. controls +(1,-1,0) and +(-1,-1,0) .. (t2M);

tdplotsetrotatedcoordsorigin(t1B);
draw [tdplot_rotated_coords] (t1B) pic coordsys=;
node [above left] at (t1B.north) $B_1$;
draw [->, dashed] (t1B) .. controls +(1,-1,-2) and +(-1,-1,-2) .. (t2B) node [midway,fill=white] $q_12$;

% Time t2
draw (t2M) pic coordsys=;
draw [->, thick] (t2M) -- (t2B) node [midway,fill=white] $q,t$;
node [above left] at (t2M.north) $M_2$;
draw [->, dashed] (t2M) .. controls +(1,1,0) and +(-1,0,0) .. (t3M);

tdplotsetrotatedcoordsorigin(t2B);
draw [tdplot_rotated_coords] (t2B) pic coordsys=;
node [above left] at (t2B.north) $B_2$;
draw [->, dashed] (t2B) .. controls +(1,1,-2) and +(-0.5,0.5,0) .. (t3B) node [midway,fill=white] $q_23$;

% Time t3
draw (t3M) pic coordsys=;
draw [->, thick] (t3M) -- (t3B) node [midway,fill=white] $q,t$;
node [above left] at (t3M.north) $M_3$;
draw [->, dashed] (t3M) .. controls +(3,-1,0) and +(-2,-1,0) .. (t4M);

tdplotsetrotatedcoordsorigin(t3B);
draw [tdplot_rotated_coords] (t3B) pic coordsys=;
node [above right] at (t3B.north) $B_3$;
draw [->, dashed] (t3B) .. controls +(1,-1,0) and +(-2,-1,-2) .. (t4B) node [midway,fill=white] $q_34$;

% Time t4
draw (t4M) pic coordsys=;
draw [->, thick] (t4M) -- (t4B) node [midway,fill=white] $q,t$;
node [above left] at (t4M.north) $M_4$;

tdplotsetrotatedcoordsorigin(t4B);
draw [tdplot_rotated_coords] (t4B) pic coordsys=;
node [above left] at (t4B.north) $B_4$;

endtikzpicture
enddocument


enter image description here










share|improve this question







New contributor



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



























    3















    I'd like to display a moving rigid body with 2 coordinate frames attached to it. The body should be displayed around every link in the image below, so that the body is parallel to the line connecting the upper and lower frames in the image below. And it appears as if both frames are in/on the body. I know this needs great 3D skills, which I seem to lack. Even though I know how to rotate the coordinate systems, I can't figure out how to rotate the cubes accordingly.



    I imagine that one needs to draw the body/cube with the frames, group it somehow and maybe then rotate it into a couple of different positions as a group.



    The code of the plot below can be found in my previous question, or alternatively I can provide this:



    documentclassarticle
    usepackagetikz
    usepackage[graphics, active, tightpage]preview
    PreviewEnvironmenttikzpicture

    usetikzlibraryshapes.geometric, arrows.meta, 3d, calc
    usepackagetikz-3dplot
    usetikzlibraryshapes,positioning


    begindocument
    begintikzpicture[scale=2,axis/.style=->,dashed,thick, >=latex]

    tikzsetpics/coordsys/.style n args=4
    code =
    draw [->, #1] (0,0,0) -- +(1,0,0)[red] node [pos=1.2]#2;
    draw [->, #1] (0,0,0) -- +(0,1,0)[green] node [pos=1.2]#3;
    draw [->, #1] (0,0,0) -- +(0,0,1)[blue] node [pos=1.2]#4;



    coordinate (origin) at (0,0,0);
    coordinate (t1M) at (-2,4,0);
    coordinate (t1B) at (-1.2,5.5,-2);
    coordinate (t2M) at (2,5,0);
    coordinate (t2B) at (2,6,-2);
    coordinate (t3M) at (5,6,0);
    coordinate (t3B) at (5,6,-2);
    coordinate (t4M) at (12,6,0);
    coordinate (t4B) at (12,6,-2);

    % origin
    draw (origin) pic coordsys=very thickxyz;
    node [below right] at (origin.south) textitG;
    draw [->, dotted] (origin) -- (t1M) node [midway,fill=white] $q_1, t_1$;
    draw [->, dotted] (origin) -- (t2M) node [midway,fill=white] $q_2, t_2$;
    draw [->, dotted] (origin) -- (t3M) node [midway,fill=white] $q_3, t_3$;
    draw [->, dotted] (origin) -- (t4M) node [midway,fill=white] $q_4, t_4$;

    % set fixed rotation of the two frames
    tdplotsetmaincoords00;
    tdplotsetrotatedcoords0-4530;

    % Time t1
    draw (t1M) pic coordsys=;
    draw [->, thick] (t1M) -- (t1B) node [midway,fill=white] $q,t$;
    node [above left] at (t1M.north) $M_1$;
    draw [->, dashed] (t1M) .. controls +(1,-1,0) and +(-1,-1,0) .. (t2M);

    tdplotsetrotatedcoordsorigin(t1B);
    draw [tdplot_rotated_coords] (t1B) pic coordsys=;
    node [above left] at (t1B.north) $B_1$;
    draw [->, dashed] (t1B) .. controls +(1,-1,-2) and +(-1,-1,-2) .. (t2B) node [midway,fill=white] $q_12$;

    % Time t2
    draw (t2M) pic coordsys=;
    draw [->, thick] (t2M) -- (t2B) node [midway,fill=white] $q,t$;
    node [above left] at (t2M.north) $M_2$;
    draw [->, dashed] (t2M) .. controls +(1,1,0) and +(-1,0,0) .. (t3M);

    tdplotsetrotatedcoordsorigin(t2B);
    draw [tdplot_rotated_coords] (t2B) pic coordsys=;
    node [above left] at (t2B.north) $B_2$;
    draw [->, dashed] (t2B) .. controls +(1,1,-2) and +(-0.5,0.5,0) .. (t3B) node [midway,fill=white] $q_23$;

    % Time t3
    draw (t3M) pic coordsys=;
    draw [->, thick] (t3M) -- (t3B) node [midway,fill=white] $q,t$;
    node [above left] at (t3M.north) $M_3$;
    draw [->, dashed] (t3M) .. controls +(3,-1,0) and +(-2,-1,0) .. (t4M);

    tdplotsetrotatedcoordsorigin(t3B);
    draw [tdplot_rotated_coords] (t3B) pic coordsys=;
    node [above right] at (t3B.north) $B_3$;
    draw [->, dashed] (t3B) .. controls +(1,-1,0) and +(-2,-1,-2) .. (t4B) node [midway,fill=white] $q_34$;

    % Time t4
    draw (t4M) pic coordsys=;
    draw [->, thick] (t4M) -- (t4B) node [midway,fill=white] $q,t$;
    node [above left] at (t4M.north) $M_4$;

    tdplotsetrotatedcoordsorigin(t4B);
    draw [tdplot_rotated_coords] (t4B) pic coordsys=;
    node [above left] at (t4B.north) $B_4$;

    endtikzpicture
    enddocument


    enter image description here










    share|improve this question







    New contributor



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























      3












      3








      3








      I'd like to display a moving rigid body with 2 coordinate frames attached to it. The body should be displayed around every link in the image below, so that the body is parallel to the line connecting the upper and lower frames in the image below. And it appears as if both frames are in/on the body. I know this needs great 3D skills, which I seem to lack. Even though I know how to rotate the coordinate systems, I can't figure out how to rotate the cubes accordingly.



      I imagine that one needs to draw the body/cube with the frames, group it somehow and maybe then rotate it into a couple of different positions as a group.



      The code of the plot below can be found in my previous question, or alternatively I can provide this:



      documentclassarticle
      usepackagetikz
      usepackage[graphics, active, tightpage]preview
      PreviewEnvironmenttikzpicture

      usetikzlibraryshapes.geometric, arrows.meta, 3d, calc
      usepackagetikz-3dplot
      usetikzlibraryshapes,positioning


      begindocument
      begintikzpicture[scale=2,axis/.style=->,dashed,thick, >=latex]

      tikzsetpics/coordsys/.style n args=4
      code =
      draw [->, #1] (0,0,0) -- +(1,0,0)[red] node [pos=1.2]#2;
      draw [->, #1] (0,0,0) -- +(0,1,0)[green] node [pos=1.2]#3;
      draw [->, #1] (0,0,0) -- +(0,0,1)[blue] node [pos=1.2]#4;



      coordinate (origin) at (0,0,0);
      coordinate (t1M) at (-2,4,0);
      coordinate (t1B) at (-1.2,5.5,-2);
      coordinate (t2M) at (2,5,0);
      coordinate (t2B) at (2,6,-2);
      coordinate (t3M) at (5,6,0);
      coordinate (t3B) at (5,6,-2);
      coordinate (t4M) at (12,6,0);
      coordinate (t4B) at (12,6,-2);

      % origin
      draw (origin) pic coordsys=very thickxyz;
      node [below right] at (origin.south) textitG;
      draw [->, dotted] (origin) -- (t1M) node [midway,fill=white] $q_1, t_1$;
      draw [->, dotted] (origin) -- (t2M) node [midway,fill=white] $q_2, t_2$;
      draw [->, dotted] (origin) -- (t3M) node [midway,fill=white] $q_3, t_3$;
      draw [->, dotted] (origin) -- (t4M) node [midway,fill=white] $q_4, t_4$;

      % set fixed rotation of the two frames
      tdplotsetmaincoords00;
      tdplotsetrotatedcoords0-4530;

      % Time t1
      draw (t1M) pic coordsys=;
      draw [->, thick] (t1M) -- (t1B) node [midway,fill=white] $q,t$;
      node [above left] at (t1M.north) $M_1$;
      draw [->, dashed] (t1M) .. controls +(1,-1,0) and +(-1,-1,0) .. (t2M);

      tdplotsetrotatedcoordsorigin(t1B);
      draw [tdplot_rotated_coords] (t1B) pic coordsys=;
      node [above left] at (t1B.north) $B_1$;
      draw [->, dashed] (t1B) .. controls +(1,-1,-2) and +(-1,-1,-2) .. (t2B) node [midway,fill=white] $q_12$;

      % Time t2
      draw (t2M) pic coordsys=;
      draw [->, thick] (t2M) -- (t2B) node [midway,fill=white] $q,t$;
      node [above left] at (t2M.north) $M_2$;
      draw [->, dashed] (t2M) .. controls +(1,1,0) and +(-1,0,0) .. (t3M);

      tdplotsetrotatedcoordsorigin(t2B);
      draw [tdplot_rotated_coords] (t2B) pic coordsys=;
      node [above left] at (t2B.north) $B_2$;
      draw [->, dashed] (t2B) .. controls +(1,1,-2) and +(-0.5,0.5,0) .. (t3B) node [midway,fill=white] $q_23$;

      % Time t3
      draw (t3M) pic coordsys=;
      draw [->, thick] (t3M) -- (t3B) node [midway,fill=white] $q,t$;
      node [above left] at (t3M.north) $M_3$;
      draw [->, dashed] (t3M) .. controls +(3,-1,0) and +(-2,-1,0) .. (t4M);

      tdplotsetrotatedcoordsorigin(t3B);
      draw [tdplot_rotated_coords] (t3B) pic coordsys=;
      node [above right] at (t3B.north) $B_3$;
      draw [->, dashed] (t3B) .. controls +(1,-1,0) and +(-2,-1,-2) .. (t4B) node [midway,fill=white] $q_34$;

      % Time t4
      draw (t4M) pic coordsys=;
      draw [->, thick] (t4M) -- (t4B) node [midway,fill=white] $q,t$;
      node [above left] at (t4M.north) $M_4$;

      tdplotsetrotatedcoordsorigin(t4B);
      draw [tdplot_rotated_coords] (t4B) pic coordsys=;
      node [above left] at (t4B.north) $B_4$;

      endtikzpicture
      enddocument


      enter image description here










      share|improve this question







      New contributor



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











      I'd like to display a moving rigid body with 2 coordinate frames attached to it. The body should be displayed around every link in the image below, so that the body is parallel to the line connecting the upper and lower frames in the image below. And it appears as if both frames are in/on the body. I know this needs great 3D skills, which I seem to lack. Even though I know how to rotate the coordinate systems, I can't figure out how to rotate the cubes accordingly.



      I imagine that one needs to draw the body/cube with the frames, group it somehow and maybe then rotate it into a couple of different positions as a group.



      The code of the plot below can be found in my previous question, or alternatively I can provide this:



      documentclassarticle
      usepackagetikz
      usepackage[graphics, active, tightpage]preview
      PreviewEnvironmenttikzpicture

      usetikzlibraryshapes.geometric, arrows.meta, 3d, calc
      usepackagetikz-3dplot
      usetikzlibraryshapes,positioning


      begindocument
      begintikzpicture[scale=2,axis/.style=->,dashed,thick, >=latex]

      tikzsetpics/coordsys/.style n args=4
      code =
      draw [->, #1] (0,0,0) -- +(1,0,0)[red] node [pos=1.2]#2;
      draw [->, #1] (0,0,0) -- +(0,1,0)[green] node [pos=1.2]#3;
      draw [->, #1] (0,0,0) -- +(0,0,1)[blue] node [pos=1.2]#4;



      coordinate (origin) at (0,0,0);
      coordinate (t1M) at (-2,4,0);
      coordinate (t1B) at (-1.2,5.5,-2);
      coordinate (t2M) at (2,5,0);
      coordinate (t2B) at (2,6,-2);
      coordinate (t3M) at (5,6,0);
      coordinate (t3B) at (5,6,-2);
      coordinate (t4M) at (12,6,0);
      coordinate (t4B) at (12,6,-2);

      % origin
      draw (origin) pic coordsys=very thickxyz;
      node [below right] at (origin.south) textitG;
      draw [->, dotted] (origin) -- (t1M) node [midway,fill=white] $q_1, t_1$;
      draw [->, dotted] (origin) -- (t2M) node [midway,fill=white] $q_2, t_2$;
      draw [->, dotted] (origin) -- (t3M) node [midway,fill=white] $q_3, t_3$;
      draw [->, dotted] (origin) -- (t4M) node [midway,fill=white] $q_4, t_4$;

      % set fixed rotation of the two frames
      tdplotsetmaincoords00;
      tdplotsetrotatedcoords0-4530;

      % Time t1
      draw (t1M) pic coordsys=;
      draw [->, thick] (t1M) -- (t1B) node [midway,fill=white] $q,t$;
      node [above left] at (t1M.north) $M_1$;
      draw [->, dashed] (t1M) .. controls +(1,-1,0) and +(-1,-1,0) .. (t2M);

      tdplotsetrotatedcoordsorigin(t1B);
      draw [tdplot_rotated_coords] (t1B) pic coordsys=;
      node [above left] at (t1B.north) $B_1$;
      draw [->, dashed] (t1B) .. controls +(1,-1,-2) and +(-1,-1,-2) .. (t2B) node [midway,fill=white] $q_12$;

      % Time t2
      draw (t2M) pic coordsys=;
      draw [->, thick] (t2M) -- (t2B) node [midway,fill=white] $q,t$;
      node [above left] at (t2M.north) $M_2$;
      draw [->, dashed] (t2M) .. controls +(1,1,0) and +(-1,0,0) .. (t3M);

      tdplotsetrotatedcoordsorigin(t2B);
      draw [tdplot_rotated_coords] (t2B) pic coordsys=;
      node [above left] at (t2B.north) $B_2$;
      draw [->, dashed] (t2B) .. controls +(1,1,-2) and +(-0.5,0.5,0) .. (t3B) node [midway,fill=white] $q_23$;

      % Time t3
      draw (t3M) pic coordsys=;
      draw [->, thick] (t3M) -- (t3B) node [midway,fill=white] $q,t$;
      node [above left] at (t3M.north) $M_3$;
      draw [->, dashed] (t3M) .. controls +(3,-1,0) and +(-2,-1,0) .. (t4M);

      tdplotsetrotatedcoordsorigin(t3B);
      draw [tdplot_rotated_coords] (t3B) pic coordsys=;
      node [above right] at (t3B.north) $B_3$;
      draw [->, dashed] (t3B) .. controls +(1,-1,0) and +(-2,-1,-2) .. (t4B) node [midway,fill=white] $q_34$;

      % Time t4
      draw (t4M) pic coordsys=;
      draw [->, thick] (t4M) -- (t4B) node [midway,fill=white] $q,t$;
      node [above left] at (t4M.north) $M_4$;

      tdplotsetrotatedcoordsorigin(t4B);
      draw [tdplot_rotated_coords] (t4B) pic coordsys=;
      node [above left] at (t4B.north) $B_4$;

      endtikzpicture
      enddocument


      enter image description here







      tikz-pgf tikz-styles






      share|improve this question







      New contributor



      avermaet 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



      avermaet 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



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








      asked 8 hours ago









      avermaetavermaet

      1724 bronze badges




      1724 bronze badges




      New contributor



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




      New contributor




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

























          1 Answer
          1






          active

          oldest

          votes


















          5
















          It is fairly easy to add cuboids but they are rotated in one frame. Presumably that's the purpose here, right? (TikZ does not have a 3D engine, so you need to decide yourself which faces are to be drawn, which is why there is an ifnum. The y' axis is hard coded to be in the background layer...)



          documentclass[border=2mm,tikz]standalone 
          usepackagetikz-3dplot
          usetikzlibrarybackgrounds
          begindocument
          tdplotsetmaincoords60-15
          begintikzpicture[tdplot_main_coords,scale=1.5,line join=round,>=latex,
          line cap=round,declare function=fA(t)=-sin(t*144/(1+t/5));
          fAprime(t)=pow(60/(5+t),2)*cos(t*144/(1+t/5))*pi/180;
          fB(t)=-sin(t*216/(1+t*4/15));
          fBprime(t)=6*pow(90/(15+t*4),2)*cos(t*216/(1+t*4/15))*pi/180;,
          pics/coordsys/.style =
          code = tikzsetcoordsys/.cd,#1
          draw [->,pic actions] (0,0,0) -- +(1,0,0)[red] node[pos=1.1]
          $pgfkeysvalueof/tikz/coordsys/x$;
          beginscope[on background layer]
          draw [->,pic actions] (0,0,0) -- +(0,1,0)[green!60!black] node[pos=1.1]
          $pgfkeysvalueof/tikz/coordsys/y$;
          endscope
          draw [->,pic actions] (0,0,0) -- +(0,0,1)[blue] node[pos=1.1]
          $pgfkeysvalueof/tikz/coordsys/z$;

          ,coordsys/.cd,x/.initial=x,y/.initial=y,z/.initial=z]
          draw[dashed] plot[variable=t,domain=0:5] (t,3,fA(t));
          draw[dashed] plot[variable=t,domain=0:3.25] (t,0,fB(t));
          foreach X [count=Y] in 0,...,3
          draw (X*5/3,3,fA(X*5/3)) coordinate (PY)
          -- (X*3.25/3,0,fB(X*3.25/3)) coordinate (QY);
          tdplotsetrotatedcoords0atan2(fAprime(X*5/3),1)0
          beginscope[tdplot_rotated_coords]
          path (PY) piccoordsys;
          pgfmathsetmacromyangatan2(fAprime(X*1.25),1)
          pgfmathtruncatemacroitestsign(myang)
          pgfmathsetmacrocuboiddim2/3% 2/3 = 1/scale where scale=1.5
          draw[fill opacity=0.5,fill=gray!70] ($(PY)+(0,0,0)$)
          -- ($(PY)+(cuboiddim,0,0)$) -- ($(PY)+(cuboiddim,0,cuboiddim)$)
          -- ($(PY)+(0,0,cuboiddim)$) -- cycle;
          ifnumitest=-1
          draw[fill opacity=0.5,fill=gray] ($(PY)+(cuboiddim,0,0)$)
          -- ($(PY)+(cuboiddim,0,cuboiddim)$) -- ($(QY)+(cuboiddim,0,cuboiddim)$)
          -- ($(QY)+(cuboiddim,0,0)$) -- cycle;
          else
          draw[fill opacity=0.5,fill=gray] ($(PY)+(0,0,0)$)
          -- ($(PY)+(0,0,cuboiddim)$) -- ($(QY)+(0,0,cuboiddim)$)
          -- ($(QY)+(0,0,0)$) -- cycle;
          fi
          draw[fill opacity=0.5,fill=gray!70] ($(PY)+(0,0,cuboiddim)$)
          -- ($(PY)+(cuboiddim,0,cuboiddim)$) -- ($(QY)+(cuboiddim,0,cuboiddim)$)
          -- ($(QY)+(0,0,cuboiddim)$) -- cycle;
          draw[fill opacity=0.5,fill=gray!50] ($(QY)+(0,0,0)$)
          -- ($(QY)+(cuboiddim,0,0)$) -- ($(QY)+(cuboiddim,0,cuboiddim)$)
          -- ($(QY)+(0,0,cuboiddim)$) -- cycle;
          endscope
          tdplotsetrotatedcoords0atan2(fBprime(X*3.25/3),1)0
          beginscope[tdplot_rotated_coords]
          path (QY) piccoordsys=x=x',y=y',z=z';
          endscope

          endtikzpicture
          enddocument


          enter image description here






          share|improve this answer



























          • Wow, that was fast and I really apprechiate your help. But your solution is a bit too advanced for my current understanding. I get it until you start rotating the frames according to the derivative. Why is there the factor 1.25 in fprime? The lower coordinate systems and cubes are as I want them, but I'd need the upper frames be rotated with a fixed rotation w.r.t. the lower ones. Both on body but with a relative rotation to each other. And can you make the cubes over the frames so it seems as the frames are inside? And 4 timesteps /bodies should be enough, where do I adjust this?

            – avermaet
            7 hours ago






          • 1





            @avermaet The number of steps is controlled by 0,...,4, 1.25 was just to evaluate fA at 0,1.25,2.5... rather than 0,1,2,.... The x and z dimensions the cuboids are given by 0.25, one can make this a parameter. The problem with making the cuboids much larger will be that they overlap and TikZ has no 3d engine, so it won't look good.

            – Schrödinger's cat
            7 hours ago











          • Yes, thats why I just want 4 cuboids. Or 3d boxes. The frames should appear in the box not below, like it is at the moment. I tried to adjust the number of "boxes/frames" before but then suddenly everything broke.

            – avermaet
            7 hours ago












          • @avermaet I added something along those lines.

            – Schrödinger's cat
            7 hours ago






          • 1





            @avermaet Since I see you are playing with cuboids: a version that shows always the visible sides can be found e.g. here. Such cuboids may be a better fit to your problem. (It also uses rounded corners to fix the problem you had with the other one.)

            – Schrödinger's cat
            2 hours ago














          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/4.0/"u003ecc by-sa 4.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
          );



          );







          avermaet 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%2f508495%2fcube-around-2-points-with-correct-perspective%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          5
















          It is fairly easy to add cuboids but they are rotated in one frame. Presumably that's the purpose here, right? (TikZ does not have a 3D engine, so you need to decide yourself which faces are to be drawn, which is why there is an ifnum. The y' axis is hard coded to be in the background layer...)



          documentclass[border=2mm,tikz]standalone 
          usepackagetikz-3dplot
          usetikzlibrarybackgrounds
          begindocument
          tdplotsetmaincoords60-15
          begintikzpicture[tdplot_main_coords,scale=1.5,line join=round,>=latex,
          line cap=round,declare function=fA(t)=-sin(t*144/(1+t/5));
          fAprime(t)=pow(60/(5+t),2)*cos(t*144/(1+t/5))*pi/180;
          fB(t)=-sin(t*216/(1+t*4/15));
          fBprime(t)=6*pow(90/(15+t*4),2)*cos(t*216/(1+t*4/15))*pi/180;,
          pics/coordsys/.style =
          code = tikzsetcoordsys/.cd,#1
          draw [->,pic actions] (0,0,0) -- +(1,0,0)[red] node[pos=1.1]
          $pgfkeysvalueof/tikz/coordsys/x$;
          beginscope[on background layer]
          draw [->,pic actions] (0,0,0) -- +(0,1,0)[green!60!black] node[pos=1.1]
          $pgfkeysvalueof/tikz/coordsys/y$;
          endscope
          draw [->,pic actions] (0,0,0) -- +(0,0,1)[blue] node[pos=1.1]
          $pgfkeysvalueof/tikz/coordsys/z$;

          ,coordsys/.cd,x/.initial=x,y/.initial=y,z/.initial=z]
          draw[dashed] plot[variable=t,domain=0:5] (t,3,fA(t));
          draw[dashed] plot[variable=t,domain=0:3.25] (t,0,fB(t));
          foreach X [count=Y] in 0,...,3
          draw (X*5/3,3,fA(X*5/3)) coordinate (PY)
          -- (X*3.25/3,0,fB(X*3.25/3)) coordinate (QY);
          tdplotsetrotatedcoords0atan2(fAprime(X*5/3),1)0
          beginscope[tdplot_rotated_coords]
          path (PY) piccoordsys;
          pgfmathsetmacromyangatan2(fAprime(X*1.25),1)
          pgfmathtruncatemacroitestsign(myang)
          pgfmathsetmacrocuboiddim2/3% 2/3 = 1/scale where scale=1.5
          draw[fill opacity=0.5,fill=gray!70] ($(PY)+(0,0,0)$)
          -- ($(PY)+(cuboiddim,0,0)$) -- ($(PY)+(cuboiddim,0,cuboiddim)$)
          -- ($(PY)+(0,0,cuboiddim)$) -- cycle;
          ifnumitest=-1
          draw[fill opacity=0.5,fill=gray] ($(PY)+(cuboiddim,0,0)$)
          -- ($(PY)+(cuboiddim,0,cuboiddim)$) -- ($(QY)+(cuboiddim,0,cuboiddim)$)
          -- ($(QY)+(cuboiddim,0,0)$) -- cycle;
          else
          draw[fill opacity=0.5,fill=gray] ($(PY)+(0,0,0)$)
          -- ($(PY)+(0,0,cuboiddim)$) -- ($(QY)+(0,0,cuboiddim)$)
          -- ($(QY)+(0,0,0)$) -- cycle;
          fi
          draw[fill opacity=0.5,fill=gray!70] ($(PY)+(0,0,cuboiddim)$)
          -- ($(PY)+(cuboiddim,0,cuboiddim)$) -- ($(QY)+(cuboiddim,0,cuboiddim)$)
          -- ($(QY)+(0,0,cuboiddim)$) -- cycle;
          draw[fill opacity=0.5,fill=gray!50] ($(QY)+(0,0,0)$)
          -- ($(QY)+(cuboiddim,0,0)$) -- ($(QY)+(cuboiddim,0,cuboiddim)$)
          -- ($(QY)+(0,0,cuboiddim)$) -- cycle;
          endscope
          tdplotsetrotatedcoords0atan2(fBprime(X*3.25/3),1)0
          beginscope[tdplot_rotated_coords]
          path (QY) piccoordsys=x=x',y=y',z=z';
          endscope

          endtikzpicture
          enddocument


          enter image description here






          share|improve this answer



























          • Wow, that was fast and I really apprechiate your help. But your solution is a bit too advanced for my current understanding. I get it until you start rotating the frames according to the derivative. Why is there the factor 1.25 in fprime? The lower coordinate systems and cubes are as I want them, but I'd need the upper frames be rotated with a fixed rotation w.r.t. the lower ones. Both on body but with a relative rotation to each other. And can you make the cubes over the frames so it seems as the frames are inside? And 4 timesteps /bodies should be enough, where do I adjust this?

            – avermaet
            7 hours ago






          • 1





            @avermaet The number of steps is controlled by 0,...,4, 1.25 was just to evaluate fA at 0,1.25,2.5... rather than 0,1,2,.... The x and z dimensions the cuboids are given by 0.25, one can make this a parameter. The problem with making the cuboids much larger will be that they overlap and TikZ has no 3d engine, so it won't look good.

            – Schrödinger's cat
            7 hours ago











          • Yes, thats why I just want 4 cuboids. Or 3d boxes. The frames should appear in the box not below, like it is at the moment. I tried to adjust the number of "boxes/frames" before but then suddenly everything broke.

            – avermaet
            7 hours ago












          • @avermaet I added something along those lines.

            – Schrödinger's cat
            7 hours ago






          • 1





            @avermaet Since I see you are playing with cuboids: a version that shows always the visible sides can be found e.g. here. Such cuboids may be a better fit to your problem. (It also uses rounded corners to fix the problem you had with the other one.)

            – Schrödinger's cat
            2 hours ago
















          5
















          It is fairly easy to add cuboids but they are rotated in one frame. Presumably that's the purpose here, right? (TikZ does not have a 3D engine, so you need to decide yourself which faces are to be drawn, which is why there is an ifnum. The y' axis is hard coded to be in the background layer...)



          documentclass[border=2mm,tikz]standalone 
          usepackagetikz-3dplot
          usetikzlibrarybackgrounds
          begindocument
          tdplotsetmaincoords60-15
          begintikzpicture[tdplot_main_coords,scale=1.5,line join=round,>=latex,
          line cap=round,declare function=fA(t)=-sin(t*144/(1+t/5));
          fAprime(t)=pow(60/(5+t),2)*cos(t*144/(1+t/5))*pi/180;
          fB(t)=-sin(t*216/(1+t*4/15));
          fBprime(t)=6*pow(90/(15+t*4),2)*cos(t*216/(1+t*4/15))*pi/180;,
          pics/coordsys/.style =
          code = tikzsetcoordsys/.cd,#1
          draw [->,pic actions] (0,0,0) -- +(1,0,0)[red] node[pos=1.1]
          $pgfkeysvalueof/tikz/coordsys/x$;
          beginscope[on background layer]
          draw [->,pic actions] (0,0,0) -- +(0,1,0)[green!60!black] node[pos=1.1]
          $pgfkeysvalueof/tikz/coordsys/y$;
          endscope
          draw [->,pic actions] (0,0,0) -- +(0,0,1)[blue] node[pos=1.1]
          $pgfkeysvalueof/tikz/coordsys/z$;

          ,coordsys/.cd,x/.initial=x,y/.initial=y,z/.initial=z]
          draw[dashed] plot[variable=t,domain=0:5] (t,3,fA(t));
          draw[dashed] plot[variable=t,domain=0:3.25] (t,0,fB(t));
          foreach X [count=Y] in 0,...,3
          draw (X*5/3,3,fA(X*5/3)) coordinate (PY)
          -- (X*3.25/3,0,fB(X*3.25/3)) coordinate (QY);
          tdplotsetrotatedcoords0atan2(fAprime(X*5/3),1)0
          beginscope[tdplot_rotated_coords]
          path (PY) piccoordsys;
          pgfmathsetmacromyangatan2(fAprime(X*1.25),1)
          pgfmathtruncatemacroitestsign(myang)
          pgfmathsetmacrocuboiddim2/3% 2/3 = 1/scale where scale=1.5
          draw[fill opacity=0.5,fill=gray!70] ($(PY)+(0,0,0)$)
          -- ($(PY)+(cuboiddim,0,0)$) -- ($(PY)+(cuboiddim,0,cuboiddim)$)
          -- ($(PY)+(0,0,cuboiddim)$) -- cycle;
          ifnumitest=-1
          draw[fill opacity=0.5,fill=gray] ($(PY)+(cuboiddim,0,0)$)
          -- ($(PY)+(cuboiddim,0,cuboiddim)$) -- ($(QY)+(cuboiddim,0,cuboiddim)$)
          -- ($(QY)+(cuboiddim,0,0)$) -- cycle;
          else
          draw[fill opacity=0.5,fill=gray] ($(PY)+(0,0,0)$)
          -- ($(PY)+(0,0,cuboiddim)$) -- ($(QY)+(0,0,cuboiddim)$)
          -- ($(QY)+(0,0,0)$) -- cycle;
          fi
          draw[fill opacity=0.5,fill=gray!70] ($(PY)+(0,0,cuboiddim)$)
          -- ($(PY)+(cuboiddim,0,cuboiddim)$) -- ($(QY)+(cuboiddim,0,cuboiddim)$)
          -- ($(QY)+(0,0,cuboiddim)$) -- cycle;
          draw[fill opacity=0.5,fill=gray!50] ($(QY)+(0,0,0)$)
          -- ($(QY)+(cuboiddim,0,0)$) -- ($(QY)+(cuboiddim,0,cuboiddim)$)
          -- ($(QY)+(0,0,cuboiddim)$) -- cycle;
          endscope
          tdplotsetrotatedcoords0atan2(fBprime(X*3.25/3),1)0
          beginscope[tdplot_rotated_coords]
          path (QY) piccoordsys=x=x',y=y',z=z';
          endscope

          endtikzpicture
          enddocument


          enter image description here






          share|improve this answer



























          • Wow, that was fast and I really apprechiate your help. But your solution is a bit too advanced for my current understanding. I get it until you start rotating the frames according to the derivative. Why is there the factor 1.25 in fprime? The lower coordinate systems and cubes are as I want them, but I'd need the upper frames be rotated with a fixed rotation w.r.t. the lower ones. Both on body but with a relative rotation to each other. And can you make the cubes over the frames so it seems as the frames are inside? And 4 timesteps /bodies should be enough, where do I adjust this?

            – avermaet
            7 hours ago






          • 1





            @avermaet The number of steps is controlled by 0,...,4, 1.25 was just to evaluate fA at 0,1.25,2.5... rather than 0,1,2,.... The x and z dimensions the cuboids are given by 0.25, one can make this a parameter. The problem with making the cuboids much larger will be that they overlap and TikZ has no 3d engine, so it won't look good.

            – Schrödinger's cat
            7 hours ago











          • Yes, thats why I just want 4 cuboids. Or 3d boxes. The frames should appear in the box not below, like it is at the moment. I tried to adjust the number of "boxes/frames" before but then suddenly everything broke.

            – avermaet
            7 hours ago












          • @avermaet I added something along those lines.

            – Schrödinger's cat
            7 hours ago






          • 1





            @avermaet Since I see you are playing with cuboids: a version that shows always the visible sides can be found e.g. here. Such cuboids may be a better fit to your problem. (It also uses rounded corners to fix the problem you had with the other one.)

            – Schrödinger's cat
            2 hours ago














          5














          5










          5









          It is fairly easy to add cuboids but they are rotated in one frame. Presumably that's the purpose here, right? (TikZ does not have a 3D engine, so you need to decide yourself which faces are to be drawn, which is why there is an ifnum. The y' axis is hard coded to be in the background layer...)



          documentclass[border=2mm,tikz]standalone 
          usepackagetikz-3dplot
          usetikzlibrarybackgrounds
          begindocument
          tdplotsetmaincoords60-15
          begintikzpicture[tdplot_main_coords,scale=1.5,line join=round,>=latex,
          line cap=round,declare function=fA(t)=-sin(t*144/(1+t/5));
          fAprime(t)=pow(60/(5+t),2)*cos(t*144/(1+t/5))*pi/180;
          fB(t)=-sin(t*216/(1+t*4/15));
          fBprime(t)=6*pow(90/(15+t*4),2)*cos(t*216/(1+t*4/15))*pi/180;,
          pics/coordsys/.style =
          code = tikzsetcoordsys/.cd,#1
          draw [->,pic actions] (0,0,0) -- +(1,0,0)[red] node[pos=1.1]
          $pgfkeysvalueof/tikz/coordsys/x$;
          beginscope[on background layer]
          draw [->,pic actions] (0,0,0) -- +(0,1,0)[green!60!black] node[pos=1.1]
          $pgfkeysvalueof/tikz/coordsys/y$;
          endscope
          draw [->,pic actions] (0,0,0) -- +(0,0,1)[blue] node[pos=1.1]
          $pgfkeysvalueof/tikz/coordsys/z$;

          ,coordsys/.cd,x/.initial=x,y/.initial=y,z/.initial=z]
          draw[dashed] plot[variable=t,domain=0:5] (t,3,fA(t));
          draw[dashed] plot[variable=t,domain=0:3.25] (t,0,fB(t));
          foreach X [count=Y] in 0,...,3
          draw (X*5/3,3,fA(X*5/3)) coordinate (PY)
          -- (X*3.25/3,0,fB(X*3.25/3)) coordinate (QY);
          tdplotsetrotatedcoords0atan2(fAprime(X*5/3),1)0
          beginscope[tdplot_rotated_coords]
          path (PY) piccoordsys;
          pgfmathsetmacromyangatan2(fAprime(X*1.25),1)
          pgfmathtruncatemacroitestsign(myang)
          pgfmathsetmacrocuboiddim2/3% 2/3 = 1/scale where scale=1.5
          draw[fill opacity=0.5,fill=gray!70] ($(PY)+(0,0,0)$)
          -- ($(PY)+(cuboiddim,0,0)$) -- ($(PY)+(cuboiddim,0,cuboiddim)$)
          -- ($(PY)+(0,0,cuboiddim)$) -- cycle;
          ifnumitest=-1
          draw[fill opacity=0.5,fill=gray] ($(PY)+(cuboiddim,0,0)$)
          -- ($(PY)+(cuboiddim,0,cuboiddim)$) -- ($(QY)+(cuboiddim,0,cuboiddim)$)
          -- ($(QY)+(cuboiddim,0,0)$) -- cycle;
          else
          draw[fill opacity=0.5,fill=gray] ($(PY)+(0,0,0)$)
          -- ($(PY)+(0,0,cuboiddim)$) -- ($(QY)+(0,0,cuboiddim)$)
          -- ($(QY)+(0,0,0)$) -- cycle;
          fi
          draw[fill opacity=0.5,fill=gray!70] ($(PY)+(0,0,cuboiddim)$)
          -- ($(PY)+(cuboiddim,0,cuboiddim)$) -- ($(QY)+(cuboiddim,0,cuboiddim)$)
          -- ($(QY)+(0,0,cuboiddim)$) -- cycle;
          draw[fill opacity=0.5,fill=gray!50] ($(QY)+(0,0,0)$)
          -- ($(QY)+(cuboiddim,0,0)$) -- ($(QY)+(cuboiddim,0,cuboiddim)$)
          -- ($(QY)+(0,0,cuboiddim)$) -- cycle;
          endscope
          tdplotsetrotatedcoords0atan2(fBprime(X*3.25/3),1)0
          beginscope[tdplot_rotated_coords]
          path (QY) piccoordsys=x=x',y=y',z=z';
          endscope

          endtikzpicture
          enddocument


          enter image description here






          share|improve this answer















          It is fairly easy to add cuboids but they are rotated in one frame. Presumably that's the purpose here, right? (TikZ does not have a 3D engine, so you need to decide yourself which faces are to be drawn, which is why there is an ifnum. The y' axis is hard coded to be in the background layer...)



          documentclass[border=2mm,tikz]standalone 
          usepackagetikz-3dplot
          usetikzlibrarybackgrounds
          begindocument
          tdplotsetmaincoords60-15
          begintikzpicture[tdplot_main_coords,scale=1.5,line join=round,>=latex,
          line cap=round,declare function=fA(t)=-sin(t*144/(1+t/5));
          fAprime(t)=pow(60/(5+t),2)*cos(t*144/(1+t/5))*pi/180;
          fB(t)=-sin(t*216/(1+t*4/15));
          fBprime(t)=6*pow(90/(15+t*4),2)*cos(t*216/(1+t*4/15))*pi/180;,
          pics/coordsys/.style =
          code = tikzsetcoordsys/.cd,#1
          draw [->,pic actions] (0,0,0) -- +(1,0,0)[red] node[pos=1.1]
          $pgfkeysvalueof/tikz/coordsys/x$;
          beginscope[on background layer]
          draw [->,pic actions] (0,0,0) -- +(0,1,0)[green!60!black] node[pos=1.1]
          $pgfkeysvalueof/tikz/coordsys/y$;
          endscope
          draw [->,pic actions] (0,0,0) -- +(0,0,1)[blue] node[pos=1.1]
          $pgfkeysvalueof/tikz/coordsys/z$;

          ,coordsys/.cd,x/.initial=x,y/.initial=y,z/.initial=z]
          draw[dashed] plot[variable=t,domain=0:5] (t,3,fA(t));
          draw[dashed] plot[variable=t,domain=0:3.25] (t,0,fB(t));
          foreach X [count=Y] in 0,...,3
          draw (X*5/3,3,fA(X*5/3)) coordinate (PY)
          -- (X*3.25/3,0,fB(X*3.25/3)) coordinate (QY);
          tdplotsetrotatedcoords0atan2(fAprime(X*5/3),1)0
          beginscope[tdplot_rotated_coords]
          path (PY) piccoordsys;
          pgfmathsetmacromyangatan2(fAprime(X*1.25),1)
          pgfmathtruncatemacroitestsign(myang)
          pgfmathsetmacrocuboiddim2/3% 2/3 = 1/scale where scale=1.5
          draw[fill opacity=0.5,fill=gray!70] ($(PY)+(0,0,0)$)
          -- ($(PY)+(cuboiddim,0,0)$) -- ($(PY)+(cuboiddim,0,cuboiddim)$)
          -- ($(PY)+(0,0,cuboiddim)$) -- cycle;
          ifnumitest=-1
          draw[fill opacity=0.5,fill=gray] ($(PY)+(cuboiddim,0,0)$)
          -- ($(PY)+(cuboiddim,0,cuboiddim)$) -- ($(QY)+(cuboiddim,0,cuboiddim)$)
          -- ($(QY)+(cuboiddim,0,0)$) -- cycle;
          else
          draw[fill opacity=0.5,fill=gray] ($(PY)+(0,0,0)$)
          -- ($(PY)+(0,0,cuboiddim)$) -- ($(QY)+(0,0,cuboiddim)$)
          -- ($(QY)+(0,0,0)$) -- cycle;
          fi
          draw[fill opacity=0.5,fill=gray!70] ($(PY)+(0,0,cuboiddim)$)
          -- ($(PY)+(cuboiddim,0,cuboiddim)$) -- ($(QY)+(cuboiddim,0,cuboiddim)$)
          -- ($(QY)+(0,0,cuboiddim)$) -- cycle;
          draw[fill opacity=0.5,fill=gray!50] ($(QY)+(0,0,0)$)
          -- ($(QY)+(cuboiddim,0,0)$) -- ($(QY)+(cuboiddim,0,cuboiddim)$)
          -- ($(QY)+(0,0,cuboiddim)$) -- cycle;
          endscope
          tdplotsetrotatedcoords0atan2(fBprime(X*3.25/3),1)0
          beginscope[tdplot_rotated_coords]
          path (QY) piccoordsys=x=x',y=y',z=z';
          endscope

          endtikzpicture
          enddocument


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 7 hours ago

























          answered 8 hours ago









          Schrödinger's catSchrödinger's cat

          7,52011 silver badges23 bronze badges




          7,52011 silver badges23 bronze badges















          • Wow, that was fast and I really apprechiate your help. But your solution is a bit too advanced for my current understanding. I get it until you start rotating the frames according to the derivative. Why is there the factor 1.25 in fprime? The lower coordinate systems and cubes are as I want them, but I'd need the upper frames be rotated with a fixed rotation w.r.t. the lower ones. Both on body but with a relative rotation to each other. And can you make the cubes over the frames so it seems as the frames are inside? And 4 timesteps /bodies should be enough, where do I adjust this?

            – avermaet
            7 hours ago






          • 1





            @avermaet The number of steps is controlled by 0,...,4, 1.25 was just to evaluate fA at 0,1.25,2.5... rather than 0,1,2,.... The x and z dimensions the cuboids are given by 0.25, one can make this a parameter. The problem with making the cuboids much larger will be that they overlap and TikZ has no 3d engine, so it won't look good.

            – Schrödinger's cat
            7 hours ago











          • Yes, thats why I just want 4 cuboids. Or 3d boxes. The frames should appear in the box not below, like it is at the moment. I tried to adjust the number of "boxes/frames" before but then suddenly everything broke.

            – avermaet
            7 hours ago












          • @avermaet I added something along those lines.

            – Schrödinger's cat
            7 hours ago






          • 1





            @avermaet Since I see you are playing with cuboids: a version that shows always the visible sides can be found e.g. here. Such cuboids may be a better fit to your problem. (It also uses rounded corners to fix the problem you had with the other one.)

            – Schrödinger's cat
            2 hours ago


















          • Wow, that was fast and I really apprechiate your help. But your solution is a bit too advanced for my current understanding. I get it until you start rotating the frames according to the derivative. Why is there the factor 1.25 in fprime? The lower coordinate systems and cubes are as I want them, but I'd need the upper frames be rotated with a fixed rotation w.r.t. the lower ones. Both on body but with a relative rotation to each other. And can you make the cubes over the frames so it seems as the frames are inside? And 4 timesteps /bodies should be enough, where do I adjust this?

            – avermaet
            7 hours ago






          • 1





            @avermaet The number of steps is controlled by 0,...,4, 1.25 was just to evaluate fA at 0,1.25,2.5... rather than 0,1,2,.... The x and z dimensions the cuboids are given by 0.25, one can make this a parameter. The problem with making the cuboids much larger will be that they overlap and TikZ has no 3d engine, so it won't look good.

            – Schrödinger's cat
            7 hours ago











          • Yes, thats why I just want 4 cuboids. Or 3d boxes. The frames should appear in the box not below, like it is at the moment. I tried to adjust the number of "boxes/frames" before but then suddenly everything broke.

            – avermaet
            7 hours ago












          • @avermaet I added something along those lines.

            – Schrödinger's cat
            7 hours ago






          • 1





            @avermaet Since I see you are playing with cuboids: a version that shows always the visible sides can be found e.g. here. Such cuboids may be a better fit to your problem. (It also uses rounded corners to fix the problem you had with the other one.)

            – Schrödinger's cat
            2 hours ago

















          Wow, that was fast and I really apprechiate your help. But your solution is a bit too advanced for my current understanding. I get it until you start rotating the frames according to the derivative. Why is there the factor 1.25 in fprime? The lower coordinate systems and cubes are as I want them, but I'd need the upper frames be rotated with a fixed rotation w.r.t. the lower ones. Both on body but with a relative rotation to each other. And can you make the cubes over the frames so it seems as the frames are inside? And 4 timesteps /bodies should be enough, where do I adjust this?

          – avermaet
          7 hours ago





          Wow, that was fast and I really apprechiate your help. But your solution is a bit too advanced for my current understanding. I get it until you start rotating the frames according to the derivative. Why is there the factor 1.25 in fprime? The lower coordinate systems and cubes are as I want them, but I'd need the upper frames be rotated with a fixed rotation w.r.t. the lower ones. Both on body but with a relative rotation to each other. And can you make the cubes over the frames so it seems as the frames are inside? And 4 timesteps /bodies should be enough, where do I adjust this?

          – avermaet
          7 hours ago




          1




          1





          @avermaet The number of steps is controlled by 0,...,4, 1.25 was just to evaluate fA at 0,1.25,2.5... rather than 0,1,2,.... The x and z dimensions the cuboids are given by 0.25, one can make this a parameter. The problem with making the cuboids much larger will be that they overlap and TikZ has no 3d engine, so it won't look good.

          – Schrödinger's cat
          7 hours ago





          @avermaet The number of steps is controlled by 0,...,4, 1.25 was just to evaluate fA at 0,1.25,2.5... rather than 0,1,2,.... The x and z dimensions the cuboids are given by 0.25, one can make this a parameter. The problem with making the cuboids much larger will be that they overlap and TikZ has no 3d engine, so it won't look good.

          – Schrödinger's cat
          7 hours ago













          Yes, thats why I just want 4 cuboids. Or 3d boxes. The frames should appear in the box not below, like it is at the moment. I tried to adjust the number of "boxes/frames" before but then suddenly everything broke.

          – avermaet
          7 hours ago






          Yes, thats why I just want 4 cuboids. Or 3d boxes. The frames should appear in the box not below, like it is at the moment. I tried to adjust the number of "boxes/frames" before but then suddenly everything broke.

          – avermaet
          7 hours ago














          @avermaet I added something along those lines.

          – Schrödinger's cat
          7 hours ago





          @avermaet I added something along those lines.

          – Schrödinger's cat
          7 hours ago




          1




          1





          @avermaet Since I see you are playing with cuboids: a version that shows always the visible sides can be found e.g. here. Such cuboids may be a better fit to your problem. (It also uses rounded corners to fix the problem you had with the other one.)

          – Schrödinger's cat
          2 hours ago






          @avermaet Since I see you are playing with cuboids: a version that shows always the visible sides can be found e.g. here. Such cuboids may be a better fit to your problem. (It also uses rounded corners to fix the problem you had with the other one.)

          – Schrödinger's cat
          2 hours ago












          avermaet is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded

















          avermaet is a new contributor. Be nice, and check out our Code of Conduct.












          avermaet is a new contributor. Be nice, and check out our Code of Conduct.











          avermaet 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%2f508495%2fcube-around-2-points-with-correct-perspective%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

          19. јануар Садржај Догађаји Рођења Смрти Празници и дани сећања Види још Референце Мени за навигацијуу

          Israel Cuprins Etimologie | Istorie | Geografie | Politică | Demografie | Educație | Economie | Cultură | Note explicative | Note bibliografice | Bibliografie | Legături externe | Meniu de navigaresite web oficialfacebooktweeterGoogle+Instagramcanal YouTubeInstagramtextmodificaremodificarewww.technion.ac.ilnew.huji.ac.ilwww.weizmann.ac.ilwww1.biu.ac.ilenglish.tau.ac.ilwww.haifa.ac.ilin.bgu.ac.ilwww.openu.ac.ilwww.ariel.ac.ilCIA FactbookHarta Israelului"Negotiating Jerusalem," Palestine–Israel JournalThe Schizoid Nature of Modern Hebrew: A Slavic Language in Search of a Semitic Past„Arabic in Israel: an official language and a cultural bridge”„Latest Population Statistics for Israel”„Israel Population”„Tables”„Report for Selected Countries and Subjects”Human Development Report 2016: Human Development for Everyone„Distribution of family income - Gini index”The World FactbookJerusalem Law„Israel”„Israel”„Zionist Leaders: David Ben-Gurion 1886–1973”„The status of Jerusalem”„Analysis: Kadima's big plans”„Israel's Hard-Learned Lessons”„The Legacy of Undefined Borders, Tel Aviv Notes No. 40, 5 iunie 2002”„Israel Journal: A Land Without Borders”„Population”„Israel closes decade with population of 7.5 million”Time Series-DataBank„Selected Statistics on Jerusalem Day 2007 (Hebrew)”Golan belongs to Syria, Druze protestGlobal Survey 2006: Middle East Progress Amid Global Gains in FreedomWHO: Life expectancy in Israel among highest in the worldInternational Monetary Fund, World Economic Outlook Database, April 2011: Nominal GDP list of countries. Data for the year 2010.„Israel's accession to the OECD”Popular Opinion„On the Move”Hosea 12:5„Walking the Bible Timeline”„Palestine: History”„Return to Zion”An invention called 'the Jewish people' – Haaretz – Israel NewsoriginalJewish and Non-Jewish Population of Palestine-Israel (1517–2004)ImmigrationJewishvirtuallibrary.orgChapter One: The Heralders of Zionism„The birth of modern Israel: A scrap of paper that changed history”„League of Nations: The Mandate for Palestine, 24 iulie 1922”The Population of Palestine Prior to 1948originalBackground Paper No. 47 (ST/DPI/SER.A/47)History: Foreign DominationTwo Hundred and Seventh Plenary Meeting„Israel (Labor Zionism)”Population, by Religion and Population GroupThe Suez CrisisAdolf EichmannJustice Ministry Reply to Amnesty International Report„The Interregnum”Israel Ministry of Foreign Affairs – The Palestinian National Covenant- July 1968Research on terrorism: trends, achievements & failuresThe Routledge Atlas of the Arab–Israeli conflict: The Complete History of the Struggle and the Efforts to Resolve It"George Habash, Palestinian Terrorism Tactician, Dies at 82."„1973: Arab states attack Israeli forces”Agranat Commission„Has Israel Annexed East Jerusalem?”original„After 4 Years, Intifada Still Smolders”From the End of the Cold War to 2001originalThe Oslo Accords, 1993Israel-PLO Recognition – Exchange of Letters between PM Rabin and Chairman Arafat – Sept 9- 1993Foundation for Middle East PeaceSources of Population Growth: Total Israeli Population and Settler Population, 1991–2003original„Israel marks Rabin assassination”The Wye River Memorandumoriginal„West Bank barrier route disputed, Israeli missile kills 2”"Permanent Ceasefire to Be Based on Creation Of Buffer Zone Free of Armed Personnel Other than UN, Lebanese Forces"„Hezbollah kills 8 soldiers, kidnaps two in offensive on northern border”„Olmert confirms peace talks with Syria”„Battleground Gaza: Israeli ground forces invade the strip”„IDF begins Gaza troop withdrawal, hours after ending 3-week offensive”„THE LAND: Geography and Climate”„Area of districts, sub-districts, natural regions and lakes”„Israel - Geography”„Makhteshim Country”Israel and the Palestinian Territories„Makhtesh Ramon”„The Living Dead Sea”„Temperatures reach record high in Pakistan”„Climate Extremes In Israel”Israel in figures„Deuteronom”„JNF: 240 million trees planted since 1901”„Vegetation of Israel and Neighboring Countries”Environmental Law in Israel„Executive branch”„Israel's election process explained”„The Electoral System in Israel”„Constitution for Israel”„All 120 incoming Knesset members”„Statul ISRAEL”„The Judiciary: The Court System”„Israel's high court unique in region”„Israel and the International Criminal Court: A Legal Battlefield”„Localities and population, by population group, district, sub-district and natural region”„Israel: Districts, Major Cities, Urban Localities & Metropolitan Areas”„Israel-Egypt Relations: Background & Overview of Peace Treaty”„Solana to Haaretz: New Rules of War Needed for Age of Terror”„Israel's Announcement Regarding Settlements”„United Nations Security Council Resolution 497”„Security Council resolution 478 (1980) on the status of Jerusalem”„Arabs will ask U.N. to seek razing of Israeli wall”„Olmert: Willing to trade land for peace”„Mapping Peace between Syria and Israel”„Egypt: Israel must accept the land-for-peace formula”„Israel: Age structure from 2005 to 2015”„Global, regional, and national disability-adjusted life years (DALYs) for 306 diseases and injuries and healthy life expectancy (HALE) for 188 countries, 1990–2013: quantifying the epidemiological transition”10.1016/S0140-6736(15)61340-X„World Health Statistics 2014”„Life expectancy for Israeli men world's 4th highest”„Family Structure and Well-Being Across Israel's Diverse Population”„Fertility among Jewish and Muslim Women in Israel, by Level of Religiosity, 1979-2009”„Israel leaders in birth rate, but poverty major challenge”„Ethnic Groups”„Israel's population: Over 8.5 million”„Israel - Ethnic groups”„Jews, by country of origin and age”„Minority Communities in Israel: Background & Overview”„Israel”„Language in Israel”„Selected Data from the 2011 Social Survey on Mastery of the Hebrew Language and Usage of Languages”„Religions”„5 facts about Israeli Druze, a unique religious and ethnic group”„Israël”Israel Country Study Guide„Haredi city in Negev – blessing or curse?”„New town Harish harbors hopes of being more than another Pleasantville”„List of localities, in alphabetical order”„Muncitorii români, doriți în Israel”„Prietenia româno-israeliană la nevoie se cunoaște”„The Higher Education System in Israel”„Middle East”„Academic Ranking of World Universities 2016”„Israel”„Israel”„Jewish Nobel Prize Winners”„All Nobel Prizes in Literature”„All Nobel Peace Prizes”„All Prizes in Economic Sciences”„All Nobel Prizes in Chemistry”„List of Fields Medallists”„Sakharov Prize”„Țara care și-a sfidat "destinul" și se bate umăr la umăr cu Silicon Valley”„Apple's R&D center in Israel grew to about 800 employees”„Tim Cook: Apple's Herzliya R&D center second-largest in world”„Lecții de economie de la Israel”„Land use”Israel Investment and Business GuideA Country Study: IsraelCentral Bureau of StatisticsFlorin Diaconu, „Kadima: Flexibilitate și pragmatism, dar nici un compromis în chestiuni vitale", în Revista Institutului Diplomatic Român, anul I, numărul I, semestrul I, 2006, pp. 71-72Florin Diaconu, „Likud: Dreapta israeliană constant opusă retrocedării teritoriilor cureite prin luptă în 1967", în Revista Institutului Diplomatic Român, anul I, numărul I, semestrul I, 2006, pp. 73-74MassadaIsraelul a crescut in 50 de ani cât alte state intr-un mileniuIsrael Government PortalIsraelIsraelIsraelmmmmmXX451232cb118646298(data)4027808-634110000 0004 0372 0767n7900328503691455-bb46-37e3-91d2-cb064a35ffcc1003570400564274ge1294033523775214929302638955X146498911146498911

          Кастелфранко ди Сопра Становништво Референце Спољашње везе Мени за навигацију43°37′18″ СГШ; 11°33′32″ ИГД / 43.62156° СГШ; 11.55885° ИГД / 43.62156; 11.5588543°37′18″ СГШ; 11°33′32″ ИГД / 43.62156° СГШ; 11.55885° ИГД / 43.62156; 11.558853179688„The GeoNames geographical database”„Istituto Nazionale di Statistica”проширитиууWorldCat156923403n850174324558639-1cb14643287r(подаци)