Asymptote

1 program Added 2025-10-30T18:03:49Z Model: x-ai/grok-4-fastTemp: 0.4 Evidence Report issue View issues
Aliases: —
Provenance: commit c709a8888b · authored 2025-10-30T19:03:49+01:00 · model x-ai/grok-4-fast

Sources mentioning this language

8 sources · pl_id: pl/asymptote
LLM (this repo) · 1PldbLinguistPygmentsWikipediaHyperpolyglotRosettacodeWikidata · Q779317

Wikipedia infobox

Pulled from the wikimedia/structured-wikipedia snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and pl_fact.csv for the long-table provenance.

Paradigmsimperative · typesetting
Typingstrong
Designed byAndy Hammerlindl · John C. Bowman · Tom Prince
First appeared2004
Influenced byMetaPost
LicenseLGPL
Implemented inC++
Homepagehttps://asymptote.sourceforge.io

Extensions claimed by this language

2 claims. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.asylinguistprimary101.1K files
.asypygmentsprimary101.1K files

Related languages

Ante (0.21)Acute (0.20)Affe (0.13)Aime (0.13)Kite (0.13)

LLM-contributed programs

Simple Line Drawing

Provenance: commit c709a8888b · authored 2025-10-30T19:03:49+01:00 · model x-ai/grok-4-fast · Temp 0.4
code.asy · added: 2025-10-30T18:03:49Z
import settings;

settings.outformat="pdf";

size(200);

draw((0,0)--(1,1));

Real programs from Software Heritage

1 sample mined from derived_datasets/<date>/contents/*.parquet, byte-verified against the SWH archive. Citation-grade qualified SWHIDs preserved.
figlinescalarfield4_3D.asy · 2347 B · ext .asy · seen 32× in SWH
via default-rulerule h/linguist/.asy/1
swh:1:cnt:6e9e5de8c6ca1b1b217b505f0b8023a523101f39;origin=https://github.com/APEXCalculus/APEXCalculus_Source;anchor=swh:1:rev:fddeb9898bd913cec139bb5bfb54b5ddc05ca901;path=/figures/figlinescalarfield4_3D.asy
Open in SWH · Raw bytes (SWH) · GitHub raw
Show source
import graph3;

// ASY file for figlinescalarfield2_3D.asy in Chapter 10
// The path is an elliptical helix <cos t, 2sin t, t/pi>; no specific surface.
// 
// This draws the  surface of the area we seek.

size(200,200,IgnoreAspect);
//currentprojection=perspective(7,2,1);
currentprojection=orthographic(10,11,4.5);
//(7.63,8.65,5);
//currentprojection=orthographic(2.5,4.6,1.9);
defaultrender.merge=true;

//usepackage("mathspec");
//texpreamble("\setallmainfonts[Mapping=tex-text]{Calibri}");
//texpreamble("\setmainfont[Mapping=tex-text]{Calibri}");
//texpreamble("\setsansfont[Mapping=tex-text]{Calibri}");
//texpreamble("\setmathsfont(Greek){[cmmi10]}");

// setup and draw the axes
real[] myxchoice={-2,2};
real[] myychoice={-2,2};
real[] myzchoice={2};
defaultpen(0.5mm);
pair xbounds=(-2.2,2.2);
pair ybounds=(-2.2,2.2);
pair zbounds=(-.1,2.5);

xaxis3("",xbounds.x,xbounds.y,black,OutTicks(myxchoice),Arrow3(size=3mm));
yaxis3("",ybounds.x,ybounds.y,black,OutTicks(myychoice),Arrow3(size=3mm));
zaxis3("",zbounds.x,zbounds.y,black,OutTicks(myzchoice),Arrow3(size=3mm));

label("$x$",(xbounds.y+0.05*(xbounds.y-xbounds.x),0,0));
label("$y$",(0,ybounds.y+0.05*(ybounds.y-ybounds.x),0));
label("$z$",(0,0,zbounds.y+0.05*(zbounds.y-zbounds.x)));

//Draw the surface z=x^2-y^2+3
triple f(pair t) {
	return (cos(t.x),2sin(t.x),t.y*(t.x/pi));
}
surface s=surface(f,(0,0),(2pi,1),16,8,Spline);
pen p=rgb(0,0,.7);
draw(s,emissive(rgb(.6,.6,1)+opacity(.7)),meshpen=p);

triple g(real t) {return (cos(t),2sin(t),t/pi);}
path3 mypath=graph(g,0,2pi,operator ..);
draw(mypath,blue+linewidth(2));

triple g(real t) {return (cos(t),2sin(t),0);}
path3 mypath=graph(g,0,2pi,operator ..);
draw(mypath,blue+linewidth(2)+dashed);

// ////////////////////////////////////
//    SAMPLE CODE

// defaultpen(fontsize(10pt));

//real f(pair z) {return -z.x^4+2*z.x^2-z.y^4+2*z.y^2;}
//surface s=surface(f,(-1.5,-1.5),(1.5,1.5),Spline);

//triple f(pair t) {
//  return (cos(t.x)*1.5*cos(t.y),sin(t.x)*cos(t.y),sin(t.y));
//}
//surface s=surface(f,(0,0),(pi,2*pi),8,8,Spline);

//triple g(real t) {return (t,t,-2*t^4+4*t^2);}
//path3 mypath=graph(g,-1,1,operator ..);

//pen p=rgb(0,0,1);
//draw(s,paleblue+opacity(.5),meshpen=p,render(merge=true));

//draw(s,paleblue);
//draw(s,lightblue,meshpen=black+thick(),nolight,render(merge=true));
//draw(mypath,2bp+blue);

Disambiguation rules

Linguist heuristic rules that predict this language when one of its claimed extensions is shared with another.
RuleExtKindPredicates (truncated)
h/linguist/.asy/1.asydefault[]

Contribute — propose a file extension

Tell us where to find evidence about Asymptote (mapped to pl/asymptote). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Asymptote/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Asvi AT →