Tikz: How to use multiple parameters in pic?TikZ 3.0---Multiple arguments for `pic`Tikz /.style with two parametersTikZ 3.0---Multiple arguments for `pic`Tikz pic parameterTikZ: Drawing an arc from an intersection to an intersectiontikz .pic scaling with textTikZ: clip with Pic?Change global tikz style from inside a tikz picTikZ angle calculation and rotation with transformed coordinatesEditing pic TIKZ block
Madrid to London w/ Expired 90/180 days stay as US citizen
Floating Point XOR
Which version of the Pigeonhole principle is correct? One is far stronger than the other
Why don't airports use arresting gears to recover energy from landing passenger planes?
Talk about Grandpa's weird talk: Who are these folks?
Rare Earth Elements in the outer solar system
Have you ever been issued a passport or national identity card for travel by any other country?
What is the difference between an engine skirt and an engine nozzle?
In what sequence should an advanced civilization teach technology to medieval society to maximize rate of adoption?
How does doing something together work?
What if I don't know whether my program will be linked to a GPL library or not?
How to generate short fixed length cryptographic hashes?
Why is it called a stateful and a stateless firewall?
Tikz: How to use multiple parameters in pic?
Is it acceptable to use decoupling capacitor ground pad as ground for oscilloscope probe?
Electrosynthetic Autotrophs
Is my sink P-trap too low?
How many people need to succeed in a group check with three people?
Unpredictability of Stock Market
What is this WWII four-engine plane on skis?
Random restarts for unsatisfiable problems
What is the word for a person who destroys monuments?
Is there a generally agreed upon solution to Bradley's Infinite Regress without appeal to Paraconsistent Logic?
Is it better to use mosfet with gate driver IC or mosfet with lower VGs on
Tikz: How to use multiple parameters in pic?
TikZ 3.0---Multiple arguments for `pic`Tikz /.style with two parametersTikZ 3.0---Multiple arguments for `pic`Tikz pic parameterTikZ: Drawing an arc from an intersection to an intersectiontikz .pic scaling with textTikZ: clip with Pic?Change global tikz style from inside a tikz picTikZ angle calculation and rotation with transformed coordinatesEditing pic TIKZ block
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
How is it possible to use multiple parameters in a single pic? It works nicely with just 1 parameter, but always results in errors in case of more than 1 parameter.
I found this post, which didn't solve the issue.
tikzsetpics/coordsys/.style n args=4
code =
draw [->, #1] (0,0,0) -- +(1,0,0)[red] node [pos=1.1]#2;
draw [->, #1] (0,0,0) -- +(0,1,0)[green] node [pos=1.1]#3;
draw [->, #1] (0,0,0) -- +(0,0,1)[blue] node [pos=1.1]#4;
draw [rotate=360] (origin) pic coordsys=very thickxyz;
This always results in errors like:
Package pgfkeys Error: I do not know the key '/tikz/every text node part'
tikz-pgf tikz-styles
New contributor
add a comment
|
How is it possible to use multiple parameters in a single pic? It works nicely with just 1 parameter, but always results in errors in case of more than 1 parameter.
I found this post, which didn't solve the issue.
tikzsetpics/coordsys/.style n args=4
code =
draw [->, #1] (0,0,0) -- +(1,0,0)[red] node [pos=1.1]#2;
draw [->, #1] (0,0,0) -- +(0,1,0)[green] node [pos=1.1]#3;
draw [->, #1] (0,0,0) -- +(0,0,1)[blue] node [pos=1.1]#4;
draw [rotate=360] (origin) pic coordsys=very thickxyz;
This always results in errors like:
Package pgfkeys Error: I do not know the key '/tikz/every text node part'
tikz-pgf tikz-styles
New contributor
2
It works for me:documentclass[tikz,border=3mm]standalone begindocument begintikzpicture tikzsetpics/coordsys/.style n args=4 code = draw [->, #1] (0,0,0) -- +(1,0,0)[red] node [pos=1.1]#2; draw [->, #1] (0,0,0) -- +(0,1,0)[green] node [pos=1.1]#3; draw [->, #1] (0,0,0) -- +(0,0,1)[blue] node [pos=1.1]#4; draw (0,0) coordinate (origin) [rotate=360] pic coordsys=very thickxyz; endtikzpicture enddocument
– Schrödinger's cat
8 hours ago
add a comment
|
How is it possible to use multiple parameters in a single pic? It works nicely with just 1 parameter, but always results in errors in case of more than 1 parameter.
I found this post, which didn't solve the issue.
tikzsetpics/coordsys/.style n args=4
code =
draw [->, #1] (0,0,0) -- +(1,0,0)[red] node [pos=1.1]#2;
draw [->, #1] (0,0,0) -- +(0,1,0)[green] node [pos=1.1]#3;
draw [->, #1] (0,0,0) -- +(0,0,1)[blue] node [pos=1.1]#4;
draw [rotate=360] (origin) pic coordsys=very thickxyz;
This always results in errors like:
Package pgfkeys Error: I do not know the key '/tikz/every text node part'
tikz-pgf tikz-styles
New contributor
How is it possible to use multiple parameters in a single pic? It works nicely with just 1 parameter, but always results in errors in case of more than 1 parameter.
I found this post, which didn't solve the issue.
tikzsetpics/coordsys/.style n args=4
code =
draw [->, #1] (0,0,0) -- +(1,0,0)[red] node [pos=1.1]#2;
draw [->, #1] (0,0,0) -- +(0,1,0)[green] node [pos=1.1]#3;
draw [->, #1] (0,0,0) -- +(0,0,1)[blue] node [pos=1.1]#4;
draw [rotate=360] (origin) pic coordsys=very thickxyz;
This always results in errors like:
Package pgfkeys Error: I do not know the key '/tikz/every text node part'
tikz-pgf tikz-styles
tikz-pgf tikz-styles
New contributor
New contributor
New contributor
asked 8 hours ago
avermaetavermaet
1283 bronze badges
1283 bronze badges
New contributor
New contributor
2
It works for me:documentclass[tikz,border=3mm]standalone begindocument begintikzpicture tikzsetpics/coordsys/.style n args=4 code = draw [->, #1] (0,0,0) -- +(1,0,0)[red] node [pos=1.1]#2; draw [->, #1] (0,0,0) -- +(0,1,0)[green] node [pos=1.1]#3; draw [->, #1] (0,0,0) -- +(0,0,1)[blue] node [pos=1.1]#4; draw (0,0) coordinate (origin) [rotate=360] pic coordsys=very thickxyz; endtikzpicture enddocument
– Schrödinger's cat
8 hours ago
add a comment
|
2
It works for me:documentclass[tikz,border=3mm]standalone begindocument begintikzpicture tikzsetpics/coordsys/.style n args=4 code = draw [->, #1] (0,0,0) -- +(1,0,0)[red] node [pos=1.1]#2; draw [->, #1] (0,0,0) -- +(0,1,0)[green] node [pos=1.1]#3; draw [->, #1] (0,0,0) -- +(0,0,1)[blue] node [pos=1.1]#4; draw (0,0) coordinate (origin) [rotate=360] pic coordsys=very thickxyz; endtikzpicture enddocument
– Schrödinger's cat
8 hours ago
2
2
It works for me:
documentclass[tikz,border=3mm]standalone begindocument begintikzpicture tikzsetpics/coordsys/.style n args=4 code = draw [->, #1] (0,0,0) -- +(1,0,0)[red] node [pos=1.1]#2; draw [->, #1] (0,0,0) -- +(0,1,0)[green] node [pos=1.1]#3; draw [->, #1] (0,0,0) -- +(0,0,1)[blue] node [pos=1.1]#4; draw (0,0) coordinate (origin) [rotate=360] pic coordsys=very thickxyz; endtikzpicture enddocument
– Schrödinger's cat
8 hours ago
It works for me:
documentclass[tikz,border=3mm]standalone begindocument begintikzpicture tikzsetpics/coordsys/.style n args=4 code = draw [->, #1] (0,0,0) -- +(1,0,0)[red] node [pos=1.1]#2; draw [->, #1] (0,0,0) -- +(0,1,0)[green] node [pos=1.1]#3; draw [->, #1] (0,0,0) -- +(0,0,1)[blue] node [pos=1.1]#4; draw (0,0) coordinate (origin) [rotate=360] pic coordsys=very thickxyz; endtikzpicture enddocument
– Schrödinger's cat
8 hours ago
add a comment
|
1 Answer
1
active
oldest
votes
Giving multiple arguments to a pic works for me, i.e.
documentclass[tikz,border=3mm]standalone
begindocument
begintikzpicture
tikzsetpics/coordsys/.style n args=4
code =
draw [->, #1] (0,0,0) -- +(1,0,0)[red] node [pos=1.1]#2;
draw [->, #1] (0,0,0) -- +(0,1,0)[green] node [pos=1.1]#3;
draw [->, #1] (0,0,0) -- +(0,0,1)[blue] node [pos=1.1]#4;
draw (0,0) coordinate (origin) [rotate=360] pic coordsys=very thickxyz;
endtikzpicture
enddocument
compiles without errors on my updated TeXLive installation. So I suspect the error comes from something that you did not disclose.
However, I would like to talk you out of this multiple argument thingy for this application. Rather, you could set some standard or initial (in a way default) values using pgf keys, and change them only if you have to. Also the argument thick
in the way you use it may be better replaced by the pic actions
, which are made for this. (This is the answer I had for your previous question, which got deleted just when I was about to press the submit button. Of course I have no problem deleting it.)
documentclass[border=2mm,tikz]standalone
usepackagetikz-3dplot
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$;
draw [->,pic actions] (0,0,0) -- +(0,1,0)[green!60!black] node[pos=1.1]
$pgfkeysvalueof/tikz/coordsys/y$;
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,...,4
draw (X*1.25,3,fA(X*1.25)) coordinate (PY)
-- (X*3.25/4,0,fB(X*3.25/4)) coordinate (QY);
tdplotsetrotatedcoords0atan2(fAprime(X*1.25),1)0
beginscope[tdplot_rotated_coords]
path (PY) piccoordsys;
endscope
tdplotsetrotatedcoords0atan2(fBprime(X*3.25/4),1)0
beginscope[tdplot_rotated_coords]
path (QY) piccoordsys=x=x',y=y',z=z';
endscope
endtikzpicture
enddocument
As you can see, the standard values for x, y, and z are just x
, y
and z
, but by saying
path (QY) piccoordsys=x=x',y=y',z=z';
for the curve in front, they will become x'
, y'
and z'
.
As for the rotations of the coordinate systems: they are rotated such that the x axis is tangent to the curve, and the y axis remains fixed. To this end, one has to guess some functions, and the derivatives have to be done by hand or with a computer algebra system (i.e. plain LaTeX won't do it). From this one computes the slope which gets fed into
tdplotsetrotatedcoords0atan2(fBprime(X*3.25/4),1)0
where the second argument is the rotation angle about the y axis. For more details consult the manual of tikz-3dplot
.
A very quickly written alternative that does not require you to compute the derivative. (Note, however, that when trying to add smooth
to the plot options one encounters unexpected difficulties: transformations that cannot be undone. This is the first time I see something like this.)
documentclass[border=2mm,tikz]standalone
usepackagetikz-3dplot
usetikzlibrarydecorations.markings
begindocument
tdplotsetmaincoords60-15
begintikzpicture[tdplot_main_coords,scale=2,line join=round,>=latex,
line cap=round,declare function=fA(t)=-sin(t*144/(1+t/5));
fB(t)=-sin(t*216/(1+t*4/15));,
pics/coordsys/.style =
code = tikzsetnodes=transform shape,coordsys/.cd,#1
draw [->,pic actions] (0,0,0) -- +(1,0,0)[red] node[pos=1.1,rotate=0]
$pgfkeysvalueof/tikz/coordsys/x$;
draw [->,pic actions] (0,0,0) -- +(0,1,0)[green!60!black] node[pos=1.1]
$pgfkeysvalueof/tikz/coordsys/y$;
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,/tikz/.cd,
rotated coordsys at/.style=postaction=decorate,decoration=markings,
mark=at position #1 with pgfmathtruncatemacromyint5*#1+0.1
path (0,0) coordinate (O'-myint) (1,0) coordinate (X');
path let p1=($(X)-(O)$),p2=($(X')-(O'-myint)$) in pgfextra%
pgfmathsetmacromyangleatan2(y1,x1)-atan2(y2,x2)
xdefmyanglemyangle;
tdplotsetrotatedcoords0myangle0
beginscope[tdplot_rotated_coords]
path (O'-myint) pic[solid]coordsys;
endscope
]
path (0,0,0) coordinate (O) (1,0,0) coordinate (X);
draw[dashed,rotated coordsys at/.list=0,0.2,...,1]
plot[variable=t,domain=0:5,samples=71] (t,3,fA(t));
path foreach X in 0,...,5 (O'-X) coordinate (P-X);
draw[dashed,coordsys/x=x',coordsys/y=y',coordsys/z=z',
rotated coordsys at/.list=0,0.2,...,1]
plot[variable=t,domain=0:3.25,samples=71] (t,0,fB(t));
draw foreach X in 0,...,5 (P-X) -- (O'-X) coordinate (Q-X);
endtikzpicture
enddocument
As you can see, one can set the options coordsys/x=x'
in the path.
1
Awesome! Sorry about deleting the question before, I was not expecting a full answer anymore.
– avermaet
8 hours ago
@avermaet No worries and you're welcome!
– Schrödinger's cat
7 hours ago
1
(Since the angle between x and z does not change, and since y is fixed, one could construct a pure LaTeX solution withdecorations.markings
. It wouldn't be as direct but would not require computing derivatives by hand.)
– Schrödinger's cat
7 hours ago
I know this wasn't part of my original question, but I'd like the upper coordinate systems to be rotated with respect to the lower ones. Just some fixed relative rotation for all of them. Where would I need to multiply this? And also: How did you get the constants in the code? Just some random choice?
– avermaet
7 hours ago
@avermaet There is now a second version in which you do not have to compute the derivative of the function. In addition you can play with the view angles, which are set intdplotsetmaincoords60-15
.
– Schrödinger's cat
3 hours ago
add a comment
|
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f508448%2ftikz-how-to-use-multiple-parameters-in-pic%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
Giving multiple arguments to a pic works for me, i.e.
documentclass[tikz,border=3mm]standalone
begindocument
begintikzpicture
tikzsetpics/coordsys/.style n args=4
code =
draw [->, #1] (0,0,0) -- +(1,0,0)[red] node [pos=1.1]#2;
draw [->, #1] (0,0,0) -- +(0,1,0)[green] node [pos=1.1]#3;
draw [->, #1] (0,0,0) -- +(0,0,1)[blue] node [pos=1.1]#4;
draw (0,0) coordinate (origin) [rotate=360] pic coordsys=very thickxyz;
endtikzpicture
enddocument
compiles without errors on my updated TeXLive installation. So I suspect the error comes from something that you did not disclose.
However, I would like to talk you out of this multiple argument thingy for this application. Rather, you could set some standard or initial (in a way default) values using pgf keys, and change them only if you have to. Also the argument thick
in the way you use it may be better replaced by the pic actions
, which are made for this. (This is the answer I had for your previous question, which got deleted just when I was about to press the submit button. Of course I have no problem deleting it.)
documentclass[border=2mm,tikz]standalone
usepackagetikz-3dplot
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$;
draw [->,pic actions] (0,0,0) -- +(0,1,0)[green!60!black] node[pos=1.1]
$pgfkeysvalueof/tikz/coordsys/y$;
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,...,4
draw (X*1.25,3,fA(X*1.25)) coordinate (PY)
-- (X*3.25/4,0,fB(X*3.25/4)) coordinate (QY);
tdplotsetrotatedcoords0atan2(fAprime(X*1.25),1)0
beginscope[tdplot_rotated_coords]
path (PY) piccoordsys;
endscope
tdplotsetrotatedcoords0atan2(fBprime(X*3.25/4),1)0
beginscope[tdplot_rotated_coords]
path (QY) piccoordsys=x=x',y=y',z=z';
endscope
endtikzpicture
enddocument
As you can see, the standard values for x, y, and z are just x
, y
and z
, but by saying
path (QY) piccoordsys=x=x',y=y',z=z';
for the curve in front, they will become x'
, y'
and z'
.
As for the rotations of the coordinate systems: they are rotated such that the x axis is tangent to the curve, and the y axis remains fixed. To this end, one has to guess some functions, and the derivatives have to be done by hand or with a computer algebra system (i.e. plain LaTeX won't do it). From this one computes the slope which gets fed into
tdplotsetrotatedcoords0atan2(fBprime(X*3.25/4),1)0
where the second argument is the rotation angle about the y axis. For more details consult the manual of tikz-3dplot
.
A very quickly written alternative that does not require you to compute the derivative. (Note, however, that when trying to add smooth
to the plot options one encounters unexpected difficulties: transformations that cannot be undone. This is the first time I see something like this.)
documentclass[border=2mm,tikz]standalone
usepackagetikz-3dplot
usetikzlibrarydecorations.markings
begindocument
tdplotsetmaincoords60-15
begintikzpicture[tdplot_main_coords,scale=2,line join=round,>=latex,
line cap=round,declare function=fA(t)=-sin(t*144/(1+t/5));
fB(t)=-sin(t*216/(1+t*4/15));,
pics/coordsys/.style =
code = tikzsetnodes=transform shape,coordsys/.cd,#1
draw [->,pic actions] (0,0,0) -- +(1,0,0)[red] node[pos=1.1,rotate=0]
$pgfkeysvalueof/tikz/coordsys/x$;
draw [->,pic actions] (0,0,0) -- +(0,1,0)[green!60!black] node[pos=1.1]
$pgfkeysvalueof/tikz/coordsys/y$;
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,/tikz/.cd,
rotated coordsys at/.style=postaction=decorate,decoration=markings,
mark=at position #1 with pgfmathtruncatemacromyint5*#1+0.1
path (0,0) coordinate (O'-myint) (1,0) coordinate (X');
path let p1=($(X)-(O)$),p2=($(X')-(O'-myint)$) in pgfextra%
pgfmathsetmacromyangleatan2(y1,x1)-atan2(y2,x2)
xdefmyanglemyangle;
tdplotsetrotatedcoords0myangle0
beginscope[tdplot_rotated_coords]
path (O'-myint) pic[solid]coordsys;
endscope
]
path (0,0,0) coordinate (O) (1,0,0) coordinate (X);
draw[dashed,rotated coordsys at/.list=0,0.2,...,1]
plot[variable=t,domain=0:5,samples=71] (t,3,fA(t));
path foreach X in 0,...,5 (O'-X) coordinate (P-X);
draw[dashed,coordsys/x=x',coordsys/y=y',coordsys/z=z',
rotated coordsys at/.list=0,0.2,...,1]
plot[variable=t,domain=0:3.25,samples=71] (t,0,fB(t));
draw foreach X in 0,...,5 (P-X) -- (O'-X) coordinate (Q-X);
endtikzpicture
enddocument
As you can see, one can set the options coordsys/x=x'
in the path.
1
Awesome! Sorry about deleting the question before, I was not expecting a full answer anymore.
– avermaet
8 hours ago
@avermaet No worries and you're welcome!
– Schrödinger's cat
7 hours ago
1
(Since the angle between x and z does not change, and since y is fixed, one could construct a pure LaTeX solution withdecorations.markings
. It wouldn't be as direct but would not require computing derivatives by hand.)
– Schrödinger's cat
7 hours ago
I know this wasn't part of my original question, but I'd like the upper coordinate systems to be rotated with respect to the lower ones. Just some fixed relative rotation for all of them. Where would I need to multiply this? And also: How did you get the constants in the code? Just some random choice?
– avermaet
7 hours ago
@avermaet There is now a second version in which you do not have to compute the derivative of the function. In addition you can play with the view angles, which are set intdplotsetmaincoords60-15
.
– Schrödinger's cat
3 hours ago
add a comment
|
Giving multiple arguments to a pic works for me, i.e.
documentclass[tikz,border=3mm]standalone
begindocument
begintikzpicture
tikzsetpics/coordsys/.style n args=4
code =
draw [->, #1] (0,0,0) -- +(1,0,0)[red] node [pos=1.1]#2;
draw [->, #1] (0,0,0) -- +(0,1,0)[green] node [pos=1.1]#3;
draw [->, #1] (0,0,0) -- +(0,0,1)[blue] node [pos=1.1]#4;
draw (0,0) coordinate (origin) [rotate=360] pic coordsys=very thickxyz;
endtikzpicture
enddocument
compiles without errors on my updated TeXLive installation. So I suspect the error comes from something that you did not disclose.
However, I would like to talk you out of this multiple argument thingy for this application. Rather, you could set some standard or initial (in a way default) values using pgf keys, and change them only if you have to. Also the argument thick
in the way you use it may be better replaced by the pic actions
, which are made for this. (This is the answer I had for your previous question, which got deleted just when I was about to press the submit button. Of course I have no problem deleting it.)
documentclass[border=2mm,tikz]standalone
usepackagetikz-3dplot
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$;
draw [->,pic actions] (0,0,0) -- +(0,1,0)[green!60!black] node[pos=1.1]
$pgfkeysvalueof/tikz/coordsys/y$;
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,...,4
draw (X*1.25,3,fA(X*1.25)) coordinate (PY)
-- (X*3.25/4,0,fB(X*3.25/4)) coordinate (QY);
tdplotsetrotatedcoords0atan2(fAprime(X*1.25),1)0
beginscope[tdplot_rotated_coords]
path (PY) piccoordsys;
endscope
tdplotsetrotatedcoords0atan2(fBprime(X*3.25/4),1)0
beginscope[tdplot_rotated_coords]
path (QY) piccoordsys=x=x',y=y',z=z';
endscope
endtikzpicture
enddocument
As you can see, the standard values for x, y, and z are just x
, y
and z
, but by saying
path (QY) piccoordsys=x=x',y=y',z=z';
for the curve in front, they will become x'
, y'
and z'
.
As for the rotations of the coordinate systems: they are rotated such that the x axis is tangent to the curve, and the y axis remains fixed. To this end, one has to guess some functions, and the derivatives have to be done by hand or with a computer algebra system (i.e. plain LaTeX won't do it). From this one computes the slope which gets fed into
tdplotsetrotatedcoords0atan2(fBprime(X*3.25/4),1)0
where the second argument is the rotation angle about the y axis. For more details consult the manual of tikz-3dplot
.
A very quickly written alternative that does not require you to compute the derivative. (Note, however, that when trying to add smooth
to the plot options one encounters unexpected difficulties: transformations that cannot be undone. This is the first time I see something like this.)
documentclass[border=2mm,tikz]standalone
usepackagetikz-3dplot
usetikzlibrarydecorations.markings
begindocument
tdplotsetmaincoords60-15
begintikzpicture[tdplot_main_coords,scale=2,line join=round,>=latex,
line cap=round,declare function=fA(t)=-sin(t*144/(1+t/5));
fB(t)=-sin(t*216/(1+t*4/15));,
pics/coordsys/.style =
code = tikzsetnodes=transform shape,coordsys/.cd,#1
draw [->,pic actions] (0,0,0) -- +(1,0,0)[red] node[pos=1.1,rotate=0]
$pgfkeysvalueof/tikz/coordsys/x$;
draw [->,pic actions] (0,0,0) -- +(0,1,0)[green!60!black] node[pos=1.1]
$pgfkeysvalueof/tikz/coordsys/y$;
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,/tikz/.cd,
rotated coordsys at/.style=postaction=decorate,decoration=markings,
mark=at position #1 with pgfmathtruncatemacromyint5*#1+0.1
path (0,0) coordinate (O'-myint) (1,0) coordinate (X');
path let p1=($(X)-(O)$),p2=($(X')-(O'-myint)$) in pgfextra%
pgfmathsetmacromyangleatan2(y1,x1)-atan2(y2,x2)
xdefmyanglemyangle;
tdplotsetrotatedcoords0myangle0
beginscope[tdplot_rotated_coords]
path (O'-myint) pic[solid]coordsys;
endscope
]
path (0,0,0) coordinate (O) (1,0,0) coordinate (X);
draw[dashed,rotated coordsys at/.list=0,0.2,...,1]
plot[variable=t,domain=0:5,samples=71] (t,3,fA(t));
path foreach X in 0,...,5 (O'-X) coordinate (P-X);
draw[dashed,coordsys/x=x',coordsys/y=y',coordsys/z=z',
rotated coordsys at/.list=0,0.2,...,1]
plot[variable=t,domain=0:3.25,samples=71] (t,0,fB(t));
draw foreach X in 0,...,5 (P-X) -- (O'-X) coordinate (Q-X);
endtikzpicture
enddocument
As you can see, one can set the options coordsys/x=x'
in the path.
1
Awesome! Sorry about deleting the question before, I was not expecting a full answer anymore.
– avermaet
8 hours ago
@avermaet No worries and you're welcome!
– Schrödinger's cat
7 hours ago
1
(Since the angle between x and z does not change, and since y is fixed, one could construct a pure LaTeX solution withdecorations.markings
. It wouldn't be as direct but would not require computing derivatives by hand.)
– Schrödinger's cat
7 hours ago
I know this wasn't part of my original question, but I'd like the upper coordinate systems to be rotated with respect to the lower ones. Just some fixed relative rotation for all of them. Where would I need to multiply this? And also: How did you get the constants in the code? Just some random choice?
– avermaet
7 hours ago
@avermaet There is now a second version in which you do not have to compute the derivative of the function. In addition you can play with the view angles, which are set intdplotsetmaincoords60-15
.
– Schrödinger's cat
3 hours ago
add a comment
|
Giving multiple arguments to a pic works for me, i.e.
documentclass[tikz,border=3mm]standalone
begindocument
begintikzpicture
tikzsetpics/coordsys/.style n args=4
code =
draw [->, #1] (0,0,0) -- +(1,0,0)[red] node [pos=1.1]#2;
draw [->, #1] (0,0,0) -- +(0,1,0)[green] node [pos=1.1]#3;
draw [->, #1] (0,0,0) -- +(0,0,1)[blue] node [pos=1.1]#4;
draw (0,0) coordinate (origin) [rotate=360] pic coordsys=very thickxyz;
endtikzpicture
enddocument
compiles without errors on my updated TeXLive installation. So I suspect the error comes from something that you did not disclose.
However, I would like to talk you out of this multiple argument thingy for this application. Rather, you could set some standard or initial (in a way default) values using pgf keys, and change them only if you have to. Also the argument thick
in the way you use it may be better replaced by the pic actions
, which are made for this. (This is the answer I had for your previous question, which got deleted just when I was about to press the submit button. Of course I have no problem deleting it.)
documentclass[border=2mm,tikz]standalone
usepackagetikz-3dplot
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$;
draw [->,pic actions] (0,0,0) -- +(0,1,0)[green!60!black] node[pos=1.1]
$pgfkeysvalueof/tikz/coordsys/y$;
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,...,4
draw (X*1.25,3,fA(X*1.25)) coordinate (PY)
-- (X*3.25/4,0,fB(X*3.25/4)) coordinate (QY);
tdplotsetrotatedcoords0atan2(fAprime(X*1.25),1)0
beginscope[tdplot_rotated_coords]
path (PY) piccoordsys;
endscope
tdplotsetrotatedcoords0atan2(fBprime(X*3.25/4),1)0
beginscope[tdplot_rotated_coords]
path (QY) piccoordsys=x=x',y=y',z=z';
endscope
endtikzpicture
enddocument
As you can see, the standard values for x, y, and z are just x
, y
and z
, but by saying
path (QY) piccoordsys=x=x',y=y',z=z';
for the curve in front, they will become x'
, y'
and z'
.
As for the rotations of the coordinate systems: they are rotated such that the x axis is tangent to the curve, and the y axis remains fixed. To this end, one has to guess some functions, and the derivatives have to be done by hand or with a computer algebra system (i.e. plain LaTeX won't do it). From this one computes the slope which gets fed into
tdplotsetrotatedcoords0atan2(fBprime(X*3.25/4),1)0
where the second argument is the rotation angle about the y axis. For more details consult the manual of tikz-3dplot
.
A very quickly written alternative that does not require you to compute the derivative. (Note, however, that when trying to add smooth
to the plot options one encounters unexpected difficulties: transformations that cannot be undone. This is the first time I see something like this.)
documentclass[border=2mm,tikz]standalone
usepackagetikz-3dplot
usetikzlibrarydecorations.markings
begindocument
tdplotsetmaincoords60-15
begintikzpicture[tdplot_main_coords,scale=2,line join=round,>=latex,
line cap=round,declare function=fA(t)=-sin(t*144/(1+t/5));
fB(t)=-sin(t*216/(1+t*4/15));,
pics/coordsys/.style =
code = tikzsetnodes=transform shape,coordsys/.cd,#1
draw [->,pic actions] (0,0,0) -- +(1,0,0)[red] node[pos=1.1,rotate=0]
$pgfkeysvalueof/tikz/coordsys/x$;
draw [->,pic actions] (0,0,0) -- +(0,1,0)[green!60!black] node[pos=1.1]
$pgfkeysvalueof/tikz/coordsys/y$;
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,/tikz/.cd,
rotated coordsys at/.style=postaction=decorate,decoration=markings,
mark=at position #1 with pgfmathtruncatemacromyint5*#1+0.1
path (0,0) coordinate (O'-myint) (1,0) coordinate (X');
path let p1=($(X)-(O)$),p2=($(X')-(O'-myint)$) in pgfextra%
pgfmathsetmacromyangleatan2(y1,x1)-atan2(y2,x2)
xdefmyanglemyangle;
tdplotsetrotatedcoords0myangle0
beginscope[tdplot_rotated_coords]
path (O'-myint) pic[solid]coordsys;
endscope
]
path (0,0,0) coordinate (O) (1,0,0) coordinate (X);
draw[dashed,rotated coordsys at/.list=0,0.2,...,1]
plot[variable=t,domain=0:5,samples=71] (t,3,fA(t));
path foreach X in 0,...,5 (O'-X) coordinate (P-X);
draw[dashed,coordsys/x=x',coordsys/y=y',coordsys/z=z',
rotated coordsys at/.list=0,0.2,...,1]
plot[variable=t,domain=0:3.25,samples=71] (t,0,fB(t));
draw foreach X in 0,...,5 (P-X) -- (O'-X) coordinate (Q-X);
endtikzpicture
enddocument
As you can see, one can set the options coordsys/x=x'
in the path.
Giving multiple arguments to a pic works for me, i.e.
documentclass[tikz,border=3mm]standalone
begindocument
begintikzpicture
tikzsetpics/coordsys/.style n args=4
code =
draw [->, #1] (0,0,0) -- +(1,0,0)[red] node [pos=1.1]#2;
draw [->, #1] (0,0,0) -- +(0,1,0)[green] node [pos=1.1]#3;
draw [->, #1] (0,0,0) -- +(0,0,1)[blue] node [pos=1.1]#4;
draw (0,0) coordinate (origin) [rotate=360] pic coordsys=very thickxyz;
endtikzpicture
enddocument
compiles without errors on my updated TeXLive installation. So I suspect the error comes from something that you did not disclose.
However, I would like to talk you out of this multiple argument thingy for this application. Rather, you could set some standard or initial (in a way default) values using pgf keys, and change them only if you have to. Also the argument thick
in the way you use it may be better replaced by the pic actions
, which are made for this. (This is the answer I had for your previous question, which got deleted just when I was about to press the submit button. Of course I have no problem deleting it.)
documentclass[border=2mm,tikz]standalone
usepackagetikz-3dplot
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$;
draw [->,pic actions] (0,0,0) -- +(0,1,0)[green!60!black] node[pos=1.1]
$pgfkeysvalueof/tikz/coordsys/y$;
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,...,4
draw (X*1.25,3,fA(X*1.25)) coordinate (PY)
-- (X*3.25/4,0,fB(X*3.25/4)) coordinate (QY);
tdplotsetrotatedcoords0atan2(fAprime(X*1.25),1)0
beginscope[tdplot_rotated_coords]
path (PY) piccoordsys;
endscope
tdplotsetrotatedcoords0atan2(fBprime(X*3.25/4),1)0
beginscope[tdplot_rotated_coords]
path (QY) piccoordsys=x=x',y=y',z=z';
endscope
endtikzpicture
enddocument
As you can see, the standard values for x, y, and z are just x
, y
and z
, but by saying
path (QY) piccoordsys=x=x',y=y',z=z';
for the curve in front, they will become x'
, y'
and z'
.
As for the rotations of the coordinate systems: they are rotated such that the x axis is tangent to the curve, and the y axis remains fixed. To this end, one has to guess some functions, and the derivatives have to be done by hand or with a computer algebra system (i.e. plain LaTeX won't do it). From this one computes the slope which gets fed into
tdplotsetrotatedcoords0atan2(fBprime(X*3.25/4),1)0
where the second argument is the rotation angle about the y axis. For more details consult the manual of tikz-3dplot
.
A very quickly written alternative that does not require you to compute the derivative. (Note, however, that when trying to add smooth
to the plot options one encounters unexpected difficulties: transformations that cannot be undone. This is the first time I see something like this.)
documentclass[border=2mm,tikz]standalone
usepackagetikz-3dplot
usetikzlibrarydecorations.markings
begindocument
tdplotsetmaincoords60-15
begintikzpicture[tdplot_main_coords,scale=2,line join=round,>=latex,
line cap=round,declare function=fA(t)=-sin(t*144/(1+t/5));
fB(t)=-sin(t*216/(1+t*4/15));,
pics/coordsys/.style =
code = tikzsetnodes=transform shape,coordsys/.cd,#1
draw [->,pic actions] (0,0,0) -- +(1,0,0)[red] node[pos=1.1,rotate=0]
$pgfkeysvalueof/tikz/coordsys/x$;
draw [->,pic actions] (0,0,0) -- +(0,1,0)[green!60!black] node[pos=1.1]
$pgfkeysvalueof/tikz/coordsys/y$;
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,/tikz/.cd,
rotated coordsys at/.style=postaction=decorate,decoration=markings,
mark=at position #1 with pgfmathtruncatemacromyint5*#1+0.1
path (0,0) coordinate (O'-myint) (1,0) coordinate (X');
path let p1=($(X)-(O)$),p2=($(X')-(O'-myint)$) in pgfextra%
pgfmathsetmacromyangleatan2(y1,x1)-atan2(y2,x2)
xdefmyanglemyangle;
tdplotsetrotatedcoords0myangle0
beginscope[tdplot_rotated_coords]
path (O'-myint) pic[solid]coordsys;
endscope
]
path (0,0,0) coordinate (O) (1,0,0) coordinate (X);
draw[dashed,rotated coordsys at/.list=0,0.2,...,1]
plot[variable=t,domain=0:5,samples=71] (t,3,fA(t));
path foreach X in 0,...,5 (O'-X) coordinate (P-X);
draw[dashed,coordsys/x=x',coordsys/y=y',coordsys/z=z',
rotated coordsys at/.list=0,0.2,...,1]
plot[variable=t,domain=0:3.25,samples=71] (t,0,fB(t));
draw foreach X in 0,...,5 (P-X) -- (O'-X) coordinate (Q-X);
endtikzpicture
enddocument
As you can see, one can set the options coordsys/x=x'
in the path.
edited 3 hours ago
answered 8 hours ago
Schrödinger's catSchrödinger's cat
7,29511 silver badges22 bronze badges
7,29511 silver badges22 bronze badges
1
Awesome! Sorry about deleting the question before, I was not expecting a full answer anymore.
– avermaet
8 hours ago
@avermaet No worries and you're welcome!
– Schrödinger's cat
7 hours ago
1
(Since the angle between x and z does not change, and since y is fixed, one could construct a pure LaTeX solution withdecorations.markings
. It wouldn't be as direct but would not require computing derivatives by hand.)
– Schrödinger's cat
7 hours ago
I know this wasn't part of my original question, but I'd like the upper coordinate systems to be rotated with respect to the lower ones. Just some fixed relative rotation for all of them. Where would I need to multiply this? And also: How did you get the constants in the code? Just some random choice?
– avermaet
7 hours ago
@avermaet There is now a second version in which you do not have to compute the derivative of the function. In addition you can play with the view angles, which are set intdplotsetmaincoords60-15
.
– Schrödinger's cat
3 hours ago
add a comment
|
1
Awesome! Sorry about deleting the question before, I was not expecting a full answer anymore.
– avermaet
8 hours ago
@avermaet No worries and you're welcome!
– Schrödinger's cat
7 hours ago
1
(Since the angle between x and z does not change, and since y is fixed, one could construct a pure LaTeX solution withdecorations.markings
. It wouldn't be as direct but would not require computing derivatives by hand.)
– Schrödinger's cat
7 hours ago
I know this wasn't part of my original question, but I'd like the upper coordinate systems to be rotated with respect to the lower ones. Just some fixed relative rotation for all of them. Where would I need to multiply this? And also: How did you get the constants in the code? Just some random choice?
– avermaet
7 hours ago
@avermaet There is now a second version in which you do not have to compute the derivative of the function. In addition you can play with the view angles, which are set intdplotsetmaincoords60-15
.
– Schrödinger's cat
3 hours ago
1
1
Awesome! Sorry about deleting the question before, I was not expecting a full answer anymore.
– avermaet
8 hours ago
Awesome! Sorry about deleting the question before, I was not expecting a full answer anymore.
– avermaet
8 hours ago
@avermaet No worries and you're welcome!
– Schrödinger's cat
7 hours ago
@avermaet No worries and you're welcome!
– Schrödinger's cat
7 hours ago
1
1
(Since the angle between x and z does not change, and since y is fixed, one could construct a pure LaTeX solution with
decorations.markings
. It wouldn't be as direct but would not require computing derivatives by hand.)– Schrödinger's cat
7 hours ago
(Since the angle between x and z does not change, and since y is fixed, one could construct a pure LaTeX solution with
decorations.markings
. It wouldn't be as direct but would not require computing derivatives by hand.)– Schrödinger's cat
7 hours ago
I know this wasn't part of my original question, but I'd like the upper coordinate systems to be rotated with respect to the lower ones. Just some fixed relative rotation for all of them. Where would I need to multiply this? And also: How did you get the constants in the code? Just some random choice?
– avermaet
7 hours ago
I know this wasn't part of my original question, but I'd like the upper coordinate systems to be rotated with respect to the lower ones. Just some fixed relative rotation for all of them. Where would I need to multiply this? And also: How did you get the constants in the code? Just some random choice?
– avermaet
7 hours ago
@avermaet There is now a second version in which you do not have to compute the derivative of the function. In addition you can play with the view angles, which are set in
tdplotsetmaincoords60-15
.– Schrödinger's cat
3 hours ago
@avermaet There is now a second version in which you do not have to compute the derivative of the function. In addition you can play with the view angles, which are set in
tdplotsetmaincoords60-15
.– Schrödinger's cat
3 hours ago
add a comment
|
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f508448%2ftikz-how-to-use-multiple-parameters-in-pic%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
2
It works for me:
documentclass[tikz,border=3mm]standalone begindocument begintikzpicture tikzsetpics/coordsys/.style n args=4 code = draw [->, #1] (0,0,0) -- +(1,0,0)[red] node [pos=1.1]#2; draw [->, #1] (0,0,0) -- +(0,1,0)[green] node [pos=1.1]#3; draw [->, #1] (0,0,0) -- +(0,0,1)[blue] node [pos=1.1]#4; draw (0,0) coordinate (origin) [rotate=360] pic coordsys=very thickxyz; endtikzpicture enddocument
– Schrödinger's cat
8 hours ago