トップQs
タイムライン
チャット
視点
Asymptote
製図用の自然座標系を示す記述ベクタ形式言語 ウィキペディアから
Remove ads
Asymptote[読み疑問点]は、Andy Hammerlindl、Hammerlindl、John C. Bowman、Tom Princeが開発した製図用の自然座標系を示す記述ベクタ形式言語である。UNIX、 Mac OS、Microsoft Windowsで利用できるGNU Lesser General Public Licenseの自由ソフトウェアである。
![]() |
Remove ads
構文の特徴
LaTeXでPostScript、PDF、SVG、3DPRC出力に対応している。[1] Metapostの影響を受けたが、構文はC++寄りである。
Tk (ツールキット)とPythonで組まれたxasy.pyは、初心者が手軽に描画や.asyコードとして保存、編集、検証するのに役立つ。
例
以下のコードはヘヴィサイドの階段関数グラフを描画する。
import graph;
import settings;
outformat="pdf";
size(300,300);
// Function.
real[] x1 = {-1.5,0};
real[] y1 = {0,0};
real[] x2 = {0,1.5};
real[] y2 = {1,1};
draw(graph(x1,y1),red+2);
draw(graph(x2,y2),red+2);
draw((0,0)--(0,1),red+1.5+linetype("4 4"));
fill( circle((0,1),0.035), red);
filldraw( circle((0,0),0.03), white, red+1.5);
// Axes.
xaxis( Label("$x$"), Ticks(new real[]{-1,-0.5,0.5,1}), Arrow);
yaxis( Label("$y$"), Ticks(new real[]{0.5,1}), Arrow, ymin=-0.18, ymax=1.25);
// Origin.
labelx("$O$",0,SW);
Remove ads
脚注
関連項目
外部リンク
Wikiwand - on
Seamless Wikipedia browsing. On steroids.
Remove ads