Asymptote FAQ - Section 3
Questions about paths

Question 3.1. Why do I get a syntax error message when I specify an integer value for the path tension?

What is happening here is that
draw((0,0)..tension 2..(0,50)..(100,100));
is read as
draw((0,0)..tension 2. .(0,50)..(100,100));
So the first . after the two is treated as a decimal point. Just put a space after the integer tension value:
draw((0,0)..tension 2 ..(0,50)..(100,100));

Question 3.2. Shouldn't dots always be the same size?

From the documentation:

"The dot command defined in the module plain draws a dot having a diameter equal to an explicit pen linewidth or the default linewidth magnified by dotfactor (6 by default)."

Thus, when you use the default pen, the dot will have size 6*linewidth, but when you give a pen with an explicit width specified, you will have a dot of size linewidth. If you want the first case to behave like the second, you may set dotfactor=1.

Next: Questions about labels.
Back: Questions about installation and setup.
Return to contents.

Asymptote - 22 March 2017

Extracted from Asymptote Frequently Asked Questions, Copyright © 2017 .