<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Asymptote Metapost PostScript</title>
	<atom:link href="http://asympps.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://asympps.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Mon, 07 Apr 2008 18:12:32 +0000</lastBuildDate>
	<language>fr</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='asympps.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Asymptote Metapost PostScript</title>
		<link>http://asympps.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://asympps.wordpress.com/osd.xml" title="Asymptote Metapost PostScript" />
	<atom:link rel='hub' href='http://asympps.wordpress.com/?pushpress=hub'/>
		<item>
		<title>size et unitsize</title>
		<link>http://asympps.wordpress.com/2008/04/07/size-et-unitsize/</link>
		<comments>http://asympps.wordpress.com/2008/04/07/size-et-unitsize/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 18:11:27 +0000</pubDate>
		<dc:creator>Mathafix</dc:creator>
				<category><![CDATA[asymptote]]></category>
		<category><![CDATA[size]]></category>
		<category><![CDATA[unité x]]></category>
		<category><![CDATA[unité y]]></category>
		<category><![CDATA[unitsize]]></category>

		<guid isPermaLink="false">http://asympps.wordpress.com/?p=24</guid>
		<description><![CDATA[La documentation donne : To make the user coordinates of picture pic represent multiples of x units in the x direction and y units in the y direction, use void unitsize(picture pic=currentpicture, real x, real y=x); When nonzero, these x and y values override the corresponding size parameters of picture pic. L&#8217;image suivante : peut [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asympps.wordpress.com&amp;blog=3406292&amp;post=24&amp;subd=asympps&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>La <a href="http://asymptote.sourceforge.net/doc/size.html#size" target="_blank">documentation </a>donne :</p>
<blockquote><p>To make the user coordinates of picture <code>pic</code> represent multiples of <code>x</code> units in the x direction and <code>y</code> units in the y direction, use <a name="unitsize"></a> <a name="index-g_t_0040code_007bunitsize_007d-386"></a></p>
<pre>void unitsize(picture pic=currentpicture, real x, real y=x);</pre>
<p>When nonzero, these <code>x</code> and <code>y</code> values override the corresponding size parameters of picture <code>pic</code>.</p></blockquote>
<p>L&#8217;image suivante :</p>
<p style="text-align:center;"><a href="http://asympps.files.wordpress.com/2008/04/fig00801.png"><img class="alignnone size-full wp-image-25" src="http://asympps.files.wordpress.com/2008/04/fig00801.png?w=780" alt=""   /></a></p>
<p>peut être envisagée de deux manières différentes en ce qui concerne l&#8217;écriture des coordonnées des points. Le code de cette image est le suivant :</p>
<blockquote>
<pre><span class="type"><span style="color:#ff0000;">&lt;partie variable du code&gt;</span>
pair</span> <span class="variable-name">A</span>, <span class="variable-name">B</span>, <span class="variable-name">C</span>, <span class="variable-name">D</span>;
A=(0,0);
<span style="color:#000000;">B=(<span style="color:#ff0000;">2</span>,0);
C=(<span style="color:#ff0000;">4</span>,0);
D=(<span style="color:#ff0000;">4</span>,<span style="color:#ff0000;">2</span>);</span>
<span class="function-name">draw</span> (A--B);
<span class="function-name">draw</span> (C--D);</pre>
</blockquote>
<p>Soit on utilise les unités directement dans les coordonnées (en ne donnant aucune contrainte sur les paramètres de size ) :</p>
<blockquote>
<pre><span style="color:#ff0000;"><span class="function-name">size</span>(0,0);</span>
<span class="type">pair</span> <span class="variable-name">A</span>, <span class="variable-name">B</span>, <span class="variable-name">C</span>, <span class="variable-name">D</span>;
A=(0,0);
B=(<span style="color:#ff0000;">2<span class="constant">cm</span></span>,0);
C=(<span style="color:#ff0000;">4<span class="constant">cm</span></span>,0);
D=(<span style="color:#ff0000;">4<span class="constant">cm</span></span>,<span style="color:#ff0000;">2<span class="constant">cm</span></span>);
<span class="function-name">draw</span> (A--B);
<span class="function-name">draw</span> (C--D);</pre>
</blockquote>
<p>Soit on définit au préalable l&#8217;unité qui sera implicitement utilisée dans les coordonnées via unitsize :</p>
<blockquote>
<pre><span style="color:#ff0000;"><span class="function-name">unitsize</span>(1<span class="constant">cm</span>);</span>
<span class="type">pair</span> <span class="variable-name">A</span>, <span class="variable-name">B</span>, <span class="variable-name">C</span>,<span class="variable-name">D</span>;
A=(0,0);
<span style="color:#000000;">B=(<span style="color:#ff0000;">2</span>,0);
C=(<span style="color:#ff0000;">4</span>,0);
D=(<span style="color:#ff0000;">4</span>,<span style="color:#ff0000;">2</span>);</span>
<span class="function-name">draw</span> (A--B);
<span class="function-name">draw</span> (C--D);</pre>
</blockquote>
<p>On peut donner deux &#8220;unités&#8221; différentes en première coordonnée et deuxième coordonnée, comme dans :</p>
<blockquote>
<pre><span style="color:#ff0000;"><span class="function-name">unitsize</span>(x=1<span class="constant">cm</span>, y=.5<span class="constant">cm</span>);</span>
<span class="type">pair</span> <span class="variable-name">A</span>, <span class="variable-name">B</span>, <span class="variable-name">C</span>,<span class="variable-name">D</span>;
A=(0,0);
<span style="color:#000000;">B=(<span style="color:#ff0000;">2</span>,0);
C=(<span style="color:#ff0000;">4</span>,0);
D=(<span style="color:#ff0000;">4</span>,<span style="color:#ff0000;">2</span>);</span>
<span class="function-name">draw</span>(A--B);
<span class="function-name">draw</span>(C--D);</pre>
</blockquote>
<p>ce qui donne comme image :</p>
<p style="text-align:center;"><a href="http://asympps.files.wordpress.com/2008/04/fig01001.png"><img class="alignnone size-full wp-image-26" src="http://asympps.files.wordpress.com/2008/04/fig01001.png?w=780" alt=""   /></a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/asympps.wordpress.com/24/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/asympps.wordpress.com/24/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/asympps.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/asympps.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/asympps.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/asympps.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/asympps.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/asympps.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/asympps.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/asympps.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/asympps.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/asympps.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/asympps.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/asympps.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/asympps.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/asympps.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asympps.wordpress.com&amp;blog=3406292&amp;post=24&amp;subd=asympps&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://asympps.wordpress.com/2008/04/07/size-et-unitsize/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/37062db64783e89e73017713f8964796?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mathafix</media:title>
		</media:content>

		<media:content url="http://asympps.files.wordpress.com/2008/04/fig00801.png" medium="image" />

		<media:content url="http://asympps.files.wordpress.com/2008/04/fig01001.png" medium="image" />
	</item>
		<item>
		<title>Size</title>
		<link>http://asympps.wordpress.com/2008/04/07/size/</link>
		<comments>http://asympps.wordpress.com/2008/04/07/size/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 17:12:21 +0000</pubDate>
		<dc:creator>Mathafix</dc:creator>
				<category><![CDATA[asymptote]]></category>
		<category><![CDATA[size]]></category>
		<category><![CDATA[taille image]]></category>

		<guid isPermaLink="false">http://asympps.wordpress.com/?p=3</guid>
		<description><![CDATA[La documentation donne : The size routine specifies the dimensions of the desired picture: void size(picture pic=currentpicture, real x, real y=x, bool keepAspect=Aspect); If the x and y sizes are both 0, user coordinates will be interpreted as PostScript coordinates. In this case, the transform mapping pic to the final output frame is identity(). If [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asympps.wordpress.com&amp;blog=3406292&amp;post=3&amp;subd=asympps&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>La <a href="http://asymptote.sourceforge.net/" target="_blank">documentation</a> donne :</p>
<blockquote><p>The <code>size</code> routine specifies the dimensions of the desired picture:</p>
<p><a name="size"></a> <a name="index-g_t_0040code_007bsize_007d-383"></a></p>
<pre>void size(picture pic=currentpicture, real x, real y=x,
bool keepAspect=Aspect);</pre>
<p>If the <code>x</code> and <code>y</code> sizes are both 0, user coordinates will be interpreted as <code>PostScript</code> coordinates. In this case, the transform mapping <code>pic</code> to the final output frame is <code>identity()</code>.</p>
<p>If exactly one of <code>x</code> or <code>y</code> is 0, no size restriction is imposed in that direction; it will be scaled the same as the other direction.</p>
<p><a name="index-g_t_0040code_007bAspect_007d-384"></a>If <code>keepAspect</code> is set to <code>Aspect</code> or <code>true</code>, the picture will be scaled with its aspect ratio preserved such that the final width is no more than <code>x</code> and the final height is no more than <code>y</code>.</p>
<p><a name="index-g_t_0040code_007bIgnoreAspect_007d-385"></a>If <code>keepAspect</code> is set to <code>IgnoreAspect</code> or <code>false</code>, the picture will be scaled in both directions so that the final width is <code>x</code> and the height is <code>y</code>.</p></blockquote>
<p>Reprise des exemples trouvés <a href="http://piprim.tuxfamily.org/asymptote/generale/index.html" target="_blank">ici</a>. Pour les exemples qui suivent, le code est toujours le même, à savoir :</p>
<blockquote>
<pre><span class="type"><span style="color:#ff0000;">&lt; partie variable du code &gt;</span>
pair</span> <span class="variable-name">A</span>, <span class="variable-name">B</span>, <span class="variable-name">C</span>, <span class="variable-name">D</span>;
A=(0,0);
B=(2,0);
C=(4,0);
D=(4,2);
<span class="function-name">draw</span> (A--B);
<span class="function-name">draw</span> (C--D);</pre>
</blockquote>
<h2>Exemple 1</h2>
<p>Si l&#8217;on met <span style="color:#ff0000;"><span class="function-name">size</span>(0,0);</span> alors on obtient :</p>
<p style="text-align:center;"><a href="http://asympps.files.wordpress.com/2008/04/fig0010.png"><img class="alignnone size-medium wp-image-14" src="http://asympps.files.wordpress.com/2008/04/fig0010.png?w=7&#038;h=4" alt="" width="7" height="4" /></a></p>
<p><span style="color:#008000;">Aucune restriction en x et y, l&#8217;unité par défaut est 1/72 in.</span></p>
<h2>Exemple 2</h2>
<p>Si l&#8217;on met <span style="color:#ff0000;"><span class="function-name">size</span>(1<span class="constant">cm</span>,0);<span style="color:#000000;"> alors on obtient :</span></span></p>
<p style="text-align:center;"><a href="http://asympps.files.wordpress.com/2008/04/fig0020.png"><img class="alignnone size-full wp-image-15" src="http://asympps.files.wordpress.com/2008/04/fig0020.png?w=780" alt=""   /></a></p>
<p><span style="color:#008000;">La largeur de l&#8217;image sera de 1 cm, aucune restriction pour la hauteur.</span></p>
<h2>Exemple 3</h2>
<p>Si l&#8217;on met <span style="color:#ff0000;"><span class="function-name">size</span>(3<span class="constant">cm</span>,0);</span> alors on obtient :</p>
<p style="text-align:center;"><a href="http://asympps.files.wordpress.com/2008/04/fig0030.png"><img class="alignnone size-full wp-image-16" src="http://asympps.files.wordpress.com/2008/04/fig0030.png?w=780" alt=""   /></a></p>
<p style="text-align:left;"><span style="color:#008000;">La largeur de l&#8217;image sera de 3 cm, aucune restriction pour la hauteur.</span></p>
<p style="text-align:left;">
<h2>Exemple 4</h2>
<p>Si l&#8217;on met <span style="color:#ff0000;">size(1cm,.5cm);</span> alors on obtient :</p>
<p style="text-align:center;"><a href="http://asympps.files.wordpress.com/2008/04/fig0040.png"><img class="alignnone size-full wp-image-17" src="http://asympps.files.wordpress.com/2008/04/fig0040.png?w=780" alt=""   /></a></p>
<p style="text-align:left;"><span style="color:#008000;">Les dimensions de l&#8217;image seront de 1 cm maximum en x et 0,5 cm maximum en y, en respectant ses proportions (rappel : l&#8217;image a un rapport r=largeur/hauteur=4/2=2).</span></p>
<h2>Exemple 5</h2>
<p>Si l&#8217;on met <span style="color:#ff0000;">size(3cm,.5cm); </span>alors on obtient :</p>
<p style="text-align:center;"><a href="http://asympps.files.wordpress.com/2008/04/fig0050.png"><img class="alignnone size-full wp-image-18" src="http://asympps.files.wordpress.com/2008/04/fig0050.png?w=780" alt=""   /></a></p>
<p><span style="color:#008000;">Les dimensions de l&#8217;image seront 3 cm maximum en x et 0,5 cm maximum en y, en respectant ses proportions. Si l&#8217;on joue sur la largeur, on aurait une nouvelle largeur égale à 3 cm et une hauteur égale à 1,5 cm &gt; 0,5 cm. On joue alors sur la hauteur : la nouvelle hauteur est de 0,5 cm et la nouvelle largeur est de 1 cm.</span></p>
<h2>Exemple 6</h2>
<p>Si l&#8217;on met <span style="color:#ff0000;">size(3cm,.5cm,false); </span>alors on obtient :</p>
<p style="text-align:center;"><a href="http://asympps.files.wordpress.com/2008/04/fig0060.png"><img class="alignnone size-full wp-image-19" src="http://asympps.files.wordpress.com/2008/04/fig0060.png?w=780" alt=""   /></a></p>
<p style="text-align:left;"><span style="color:#008000;">Les dimensions seront exactement de 3 cm x 0,5 cm puisque les proportions de l&#8217;image ne sont pas respectées.<br />
</span></p>
<h2>Exemple 7</h2>
<p>Si l&#8217;on met <span style="color:#ff0000;">size(1cm,3cm,false);</span> alors on obtient :</p>
<p style="text-align:center;"><a href="http://asympps.files.wordpress.com/2008/04/fig0070.png"><img class="alignnone size-full wp-image-20" src="http://asympps.files.wordpress.com/2008/04/fig0070.png?w=780" alt=""   /></a></p>
<p style="text-align:left;"><span style="color:#008000;">Les dimensions de l&#8217;image seront exactement 1 cm x 3 cm puisque les proportions de l&#8217;image ne sont pas respectées.</span></p>
<p style="text-align:left;">
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/asympps.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/asympps.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/asympps.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/asympps.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/asympps.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/asympps.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/asympps.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/asympps.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/asympps.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/asympps.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/asympps.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/asympps.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/asympps.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/asympps.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/asympps.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/asympps.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asympps.wordpress.com&amp;blog=3406292&amp;post=3&amp;subd=asympps&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://asympps.wordpress.com/2008/04/07/size/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/37062db64783e89e73017713f8964796?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mathafix</media:title>
		</media:content>

		<media:content url="http://asympps.files.wordpress.com/2008/04/fig0010.png" medium="image" />

		<media:content url="http://asympps.files.wordpress.com/2008/04/fig0020.png" medium="image" />

		<media:content url="http://asympps.files.wordpress.com/2008/04/fig0030.png" medium="image" />

		<media:content url="http://asympps.files.wordpress.com/2008/04/fig0040.png" medium="image" />

		<media:content url="http://asympps.files.wordpress.com/2008/04/fig0050.png" medium="image" />

		<media:content url="http://asympps.files.wordpress.com/2008/04/fig0060.png" medium="image" />

		<media:content url="http://asympps.files.wordpress.com/2008/04/fig0070.png" medium="image" />
	</item>
	</channel>
</rss>
