How to compact the foreach command?












1















documentclass[border=15pt,pstricks,12pt]{standalone}
usepackage{pstricks-add,pst-eucl}
begin{document}
foreach i in {1,1.1,...,2.8,2.7,2.6,2.5,2.4,2.3,2.2,2.1,2,1.9,1.8,1.7,1.6,1.5,1.4,1.3,1.2,1.1,1}{
begin{pspicture}(-4,-8)(4,8)%%

defa{i}
defb{1}
defh{i}
defx{0}
defy{0}
pstGeonode[PosAngle={0,180,90}](+x+a,y){A}(+x-a,y){B}(x,0|+a,x+a*h){M}
pstMiddleAB[PosAngle=-135]{A}{B}{C}
psellipticarc(C)(a,b){180}{0}
psellipticarc[linestyle=dashed](C)(a,b){0}{180}
pstSymO[PosAngle=-90]{C}{M}[D]
psEllipseTangents(C)(a,b)(M)
psline(EllipseT1)(M)(EllipseT2)
psEllipseTangents(C)(a,b)(D)
psline(EllipseT1)(D)(EllipseT2)
pstMiddleAB[PosAngle=0]{M}{A}{I}
pstMiddleAB[PosAngle=180]{M}{B}{J}
pstMiddleAB[PointName=none]{I}{J}{E}
psellipticarc(E)(+a/2,b/2){180}{0}
psellipticarc[linestyle=dashed](E)(+a/2,b/2){0}{180}
psEllipseTangents(E)(+a/2,b/2)(C)
psline[linestyle=dashed](EllipseT1)(C)(EllipseT2)
psLineSegments[linestyle=dashed](M)(D)(A)(B)(I)(J)
end{pspicture}
}
end{document}


enter image description here



Question: I want to the foreach command seems more delicate. How to do that?









share























  • foreach i in {1,1.1,...,2.8,2.7,2.6,2.5,2.4,2.3,2.2,2.1,2,1.9,1.8,1.7,1.6,1.5,1.4,1.3,1.2,1.1,1} can be abbreviated to foreach i in {1,1.1,...,2.8,2.7,2.6,...,1}. P.S. It is a cool animation, so +1. ;-)

    – marmot
    5 mins ago


















1















documentclass[border=15pt,pstricks,12pt]{standalone}
usepackage{pstricks-add,pst-eucl}
begin{document}
foreach i in {1,1.1,...,2.8,2.7,2.6,2.5,2.4,2.3,2.2,2.1,2,1.9,1.8,1.7,1.6,1.5,1.4,1.3,1.2,1.1,1}{
begin{pspicture}(-4,-8)(4,8)%%

defa{i}
defb{1}
defh{i}
defx{0}
defy{0}
pstGeonode[PosAngle={0,180,90}](+x+a,y){A}(+x-a,y){B}(x,0|+a,x+a*h){M}
pstMiddleAB[PosAngle=-135]{A}{B}{C}
psellipticarc(C)(a,b){180}{0}
psellipticarc[linestyle=dashed](C)(a,b){0}{180}
pstSymO[PosAngle=-90]{C}{M}[D]
psEllipseTangents(C)(a,b)(M)
psline(EllipseT1)(M)(EllipseT2)
psEllipseTangents(C)(a,b)(D)
psline(EllipseT1)(D)(EllipseT2)
pstMiddleAB[PosAngle=0]{M}{A}{I}
pstMiddleAB[PosAngle=180]{M}{B}{J}
pstMiddleAB[PointName=none]{I}{J}{E}
psellipticarc(E)(+a/2,b/2){180}{0}
psellipticarc[linestyle=dashed](E)(+a/2,b/2){0}{180}
psEllipseTangents(E)(+a/2,b/2)(C)
psline[linestyle=dashed](EllipseT1)(C)(EllipseT2)
psLineSegments[linestyle=dashed](M)(D)(A)(B)(I)(J)
end{pspicture}
}
end{document}


enter image description here



Question: I want to the foreach command seems more delicate. How to do that?









share























  • foreach i in {1,1.1,...,2.8,2.7,2.6,2.5,2.4,2.3,2.2,2.1,2,1.9,1.8,1.7,1.6,1.5,1.4,1.3,1.2,1.1,1} can be abbreviated to foreach i in {1,1.1,...,2.8,2.7,2.6,...,1}. P.S. It is a cool animation, so +1. ;-)

    – marmot
    5 mins ago
















1












1








1








documentclass[border=15pt,pstricks,12pt]{standalone}
usepackage{pstricks-add,pst-eucl}
begin{document}
foreach i in {1,1.1,...,2.8,2.7,2.6,2.5,2.4,2.3,2.2,2.1,2,1.9,1.8,1.7,1.6,1.5,1.4,1.3,1.2,1.1,1}{
begin{pspicture}(-4,-8)(4,8)%%

defa{i}
defb{1}
defh{i}
defx{0}
defy{0}
pstGeonode[PosAngle={0,180,90}](+x+a,y){A}(+x-a,y){B}(x,0|+a,x+a*h){M}
pstMiddleAB[PosAngle=-135]{A}{B}{C}
psellipticarc(C)(a,b){180}{0}
psellipticarc[linestyle=dashed](C)(a,b){0}{180}
pstSymO[PosAngle=-90]{C}{M}[D]
psEllipseTangents(C)(a,b)(M)
psline(EllipseT1)(M)(EllipseT2)
psEllipseTangents(C)(a,b)(D)
psline(EllipseT1)(D)(EllipseT2)
pstMiddleAB[PosAngle=0]{M}{A}{I}
pstMiddleAB[PosAngle=180]{M}{B}{J}
pstMiddleAB[PointName=none]{I}{J}{E}
psellipticarc(E)(+a/2,b/2){180}{0}
psellipticarc[linestyle=dashed](E)(+a/2,b/2){0}{180}
psEllipseTangents(E)(+a/2,b/2)(C)
psline[linestyle=dashed](EllipseT1)(C)(EllipseT2)
psLineSegments[linestyle=dashed](M)(D)(A)(B)(I)(J)
end{pspicture}
}
end{document}


enter image description here



Question: I want to the foreach command seems more delicate. How to do that?









share














documentclass[border=15pt,pstricks,12pt]{standalone}
usepackage{pstricks-add,pst-eucl}
begin{document}
foreach i in {1,1.1,...,2.8,2.7,2.6,2.5,2.4,2.3,2.2,2.1,2,1.9,1.8,1.7,1.6,1.5,1.4,1.3,1.2,1.1,1}{
begin{pspicture}(-4,-8)(4,8)%%

defa{i}
defb{1}
defh{i}
defx{0}
defy{0}
pstGeonode[PosAngle={0,180,90}](+x+a,y){A}(+x-a,y){B}(x,0|+a,x+a*h){M}
pstMiddleAB[PosAngle=-135]{A}{B}{C}
psellipticarc(C)(a,b){180}{0}
psellipticarc[linestyle=dashed](C)(a,b){0}{180}
pstSymO[PosAngle=-90]{C}{M}[D]
psEllipseTangents(C)(a,b)(M)
psline(EllipseT1)(M)(EllipseT2)
psEllipseTangents(C)(a,b)(D)
psline(EllipseT1)(D)(EllipseT2)
pstMiddleAB[PosAngle=0]{M}{A}{I}
pstMiddleAB[PosAngle=180]{M}{B}{J}
pstMiddleAB[PointName=none]{I}{J}{E}
psellipticarc(E)(+a/2,b/2){180}{0}
psellipticarc[linestyle=dashed](E)(+a/2,b/2){0}{180}
psEllipseTangents(E)(+a/2,b/2)(C)
psline[linestyle=dashed](EllipseT1)(C)(EllipseT2)
psLineSegments[linestyle=dashed](M)(D)(A)(B)(I)(J)
end{pspicture}
}
end{document}


enter image description here



Question: I want to the foreach command seems more delicate. How to do that?







pstricks





share












share










share



share










asked 7 mins ago









chishimutojichishimutoji

6701320




6701320













  • foreach i in {1,1.1,...,2.8,2.7,2.6,2.5,2.4,2.3,2.2,2.1,2,1.9,1.8,1.7,1.6,1.5,1.4,1.3,1.2,1.1,1} can be abbreviated to foreach i in {1,1.1,...,2.8,2.7,2.6,...,1}. P.S. It is a cool animation, so +1. ;-)

    – marmot
    5 mins ago





















  • foreach i in {1,1.1,...,2.8,2.7,2.6,2.5,2.4,2.3,2.2,2.1,2,1.9,1.8,1.7,1.6,1.5,1.4,1.3,1.2,1.1,1} can be abbreviated to foreach i in {1,1.1,...,2.8,2.7,2.6,...,1}. P.S. It is a cool animation, so +1. ;-)

    – marmot
    5 mins ago



















foreach i in {1,1.1,...,2.8,2.7,2.6,2.5,2.4,2.3,2.2,2.1,2,1.9,1.8,1.7,1.6,1.5,1.4,1.3,1.2,1.1,1} can be abbreviated to foreach i in {1,1.1,...,2.8,2.7,2.6,...,1}. P.S. It is a cool animation, so +1. ;-)

– marmot
5 mins ago







foreach i in {1,1.1,...,2.8,2.7,2.6,2.5,2.4,2.3,2.2,2.1,2,1.9,1.8,1.7,1.6,1.5,1.4,1.3,1.2,1.1,1} can be abbreviated to foreach i in {1,1.1,...,2.8,2.7,2.6,...,1}. P.S. It is a cool animation, so +1. ;-)

– marmot
5 mins ago












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%2f475140%2fhow-to-compact-the-foreach-command%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%2f475140%2fhow-to-compact-the-foreach-command%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

サソリ

広島県道265号伴広島線

Setup Asymptote in Texstudio