How to get trace to get a cylinder when I rotate a rectangle?Is it possible to draw a 3d cylinder using TikZ-3dplot?How draw a cylinder with 3 balls?how I can draw an skew cylinder (rotate around x axis) and fill it (in 3D tikz)?How to rotate a circle around two axes?How can I draw cylinder inside a sphere like this picture with Tikz?How can I draw this cylinder with 3D?How to draw a cylinder in prism?How to draw a square on cylinder?

MagSafe: Where is the charger ID stored?

Thought experiment and possible contradiction between electromagnetism and special relativity

Expanding powers of expressions of the form ax+b

Higman's lemma and a manuscript of Erdős and Rado

Adoption records in 1871 based on census info

Do clerics commit a sin if they do not recite the liturgy of the hours?

Discussing work with supervisor in an invited dinner with his family

How does the OS tell whether an "Address is already in use"?

How to get trace to get a cylinder when I rotate a rectangle?

How to check whether a sublist exist in a huge database lists in a fast way?

Was the Boeing 2707 design flawed?

What is Spectral Subtraction for noise reduction?

Why should a self-financing strategy be previsible?

using resizegather inside tabular: how to remove extra vertical space above and below the equation?

Talk interpreter

Unlock your Lock

Is this password scheme legit?

Is first Ubuntu user root?

Expressing the act of drawing

Convergence of series of normally distributed random variables

about to retire but not retired yet, employed but not working any more

To what extent are we obligated to continue to procreate beyond having two kids?

Changing JPEG to RAW to use on Lightroom?

Retroactively modifying humans for Earth?



How to get trace to get a cylinder when I rotate a rectangle?


Is it possible to draw a 3d cylinder using TikZ-3dplot?How draw a cylinder with 3 balls?how I can draw an skew cylinder (rotate around x axis) and fill it (in 3D tikz)?How to rotate a circle around two axes?How can I draw cylinder inside a sphere like this picture with Tikz?How can I draw this cylinder with 3D?How to draw a cylinder in prism?How to draw a square on cylinder?






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








4















I am trying to rotate a rectangle to make trace and get a cylinder. My code



documentclass[border=2mm,12pt,tikz]standalone
usepackagetikz-3dplot
begindocument
pgfmathsetmacromyr3
pgfmathsetmacroh4
foreach X in 10,20,...,350
tdplotsetmaincoords70X
begintikzpicture[tdplot_main_coords,scale=1,line cap=butt,line join=round]
beginscope[canvas is xy plane at z=0]
coordinate (O) at (0,0);
coordinate (A) at (0,myr);

endscope
beginscope[canvas is xy plane at z=h]
coordinate (O') at (0,0);
coordinate (B) at (0,myr);
endscope
foreach v/position in B/below,O/below,A/below,O'/above draw[draw =black, fill=black] (v) circle (1pt) node [position=0.2mm] $v$;

draw[thick] (O) -- (A) -- (B) -- (O') -- cycle;
endtikzpicture
enddocument


How to get the result?



enter image description here










share|improve this question





















  • 1





    Is this your result?

    – minhthien_2016
    7 hours ago






  • 1





    Yes. Thank you very much.

    – Thuy Nguyen
    1 hour ago

















4















I am trying to rotate a rectangle to make trace and get a cylinder. My code



documentclass[border=2mm,12pt,tikz]standalone
usepackagetikz-3dplot
begindocument
pgfmathsetmacromyr3
pgfmathsetmacroh4
foreach X in 10,20,...,350
tdplotsetmaincoords70X
begintikzpicture[tdplot_main_coords,scale=1,line cap=butt,line join=round]
beginscope[canvas is xy plane at z=0]
coordinate (O) at (0,0);
coordinate (A) at (0,myr);

endscope
beginscope[canvas is xy plane at z=h]
coordinate (O') at (0,0);
coordinate (B) at (0,myr);
endscope
foreach v/position in B/below,O/below,A/below,O'/above draw[draw =black, fill=black] (v) circle (1pt) node [position=0.2mm] $v$;

draw[thick] (O) -- (A) -- (B) -- (O') -- cycle;
endtikzpicture
enddocument


How to get the result?



enter image description here










share|improve this question





















  • 1





    Is this your result?

    – minhthien_2016
    7 hours ago






  • 1





    Yes. Thank you very much.

    – Thuy Nguyen
    1 hour ago













4












4








4








I am trying to rotate a rectangle to make trace and get a cylinder. My code



documentclass[border=2mm,12pt,tikz]standalone
usepackagetikz-3dplot
begindocument
pgfmathsetmacromyr3
pgfmathsetmacroh4
foreach X in 10,20,...,350
tdplotsetmaincoords70X
begintikzpicture[tdplot_main_coords,scale=1,line cap=butt,line join=round]
beginscope[canvas is xy plane at z=0]
coordinate (O) at (0,0);
coordinate (A) at (0,myr);

endscope
beginscope[canvas is xy plane at z=h]
coordinate (O') at (0,0);
coordinate (B) at (0,myr);
endscope
foreach v/position in B/below,O/below,A/below,O'/above draw[draw =black, fill=black] (v) circle (1pt) node [position=0.2mm] $v$;

draw[thick] (O) -- (A) -- (B) -- (O') -- cycle;
endtikzpicture
enddocument


How to get the result?



enter image description here










share|improve this question
















I am trying to rotate a rectangle to make trace and get a cylinder. My code



documentclass[border=2mm,12pt,tikz]standalone
usepackagetikz-3dplot
begindocument
pgfmathsetmacromyr3
pgfmathsetmacroh4
foreach X in 10,20,...,350
tdplotsetmaincoords70X
begintikzpicture[tdplot_main_coords,scale=1,line cap=butt,line join=round]
beginscope[canvas is xy plane at z=0]
coordinate (O) at (0,0);
coordinate (A) at (0,myr);

endscope
beginscope[canvas is xy plane at z=h]
coordinate (O') at (0,0);
coordinate (B) at (0,myr);
endscope
foreach v/position in B/below,O/below,A/below,O'/above draw[draw =black, fill=black] (v) circle (1pt) node [position=0.2mm] $v$;

draw[thick] (O) -- (A) -- (B) -- (O') -- cycle;
endtikzpicture
enddocument


How to get the result?



enter image description here







3d tikz-3dplot






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 7 hours ago









minhthien_2016

2,0781 gold badge12 silver badges19 bronze badges




2,0781 gold badge12 silver badges19 bronze badges










asked 9 hours ago









Thuy NguyenThuy Nguyen

1245 bronze badges




1245 bronze badges










  • 1





    Is this your result?

    – minhthien_2016
    7 hours ago






  • 1





    Yes. Thank you very much.

    – Thuy Nguyen
    1 hour ago












  • 1





    Is this your result?

    – minhthien_2016
    7 hours ago






  • 1





    Yes. Thank you very much.

    – Thuy Nguyen
    1 hour ago







1




1





Is this your result?

– minhthien_2016
7 hours ago





Is this your result?

– minhthien_2016
7 hours ago




1




1





Yes. Thank you very much.

– Thuy Nguyen
1 hour ago





Yes. Thank you very much.

– Thuy Nguyen
1 hour ago










1 Answer
1






active

oldest

votes


















6















This exploits that coordinates are global. Even though we draw a new picture in each frame, the coordinates A-Z and B-Z are still known. And it is arguably simpler to draw the rectangle in the yz plane, and to use rotated coordinates.



documentclass[border=2mm,12pt,tikz]standalone
usepackagetikz-3dplot
begindocument
pgfmathsetmacromyr3
pgfmathsetmacroh4
tdplotsetmaincoords700
foreach X [count=Z] in 0,10,...,360

begintikzpicture[tdplot_main_coords,scale=1,line cap=butt,line join=round]
path[tdplot_screen_coords,use as bounding box] (-1.2*myr,-2) rectangle (1.2*myr,1.25*h);
tdplotsetrotatedcoordsX00
beginscope[tdplot_rotated_coords,canvas is yz plane at x=0]
path (0,0) coordinate (O)
(myr,0) coordinate (A-Z)(myr,0) coordinate (A)
(0,h) coordinate (O')
(myr,h) coordinate (B-Z) (myr,h) coordinate (B);
endscope
foreach v/position in B/below,O/below,A/below,O'/above
draw[draw =black, fill=black] (v) circle (1pt)
node [position=0.2mm] $v$;

draw[thick] (O) -- (A-Z) -- (B-Z) -- (O') -- cycle;
ifnumZ>1
draw plot[smooth,samples at=1,...,Z] (B-x);
ifnumZ>8
ifnumZ>27
draw[dashed] plot[smooth,samples at=1,...,9] (A-x);
draw[dashed] plot[smooth,samples at=28,...,Z] (A-x);
draw plot[smooth,samples at=9,...,28] (A-x);
draw (-myr,0,0) -- (-myr,0,h);
draw (myr,0,0) -- (myr,0,h);
else
draw[dashed] plot[smooth,samples at=1,...,9] (A-x);
draw plot[smooth,samples at=9,...,Z] (A-x);
draw (-myr,0,0) -- (-myr,0,h);
fi
else
draw plot[smooth,samples at=1,...,Z] (A-x);
fi
fi
endtikzpicture
enddocument


enter image description here






share|improve this answer



























  • +1 Very cool ...

    – chishjmutoji 2
    2 hours ago











  • Can we make trace of every points on the rectangle OABO'?

    – minhthien_2016
    1 hour 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/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%2f505731%2fhow-to-get-trace-to-get-a-cylinder-when-i-rotate-a-rectangle%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









6















This exploits that coordinates are global. Even though we draw a new picture in each frame, the coordinates A-Z and B-Z are still known. And it is arguably simpler to draw the rectangle in the yz plane, and to use rotated coordinates.



documentclass[border=2mm,12pt,tikz]standalone
usepackagetikz-3dplot
begindocument
pgfmathsetmacromyr3
pgfmathsetmacroh4
tdplotsetmaincoords700
foreach X [count=Z] in 0,10,...,360

begintikzpicture[tdplot_main_coords,scale=1,line cap=butt,line join=round]
path[tdplot_screen_coords,use as bounding box] (-1.2*myr,-2) rectangle (1.2*myr,1.25*h);
tdplotsetrotatedcoordsX00
beginscope[tdplot_rotated_coords,canvas is yz plane at x=0]
path (0,0) coordinate (O)
(myr,0) coordinate (A-Z)(myr,0) coordinate (A)
(0,h) coordinate (O')
(myr,h) coordinate (B-Z) (myr,h) coordinate (B);
endscope
foreach v/position in B/below,O/below,A/below,O'/above
draw[draw =black, fill=black] (v) circle (1pt)
node [position=0.2mm] $v$;

draw[thick] (O) -- (A-Z) -- (B-Z) -- (O') -- cycle;
ifnumZ>1
draw plot[smooth,samples at=1,...,Z] (B-x);
ifnumZ>8
ifnumZ>27
draw[dashed] plot[smooth,samples at=1,...,9] (A-x);
draw[dashed] plot[smooth,samples at=28,...,Z] (A-x);
draw plot[smooth,samples at=9,...,28] (A-x);
draw (-myr,0,0) -- (-myr,0,h);
draw (myr,0,0) -- (myr,0,h);
else
draw[dashed] plot[smooth,samples at=1,...,9] (A-x);
draw plot[smooth,samples at=9,...,Z] (A-x);
draw (-myr,0,0) -- (-myr,0,h);
fi
else
draw plot[smooth,samples at=1,...,Z] (A-x);
fi
fi
endtikzpicture
enddocument


enter image description here






share|improve this answer



























  • +1 Very cool ...

    – chishjmutoji 2
    2 hours ago











  • Can we make trace of every points on the rectangle OABO'?

    – minhthien_2016
    1 hour ago















6















This exploits that coordinates are global. Even though we draw a new picture in each frame, the coordinates A-Z and B-Z are still known. And it is arguably simpler to draw the rectangle in the yz plane, and to use rotated coordinates.



documentclass[border=2mm,12pt,tikz]standalone
usepackagetikz-3dplot
begindocument
pgfmathsetmacromyr3
pgfmathsetmacroh4
tdplotsetmaincoords700
foreach X [count=Z] in 0,10,...,360

begintikzpicture[tdplot_main_coords,scale=1,line cap=butt,line join=round]
path[tdplot_screen_coords,use as bounding box] (-1.2*myr,-2) rectangle (1.2*myr,1.25*h);
tdplotsetrotatedcoordsX00
beginscope[tdplot_rotated_coords,canvas is yz plane at x=0]
path (0,0) coordinate (O)
(myr,0) coordinate (A-Z)(myr,0) coordinate (A)
(0,h) coordinate (O')
(myr,h) coordinate (B-Z) (myr,h) coordinate (B);
endscope
foreach v/position in B/below,O/below,A/below,O'/above
draw[draw =black, fill=black] (v) circle (1pt)
node [position=0.2mm] $v$;

draw[thick] (O) -- (A-Z) -- (B-Z) -- (O') -- cycle;
ifnumZ>1
draw plot[smooth,samples at=1,...,Z] (B-x);
ifnumZ>8
ifnumZ>27
draw[dashed] plot[smooth,samples at=1,...,9] (A-x);
draw[dashed] plot[smooth,samples at=28,...,Z] (A-x);
draw plot[smooth,samples at=9,...,28] (A-x);
draw (-myr,0,0) -- (-myr,0,h);
draw (myr,0,0) -- (myr,0,h);
else
draw[dashed] plot[smooth,samples at=1,...,9] (A-x);
draw plot[smooth,samples at=9,...,Z] (A-x);
draw (-myr,0,0) -- (-myr,0,h);
fi
else
draw plot[smooth,samples at=1,...,Z] (A-x);
fi
fi
endtikzpicture
enddocument


enter image description here






share|improve this answer



























  • +1 Very cool ...

    – chishjmutoji 2
    2 hours ago











  • Can we make trace of every points on the rectangle OABO'?

    – minhthien_2016
    1 hour ago













6














6










6









This exploits that coordinates are global. Even though we draw a new picture in each frame, the coordinates A-Z and B-Z are still known. And it is arguably simpler to draw the rectangle in the yz plane, and to use rotated coordinates.



documentclass[border=2mm,12pt,tikz]standalone
usepackagetikz-3dplot
begindocument
pgfmathsetmacromyr3
pgfmathsetmacroh4
tdplotsetmaincoords700
foreach X [count=Z] in 0,10,...,360

begintikzpicture[tdplot_main_coords,scale=1,line cap=butt,line join=round]
path[tdplot_screen_coords,use as bounding box] (-1.2*myr,-2) rectangle (1.2*myr,1.25*h);
tdplotsetrotatedcoordsX00
beginscope[tdplot_rotated_coords,canvas is yz plane at x=0]
path (0,0) coordinate (O)
(myr,0) coordinate (A-Z)(myr,0) coordinate (A)
(0,h) coordinate (O')
(myr,h) coordinate (B-Z) (myr,h) coordinate (B);
endscope
foreach v/position in B/below,O/below,A/below,O'/above
draw[draw =black, fill=black] (v) circle (1pt)
node [position=0.2mm] $v$;

draw[thick] (O) -- (A-Z) -- (B-Z) -- (O') -- cycle;
ifnumZ>1
draw plot[smooth,samples at=1,...,Z] (B-x);
ifnumZ>8
ifnumZ>27
draw[dashed] plot[smooth,samples at=1,...,9] (A-x);
draw[dashed] plot[smooth,samples at=28,...,Z] (A-x);
draw plot[smooth,samples at=9,...,28] (A-x);
draw (-myr,0,0) -- (-myr,0,h);
draw (myr,0,0) -- (myr,0,h);
else
draw[dashed] plot[smooth,samples at=1,...,9] (A-x);
draw plot[smooth,samples at=9,...,Z] (A-x);
draw (-myr,0,0) -- (-myr,0,h);
fi
else
draw plot[smooth,samples at=1,...,Z] (A-x);
fi
fi
endtikzpicture
enddocument


enter image description here






share|improve this answer















This exploits that coordinates are global. Even though we draw a new picture in each frame, the coordinates A-Z and B-Z are still known. And it is arguably simpler to draw the rectangle in the yz plane, and to use rotated coordinates.



documentclass[border=2mm,12pt,tikz]standalone
usepackagetikz-3dplot
begindocument
pgfmathsetmacromyr3
pgfmathsetmacroh4
tdplotsetmaincoords700
foreach X [count=Z] in 0,10,...,360

begintikzpicture[tdplot_main_coords,scale=1,line cap=butt,line join=round]
path[tdplot_screen_coords,use as bounding box] (-1.2*myr,-2) rectangle (1.2*myr,1.25*h);
tdplotsetrotatedcoordsX00
beginscope[tdplot_rotated_coords,canvas is yz plane at x=0]
path (0,0) coordinate (O)
(myr,0) coordinate (A-Z)(myr,0) coordinate (A)
(0,h) coordinate (O')
(myr,h) coordinate (B-Z) (myr,h) coordinate (B);
endscope
foreach v/position in B/below,O/below,A/below,O'/above
draw[draw =black, fill=black] (v) circle (1pt)
node [position=0.2mm] $v$;

draw[thick] (O) -- (A-Z) -- (B-Z) -- (O') -- cycle;
ifnumZ>1
draw plot[smooth,samples at=1,...,Z] (B-x);
ifnumZ>8
ifnumZ>27
draw[dashed] plot[smooth,samples at=1,...,9] (A-x);
draw[dashed] plot[smooth,samples at=28,...,Z] (A-x);
draw plot[smooth,samples at=9,...,28] (A-x);
draw (-myr,0,0) -- (-myr,0,h);
draw (myr,0,0) -- (myr,0,h);
else
draw[dashed] plot[smooth,samples at=1,...,9] (A-x);
draw plot[smooth,samples at=9,...,Z] (A-x);
draw (-myr,0,0) -- (-myr,0,h);
fi
else
draw plot[smooth,samples at=1,...,Z] (A-x);
fi
fi
endtikzpicture
enddocument


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited 2 hours ago

























answered 2 hours ago









Schrödinger's catSchrödinger's cat

2,5813 silver badges10 bronze badges




2,5813 silver badges10 bronze badges















  • +1 Very cool ...

    – chishjmutoji 2
    2 hours ago











  • Can we make trace of every points on the rectangle OABO'?

    – minhthien_2016
    1 hour ago

















  • +1 Very cool ...

    – chishjmutoji 2
    2 hours ago











  • Can we make trace of every points on the rectangle OABO'?

    – minhthien_2016
    1 hour ago
















+1 Very cool ...

– chishjmutoji 2
2 hours ago





+1 Very cool ...

– chishjmutoji 2
2 hours ago













Can we make trace of every points on the rectangle OABO'?

– minhthien_2016
1 hour ago





Can we make trace of every points on the rectangle OABO'?

– minhthien_2016
1 hour ago

















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%2f505731%2fhow-to-get-trace-to-get-a-cylinder-when-i-rotate-a-rectangle%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

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

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

199年 目錄 大件事 到箇年出世嗰人 到箇年死嗰人 節慶、風俗習慣 導覽選單