Basic Tikz “Missing number” error when using `asin` to calculate the end angle of arc The...

Relations between two reciprocal partial derivatives?

Windows 10: How to Lock (not sleep) laptop on lid close?

How can I define good in a religion that claims no moral authority?

Semisimplicity of the category of coherent sheaves?

How to prevent selfdestruct from another contract

ELI5: Why do they say that Israel would have been the fourth country to land a spacecraft on the Moon and why do they call it low cost?

The following signatures were invalid: EXPKEYSIG 1397BC53640DB551

Match Roman Numerals

Arduino Pro Micro - switch off LEDs

Why did all the guest students take carriages to the Yule Ball?

Difference between "generating set" and free product?

Short and long uuids under /dev/disk/by-uuid

Does Parliament need to approve the new Brexit delay to 31 October 2019?

Was credit for the black hole image misattributed?

Why don't hard Brexiteers insist on a hard border to prevent illegal immigration after Brexit?

Didn't get enough time to take a Coding Test - what to do now?

Did the UK government pay "millions and millions of dollars" to try to snag Julian Assange?

Who or what is the being for whom Being is a question for Heidegger?

Simulating Exploding Dice

What aspect of planet Earth must be changed to prevent the industrial revolution?

How is simplicity better than precision and clarity in prose?

Are spiders unable to hurt humans, especially very small spiders?

Why not take a picture of a closer black hole?

Why does the Event Horizon Telescope (EHT) not include telescopes from Africa, Asia or Australia?



Basic Tikz “Missing number” error when using `asin` to calculate the end angle of arc



The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Tikz: Translate between pt and unit measurementsRotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?Numerical conditional within tikz keys?TikZ: Drawing an arc from an intersection to an intersectionDraw nodes with path in tikzDrawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingLine up nested tikz enviroments or how to get rid of themProblems with nested TikZpicturesTrouble using a predefined constant in tikz partway calculationsNamed paths inside a tikz/pic












1















I am new to plotting in TikZ and has come across the "Missing number error" in the following example on the line marked by %(**),



documentclass{book}
usepackage{tikz}
usetikzlibrary{calc,shapes.geometric,arrows,intersections}
%shapes.geometric and arrows are used in other tikz graphics not included in this MCVE
begin{document}
begin{tikzpicture}[scale=0.3]
draw [name path=yaxis, ->,thick] (0,-2)--(0,12) node (yax) [above] {$Im E$};
draw [->,thick] (-20,0)--(12,0) node (xax) [right] {$Re E$};
path [name path=circular] (-15,0) arc (180:0:8);
path [name intersections={of=circular and yaxis}];
coordinate (c) at (intersection-1);
draw [->,thick] let
p1=(c),
n1={y1/8}, %(*)
n2={asin(n1)} %(**)
in (-15,0) arc (180:n2:8); %(***)
draw let p1=(c) in (0,y1)--(7,y1);
end{tikzpicture}
end{document}


I have checked the existing questions on this site but has not yet found an answer, I tried adding braces in various ways around %(*) and %(**), with no success. I also tried to merge the two lets into one like n1={asin(y1/8)}, and tried variations of this with braces added. All of them report missing numbers error. If I replace n1in line %(**) with a number, or use n1 in place of n2 in %(***) (Not what I intended but I just want to check) there is also no errors.



Other observations,




  • If I replace acos with ln, no error is reported

  • If I replace y1/8 with y1, the error "Dimension too large" is reported


Edit



asin(y1/8)=acos(7/8), so I can plot what I want anyway, but I just don't understand where the error comes from.










share|improve this question









New contributor




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





















  • The error is due to the fact that you ask TikZ to take the arcsin of a number that is larger than 1. (There is an unrelated error in draw [name path=yaxis, ->,thick] (0,-2)--(0,12) node (yax) [above] {$I, which you seem to have forgotten to complete).

    – marmot
    2 days ago











  • Fixed the $I$ part, I tried changing y1/8 to y1/80 and got the same error, so I didn't think that was the reason. However, after you commented I double checked and now I believe you are correct.

    – Weijun Zhou
    2 days ago











  • (There is still a semicolon missing.) You can condense the relevant two lines to draw [->,thick] let p1=(c) in (-15,0) arc (180:{asin(y1/8cm)}:8); draw (c-|0,0) -- (c-|7,0);.

    – marmot
    2 days ago











  • Thank you for your advice. I will take it.

    – Weijun Zhou
    2 days ago
















1















I am new to plotting in TikZ and has come across the "Missing number error" in the following example on the line marked by %(**),



documentclass{book}
usepackage{tikz}
usetikzlibrary{calc,shapes.geometric,arrows,intersections}
%shapes.geometric and arrows are used in other tikz graphics not included in this MCVE
begin{document}
begin{tikzpicture}[scale=0.3]
draw [name path=yaxis, ->,thick] (0,-2)--(0,12) node (yax) [above] {$Im E$};
draw [->,thick] (-20,0)--(12,0) node (xax) [right] {$Re E$};
path [name path=circular] (-15,0) arc (180:0:8);
path [name intersections={of=circular and yaxis}];
coordinate (c) at (intersection-1);
draw [->,thick] let
p1=(c),
n1={y1/8}, %(*)
n2={asin(n1)} %(**)
in (-15,0) arc (180:n2:8); %(***)
draw let p1=(c) in (0,y1)--(7,y1);
end{tikzpicture}
end{document}


I have checked the existing questions on this site but has not yet found an answer, I tried adding braces in various ways around %(*) and %(**), with no success. I also tried to merge the two lets into one like n1={asin(y1/8)}, and tried variations of this with braces added. All of them report missing numbers error. If I replace n1in line %(**) with a number, or use n1 in place of n2 in %(***) (Not what I intended but I just want to check) there is also no errors.



Other observations,




  • If I replace acos with ln, no error is reported

  • If I replace y1/8 with y1, the error "Dimension too large" is reported


Edit



asin(y1/8)=acos(7/8), so I can plot what I want anyway, but I just don't understand where the error comes from.










share|improve this question









New contributor




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





















  • The error is due to the fact that you ask TikZ to take the arcsin of a number that is larger than 1. (There is an unrelated error in draw [name path=yaxis, ->,thick] (0,-2)--(0,12) node (yax) [above] {$I, which you seem to have forgotten to complete).

    – marmot
    2 days ago











  • Fixed the $I$ part, I tried changing y1/8 to y1/80 and got the same error, so I didn't think that was the reason. However, after you commented I double checked and now I believe you are correct.

    – Weijun Zhou
    2 days ago











  • (There is still a semicolon missing.) You can condense the relevant two lines to draw [->,thick] let p1=(c) in (-15,0) arc (180:{asin(y1/8cm)}:8); draw (c-|0,0) -- (c-|7,0);.

    – marmot
    2 days ago











  • Thank you for your advice. I will take it.

    – Weijun Zhou
    2 days ago














1












1








1


1






I am new to plotting in TikZ and has come across the "Missing number error" in the following example on the line marked by %(**),



documentclass{book}
usepackage{tikz}
usetikzlibrary{calc,shapes.geometric,arrows,intersections}
%shapes.geometric and arrows are used in other tikz graphics not included in this MCVE
begin{document}
begin{tikzpicture}[scale=0.3]
draw [name path=yaxis, ->,thick] (0,-2)--(0,12) node (yax) [above] {$Im E$};
draw [->,thick] (-20,0)--(12,0) node (xax) [right] {$Re E$};
path [name path=circular] (-15,0) arc (180:0:8);
path [name intersections={of=circular and yaxis}];
coordinate (c) at (intersection-1);
draw [->,thick] let
p1=(c),
n1={y1/8}, %(*)
n2={asin(n1)} %(**)
in (-15,0) arc (180:n2:8); %(***)
draw let p1=(c) in (0,y1)--(7,y1);
end{tikzpicture}
end{document}


I have checked the existing questions on this site but has not yet found an answer, I tried adding braces in various ways around %(*) and %(**), with no success. I also tried to merge the two lets into one like n1={asin(y1/8)}, and tried variations of this with braces added. All of them report missing numbers error. If I replace n1in line %(**) with a number, or use n1 in place of n2 in %(***) (Not what I intended but I just want to check) there is also no errors.



Other observations,




  • If I replace acos with ln, no error is reported

  • If I replace y1/8 with y1, the error "Dimension too large" is reported


Edit



asin(y1/8)=acos(7/8), so I can plot what I want anyway, but I just don't understand where the error comes from.










share|improve this question









New contributor




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












I am new to plotting in TikZ and has come across the "Missing number error" in the following example on the line marked by %(**),



documentclass{book}
usepackage{tikz}
usetikzlibrary{calc,shapes.geometric,arrows,intersections}
%shapes.geometric and arrows are used in other tikz graphics not included in this MCVE
begin{document}
begin{tikzpicture}[scale=0.3]
draw [name path=yaxis, ->,thick] (0,-2)--(0,12) node (yax) [above] {$Im E$};
draw [->,thick] (-20,0)--(12,0) node (xax) [right] {$Re E$};
path [name path=circular] (-15,0) arc (180:0:8);
path [name intersections={of=circular and yaxis}];
coordinate (c) at (intersection-1);
draw [->,thick] let
p1=(c),
n1={y1/8}, %(*)
n2={asin(n1)} %(**)
in (-15,0) arc (180:n2:8); %(***)
draw let p1=(c) in (0,y1)--(7,y1);
end{tikzpicture}
end{document}


I have checked the existing questions on this site but has not yet found an answer, I tried adding braces in various ways around %(*) and %(**), with no success. I also tried to merge the two lets into one like n1={asin(y1/8)}, and tried variations of this with braces added. All of them report missing numbers error. If I replace n1in line %(**) with a number, or use n1 in place of n2 in %(***) (Not what I intended but I just want to check) there is also no errors.



Other observations,




  • If I replace acos with ln, no error is reported

  • If I replace y1/8 with y1, the error "Dimension too large" is reported


Edit



asin(y1/8)=acos(7/8), so I can plot what I want anyway, but I just don't understand where the error comes from.







tikz-pgf calc






share|improve this question









New contributor




Weijun Zhou 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




Weijun Zhou 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








edited 11 mins ago







Weijun Zhou













New contributor




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









asked 2 days ago









Weijun ZhouWeijun Zhou

1577




1577




New contributor




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





New contributor





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






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













  • The error is due to the fact that you ask TikZ to take the arcsin of a number that is larger than 1. (There is an unrelated error in draw [name path=yaxis, ->,thick] (0,-2)--(0,12) node (yax) [above] {$I, which you seem to have forgotten to complete).

    – marmot
    2 days ago











  • Fixed the $I$ part, I tried changing y1/8 to y1/80 and got the same error, so I didn't think that was the reason. However, after you commented I double checked and now I believe you are correct.

    – Weijun Zhou
    2 days ago











  • (There is still a semicolon missing.) You can condense the relevant two lines to draw [->,thick] let p1=(c) in (-15,0) arc (180:{asin(y1/8cm)}:8); draw (c-|0,0) -- (c-|7,0);.

    – marmot
    2 days ago











  • Thank you for your advice. I will take it.

    – Weijun Zhou
    2 days ago



















  • The error is due to the fact that you ask TikZ to take the arcsin of a number that is larger than 1. (There is an unrelated error in draw [name path=yaxis, ->,thick] (0,-2)--(0,12) node (yax) [above] {$I, which you seem to have forgotten to complete).

    – marmot
    2 days ago











  • Fixed the $I$ part, I tried changing y1/8 to y1/80 and got the same error, so I didn't think that was the reason. However, after you commented I double checked and now I believe you are correct.

    – Weijun Zhou
    2 days ago











  • (There is still a semicolon missing.) You can condense the relevant two lines to draw [->,thick] let p1=(c) in (-15,0) arc (180:{asin(y1/8cm)}:8); draw (c-|0,0) -- (c-|7,0);.

    – marmot
    2 days ago











  • Thank you for your advice. I will take it.

    – Weijun Zhou
    2 days ago

















The error is due to the fact that you ask TikZ to take the arcsin of a number that is larger than 1. (There is an unrelated error in draw [name path=yaxis, ->,thick] (0,-2)--(0,12) node (yax) [above] {$I, which you seem to have forgotten to complete).

– marmot
2 days ago





The error is due to the fact that you ask TikZ to take the arcsin of a number that is larger than 1. (There is an unrelated error in draw [name path=yaxis, ->,thick] (0,-2)--(0,12) node (yax) [above] {$I, which you seem to have forgotten to complete).

– marmot
2 days ago













Fixed the $I$ part, I tried changing y1/8 to y1/80 and got the same error, so I didn't think that was the reason. However, after you commented I double checked and now I believe you are correct.

– Weijun Zhou
2 days ago





Fixed the $I$ part, I tried changing y1/8 to y1/80 and got the same error, so I didn't think that was the reason. However, after you commented I double checked and now I believe you are correct.

– Weijun Zhou
2 days ago













(There is still a semicolon missing.) You can condense the relevant two lines to draw [->,thick] let p1=(c) in (-15,0) arc (180:{asin(y1/8cm)}:8); draw (c-|0,0) -- (c-|7,0);.

– marmot
2 days ago





(There is still a semicolon missing.) You can condense the relevant two lines to draw [->,thick] let p1=(c) in (-15,0) arc (180:{asin(y1/8cm)}:8); draw (c-|0,0) -- (c-|7,0);.

– marmot
2 days ago













Thank you for your advice. I will take it.

– Weijun Zhou
2 days ago





Thank you for your advice. I will take it.

– Weijun Zhou
2 days ago










2 Answers
2






active

oldest

votes


















1














I personally would compute the angle in a different way (assuming you do not want to do it analytically). You have a semicircle around (-7,0) of radius 8cm, of which you want to draw the path to the intersection of the y-axis. That is, we want the polar coordinates of (c)-(-7,0). The angle can be computed via atan2, which avoids having to divide by dimensions, and related errors that may occur when asking TikZ to compute the arcsin of a number larger than 1, as it occurs. atan2 is defined for any arguments, so this error cannot occur (and this way of computing the angle is arguably more intuitive). The horizontal stretch does not require calc (but of course there is nothing wrong with using calc here).



documentclass{book}
usepackage{tikz}
usetikzlibrary{calc,intersections}
begin{document}
begin{tikzpicture}[scale=0.3]
draw [name path=yaxis, ->,thick] (0,-2)--(0,12) node (yax) [above] {$Im E$};
draw [->,thick] (-20,0)--(12,0) node (xax) [right] {$Re E$};
path [name path=circular] (-15,0) arc (180:0:8);
path [name intersections={of=circular and yaxis}];
coordinate (c) at (intersection-1);
draw [->,thick] let p1=($(c)-(-7,0)$),
n1={atan2(y1,x1)} in (-15,0) arc (180:n1:8);
draw (c-|0,0) -- (c-|7,0);
end{tikzpicture}
end{document}


enter image description here






share|improve this answer



















  • 1





    Tried atan2 before I got the cm part. I had a number (without dimension) at where you put x1 and the result was not as expected. I guess I need to know about the cm before I can write correct code as above. Anyway, in the final version I used acos(7/8) and removed all the lets altogether.

    – Weijun Zhou
    2 days ago





















1














I found the answer in a closed question. To me that question is very clear what is being asked and I don't know why it was closed.



Following the 2nd comment in Tikz: Translate between pt and unit measurements, I changed n1={y1/8} to n1={y1/8cm}, and it worked as expected. This is because the internal coordinate system uses cm as the unit length but reports coordinates with unit pt when using the coordinate assignment.



Still, I don't understand why the error is "Missing number, treated as zero", but at least I know what is the correct thing to do in the future.






share|improve this answer










New contributor




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





















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


    }
    });






    Weijun Zhou 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%2f484321%2fbasic-tikz-missing-number-error-when-using-asin-to-calculate-the-end-angle-o%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    I personally would compute the angle in a different way (assuming you do not want to do it analytically). You have a semicircle around (-7,0) of radius 8cm, of which you want to draw the path to the intersection of the y-axis. That is, we want the polar coordinates of (c)-(-7,0). The angle can be computed via atan2, which avoids having to divide by dimensions, and related errors that may occur when asking TikZ to compute the arcsin of a number larger than 1, as it occurs. atan2 is defined for any arguments, so this error cannot occur (and this way of computing the angle is arguably more intuitive). The horizontal stretch does not require calc (but of course there is nothing wrong with using calc here).



    documentclass{book}
    usepackage{tikz}
    usetikzlibrary{calc,intersections}
    begin{document}
    begin{tikzpicture}[scale=0.3]
    draw [name path=yaxis, ->,thick] (0,-2)--(0,12) node (yax) [above] {$Im E$};
    draw [->,thick] (-20,0)--(12,0) node (xax) [right] {$Re E$};
    path [name path=circular] (-15,0) arc (180:0:8);
    path [name intersections={of=circular and yaxis}];
    coordinate (c) at (intersection-1);
    draw [->,thick] let p1=($(c)-(-7,0)$),
    n1={atan2(y1,x1)} in (-15,0) arc (180:n1:8);
    draw (c-|0,0) -- (c-|7,0);
    end{tikzpicture}
    end{document}


    enter image description here






    share|improve this answer



















    • 1





      Tried atan2 before I got the cm part. I had a number (without dimension) at where you put x1 and the result was not as expected. I guess I need to know about the cm before I can write correct code as above. Anyway, in the final version I used acos(7/8) and removed all the lets altogether.

      – Weijun Zhou
      2 days ago


















    1














    I personally would compute the angle in a different way (assuming you do not want to do it analytically). You have a semicircle around (-7,0) of radius 8cm, of which you want to draw the path to the intersection of the y-axis. That is, we want the polar coordinates of (c)-(-7,0). The angle can be computed via atan2, which avoids having to divide by dimensions, and related errors that may occur when asking TikZ to compute the arcsin of a number larger than 1, as it occurs. atan2 is defined for any arguments, so this error cannot occur (and this way of computing the angle is arguably more intuitive). The horizontal stretch does not require calc (but of course there is nothing wrong with using calc here).



    documentclass{book}
    usepackage{tikz}
    usetikzlibrary{calc,intersections}
    begin{document}
    begin{tikzpicture}[scale=0.3]
    draw [name path=yaxis, ->,thick] (0,-2)--(0,12) node (yax) [above] {$Im E$};
    draw [->,thick] (-20,0)--(12,0) node (xax) [right] {$Re E$};
    path [name path=circular] (-15,0) arc (180:0:8);
    path [name intersections={of=circular and yaxis}];
    coordinate (c) at (intersection-1);
    draw [->,thick] let p1=($(c)-(-7,0)$),
    n1={atan2(y1,x1)} in (-15,0) arc (180:n1:8);
    draw (c-|0,0) -- (c-|7,0);
    end{tikzpicture}
    end{document}


    enter image description here






    share|improve this answer



















    • 1





      Tried atan2 before I got the cm part. I had a number (without dimension) at where you put x1 and the result was not as expected. I guess I need to know about the cm before I can write correct code as above. Anyway, in the final version I used acos(7/8) and removed all the lets altogether.

      – Weijun Zhou
      2 days ago
















    1












    1








    1







    I personally would compute the angle in a different way (assuming you do not want to do it analytically). You have a semicircle around (-7,0) of radius 8cm, of which you want to draw the path to the intersection of the y-axis. That is, we want the polar coordinates of (c)-(-7,0). The angle can be computed via atan2, which avoids having to divide by dimensions, and related errors that may occur when asking TikZ to compute the arcsin of a number larger than 1, as it occurs. atan2 is defined for any arguments, so this error cannot occur (and this way of computing the angle is arguably more intuitive). The horizontal stretch does not require calc (but of course there is nothing wrong with using calc here).



    documentclass{book}
    usepackage{tikz}
    usetikzlibrary{calc,intersections}
    begin{document}
    begin{tikzpicture}[scale=0.3]
    draw [name path=yaxis, ->,thick] (0,-2)--(0,12) node (yax) [above] {$Im E$};
    draw [->,thick] (-20,0)--(12,0) node (xax) [right] {$Re E$};
    path [name path=circular] (-15,0) arc (180:0:8);
    path [name intersections={of=circular and yaxis}];
    coordinate (c) at (intersection-1);
    draw [->,thick] let p1=($(c)-(-7,0)$),
    n1={atan2(y1,x1)} in (-15,0) arc (180:n1:8);
    draw (c-|0,0) -- (c-|7,0);
    end{tikzpicture}
    end{document}


    enter image description here






    share|improve this answer













    I personally would compute the angle in a different way (assuming you do not want to do it analytically). You have a semicircle around (-7,0) of radius 8cm, of which you want to draw the path to the intersection of the y-axis. That is, we want the polar coordinates of (c)-(-7,0). The angle can be computed via atan2, which avoids having to divide by dimensions, and related errors that may occur when asking TikZ to compute the arcsin of a number larger than 1, as it occurs. atan2 is defined for any arguments, so this error cannot occur (and this way of computing the angle is arguably more intuitive). The horizontal stretch does not require calc (but of course there is nothing wrong with using calc here).



    documentclass{book}
    usepackage{tikz}
    usetikzlibrary{calc,intersections}
    begin{document}
    begin{tikzpicture}[scale=0.3]
    draw [name path=yaxis, ->,thick] (0,-2)--(0,12) node (yax) [above] {$Im E$};
    draw [->,thick] (-20,0)--(12,0) node (xax) [right] {$Re E$};
    path [name path=circular] (-15,0) arc (180:0:8);
    path [name intersections={of=circular and yaxis}];
    coordinate (c) at (intersection-1);
    draw [->,thick] let p1=($(c)-(-7,0)$),
    n1={atan2(y1,x1)} in (-15,0) arc (180:n1:8);
    draw (c-|0,0) -- (c-|7,0);
    end{tikzpicture}
    end{document}


    enter image description here







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered 2 days ago









    marmotmarmot

    117k6150283




    117k6150283








    • 1





      Tried atan2 before I got the cm part. I had a number (without dimension) at where you put x1 and the result was not as expected. I guess I need to know about the cm before I can write correct code as above. Anyway, in the final version I used acos(7/8) and removed all the lets altogether.

      – Weijun Zhou
      2 days ago
















    • 1





      Tried atan2 before I got the cm part. I had a number (without dimension) at where you put x1 and the result was not as expected. I guess I need to know about the cm before I can write correct code as above. Anyway, in the final version I used acos(7/8) and removed all the lets altogether.

      – Weijun Zhou
      2 days ago










    1




    1





    Tried atan2 before I got the cm part. I had a number (without dimension) at where you put x1 and the result was not as expected. I guess I need to know about the cm before I can write correct code as above. Anyway, in the final version I used acos(7/8) and removed all the lets altogether.

    – Weijun Zhou
    2 days ago







    Tried atan2 before I got the cm part. I had a number (without dimension) at where you put x1 and the result was not as expected. I guess I need to know about the cm before I can write correct code as above. Anyway, in the final version I used acos(7/8) and removed all the lets altogether.

    – Weijun Zhou
    2 days ago













    1














    I found the answer in a closed question. To me that question is very clear what is being asked and I don't know why it was closed.



    Following the 2nd comment in Tikz: Translate between pt and unit measurements, I changed n1={y1/8} to n1={y1/8cm}, and it worked as expected. This is because the internal coordinate system uses cm as the unit length but reports coordinates with unit pt when using the coordinate assignment.



    Still, I don't understand why the error is "Missing number, treated as zero", but at least I know what is the correct thing to do in the future.






    share|improve this answer










    New contributor




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

























      1














      I found the answer in a closed question. To me that question is very clear what is being asked and I don't know why it was closed.



      Following the 2nd comment in Tikz: Translate between pt and unit measurements, I changed n1={y1/8} to n1={y1/8cm}, and it worked as expected. This is because the internal coordinate system uses cm as the unit length but reports coordinates with unit pt when using the coordinate assignment.



      Still, I don't understand why the error is "Missing number, treated as zero", but at least I know what is the correct thing to do in the future.






      share|improve this answer










      New contributor




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























        1












        1








        1







        I found the answer in a closed question. To me that question is very clear what is being asked and I don't know why it was closed.



        Following the 2nd comment in Tikz: Translate between pt and unit measurements, I changed n1={y1/8} to n1={y1/8cm}, and it worked as expected. This is because the internal coordinate system uses cm as the unit length but reports coordinates with unit pt when using the coordinate assignment.



        Still, I don't understand why the error is "Missing number, treated as zero", but at least I know what is the correct thing to do in the future.






        share|improve this answer










        New contributor




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










        I found the answer in a closed question. To me that question is very clear what is being asked and I don't know why it was closed.



        Following the 2nd comment in Tikz: Translate between pt and unit measurements, I changed n1={y1/8} to n1={y1/8cm}, and it worked as expected. This is because the internal coordinate system uses cm as the unit length but reports coordinates with unit pt when using the coordinate assignment.



        Still, I don't understand why the error is "Missing number, treated as zero", but at least I know what is the correct thing to do in the future.







        share|improve this answer










        New contributor




        Weijun Zhou 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 answer



        share|improve this answer








        edited 2 days ago





















        New contributor




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









        answered 2 days ago









        Weijun ZhouWeijun Zhou

        1577




        1577




        New contributor




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





        New contributor





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






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






















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










            draft saved

            draft discarded


















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













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












            Weijun Zhou 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%2f484321%2fbasic-tikz-missing-number-error-when-using-asin-to-calculate-the-end-angle-o%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

            Installing LyX: “No textclass is found.”LyX installation error- text class not found- 'Reconfigure' or...

            (1602) Indiana Índice Designación y nombre Características orbitales Véase...

            Universidad Autónoma de Occidente Índice Historia Campus Facultades Programas Académicos Medios de...