Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-release > by-pkgid > 97aea805d7769ff00c42a2832ddab6a9 > files > 99

asymptote-2.41-1.mga6.armv5tl.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head><title>
Asymptote FAQ - Section 3
</title>
<link rev="made" href="mailto:">
<link rel="Contents" href="index.html">
<link rel="Start" href="index.html">
<link rel="Next" href="section4.html"><link rel="Previous" href="section2.html"><link rel="Bookmark" title="Asymptote FAQ" href="index.html">
</head><body text="#000000" bgcolor="#FFFFFF"><h1>
Asymptote FAQ - Section 3 <br>
Questions about paths
</h1>

<ul>
<li><a href="#tensionsyntax" rel=subdocument>Q3.1. Why do I get a syntax error message when I specify an integer value
for the path tension?</a>
<li><a href="#dots" rel=subdocument>Q3.2. Shouldn't dots always be the same size?</a>
</ul><hr>

<h2><A name="tensionsyntax">
Question 3.1.  Why do I get a syntax error message when I specify an
integer value for the path tension?
</A></h2>

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

<h2><A name="dots">
Question 3.2.  Shouldn't dots always be the same
size?
</A></h2>

From the documentation:  
<p>
&quot;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).&quot; 
<p>
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.  <hr>
Next: <a href="section4.html" rel=precedes>Questions about labels</a>.<br>
Back: <a href="section2.html" rev=precedes>Questions about installation and setup</a>.<br>
<a href="index.html" rev=subdocument>Return to contents</a>.<p>
<address>
<A href="http://asymptote.sourceforge.net">Asymptote</A> 
- 24 March 2017
</address><br>
Extracted from Asymptote Frequently Asked Questions,
Copyright &copy; 2017 .
</body></html>