Asymptote is a TeX-aware vector graphics language with built-in 3D capabilities. This tag, which is compatible with [tag:diagrams], may be used for questions about drawing diagrams. It is also appropriate for questions about the asymptote package, which allows Asymptote code to be included directly ...

learn more… | top users | synonyms

1
vote
1answer
46 views

Asyptote Unofficial package arrows_pi.asy not respecting order of points for vertical arrows

For example draw((0.5,0)--(.5,1), EdgeArrows(), p=red); and draw((0.5,1)--(.5,0), EdgeArrows(), p=red); give identical results. Website: ...
3
votes
1answer
37 views

Draw a 3D SrTiO3 structure

I want to draw a Strontium titanate structure by modifying the code given by @strpeter and @PatrickT at page Draw a 3D diamond structure . But unfortunately the rod between the Ti and the bottom O ...
8
votes
2answers
70 views

Asymptote slopefield

The optional arrows in slopefield.asy do not work correctly for dy/dx=-x/y. I can't think of a generic (elegant) way to make them work using its current methodology. Here is an mwe adapted from k.gov: ...
1
vote
0answers
136 views

configuring MiKTeX and asymptote

I recently installed and used MiKTeX successfully on a brand new Windows 10 laptop. However, I had trouble with Asymptote. The first time I ran Asymptote from the command line, I typed this: asy -f ...
4
votes
1answer
79 views

Patterns in SVG

I am trying to fill an irregular 2D shape with the hatch pattern in Asymptote and output it as svg. The result is a low resolution pixelated raster image. Is there a way to produce a vector pattern ...
2
votes
0answers
32 views

How to embed Asymptote 3D objects in Latex code when using Overleaf?

This is my MWE: \documentclass{minimal} \usepackage[inline]{asymptote} \begin{document} Test. \begin{asydef} usepackage("bm"); texpreamble("\def\V#1{\bm{#1}}"); \end{asydef} 2d figure: ...
2
votes
1answer
77 views

using Asymptote with Miktek, Texmaker, Windows7, ASYalign undefined

I'm am new to Latex and Texmaker, and loving it. I'm using the MikTek distribution on Windows 7. Now I want to integrate Asymptote figures into my documents. I installed Asymptote from here: ...
2
votes
0answers
67 views

Force acrobat to render asymptote's figure with antialias [closed]

Does anybody know how to force Acrobat to display interactive 3D objects created by Asymptote with nice antialiasing? (during PRC interaction). In Acrobat Linux 9.4, I see this (note the pixelated ...
0
votes
1answer
33 views

Sublime Text 3 with LaTeXTools failed to handle tex with asymptote

I'm using sublime with Latextools addon to edit my tex files, if the tex file includes \begin{asy}\end{asy} environment, the Asymptote codes will not work with a warning, Package asymptote Warning: ...
4
votes
1answer
48 views

Asymptote: have stuff outside the box

I'm using Asymptote to draw my graphics. I am making a graph of arctan. I want to label the graph, but I want the label to poke outside the bounding box. I want this because if I just let ...
3
votes
0answers
42 views

Search an element in array in Asymptote

In asymptote, I have two arrays int[ ] a = {1, 2, 3, 4 }; int[] b = {2, 3 }; I would like to get the intersection of these two arrays i.e 1, 4. I can write a function to do this, but is there a ...
3
votes
1answer
47 views

How to write a function in Asymptote

I have a code that draws a couple of rings on a plane and I would like to be able to define a function, taking the radius, center and color as an argument to be able to draw a substantial number of ...
6
votes
1answer
85 views

Asymptote Shading Gradient in HSV Color Space

Using asymptote I'm trying to fill shapes with gradient shading in the HSV color space. Unfortunately, I think that HSV is not an available color space in asymptote. However, asymptote does have the ...
3
votes
1answer
70 views

Fill sector of ellipse with asymptote

I've already got an ellipse in Asymptote in nice need polar coordinates, but I am trying to illustrate Kepler's Second Law, and it would be nice to fill sectors from one of the foci. I've already got ...
2
votes
0answers
54 views

how to have transparent background in 3d plot of asymptote?

how to have transparent background in 3d plot of asymptote? Any idea? Suppose we save the output in png format, we can have transparent background in 2d plot of asymptote using the following, ...
2
votes
2answers
70 views

tree (sequence) diagram in Asymptote

I want to draw tree diagram with Asymptote. But have some problems. I searched and found 2 hints on the web. http://asymptote.sourceforge.net/FAQ/section4.html ...
3
votes
1answer
54 views

Asymptote: spring along an arc

I wish to know how to draw a spring along an arc using Asymptote Using import spring and drawspring(length,label) can only draw a spring along a straight line. In TikZ this drawing an spring along an ...
1
vote
0answers
74 views

How to improve the 3d effect of sphere in asymptote?

I try to use asymptote to plot the lattice. But the 3d effect of sphere is not so good. I need to use opacity(0.3) function, since I need to plot inside the sphere other elements. Currently, it looks ...
6
votes
1answer
91 views

Baffling interaction of Asymptote and Transparency

Context: I'm trying to use Asymptote to draw explanatory arrows and comments atop a semitransparent lstlisting environment. In the course of doing so I've encountered a bizarre interaction between ...
1
vote
2answers
101 views

Tikz curve without control points

Is there a way in Tikz to draw a smooth curve that passes through some specified points without the need of specifying control points, like you can do in Asymptote? For example, in Asymptote I can do ...
4
votes
1answer
47 views

Control distance of label from point in asymptote

I'm making a diagram for a solution on the AoPS wiki and some of the labels are a little too close for comfort. Is there a way I can move a label farther from what I'm labeling? I have the following ...
8
votes
1answer
134 views

Automatically draw hidden portions of paths with dashed lines in asymptote

In a great answer to another question of mine about asymptote, @Paolo Brasolin managed to draw the hidden portion of a path with dashed lines. But, as far as I understand, it is not automated and ...
2
votes
1answer
39 views

Aligned pictures in Asymptote depending on Label?

I have a confusing problem with Asymptote. I want to draw a contour plot and a surface plot side-by-side and try this code: settings.outformat="pdf"; settings.render=8; settings.prc=false; import ...
2
votes
1answer
74 views

font() pen only works once, then falls back to default font

I'm trying to draw a bunch of labels with a custom font, installed in ~/Library/Fonts. To do this, I create a pen using font() and then use that pen with label(): pen font_pen = font("DejaVuSans", ...
2
votes
1answer
41 views

Set absolute page size without scaling in asymptote

This is not the first time trying to solve this problem, which is why I'm writing a self-answered question, after spending another hour to re-discover a solution. How do I force Asymptote to output a ...
19
votes
2answers
432 views

Illustrating Stokes theorem with asymptote

I want to use asymptote to illustrate Stokes theorem as in the following figure. Here is what I've done so far. import three; size(6cm,0); path path2D = (1, 0) .. (2, 1) .. (0, 2) .. (-2.25, 1) ...
3
votes
0answers
60 views

Asymptote: Label a point on surface

I have the code for planes intersecting a hyperboloid from a previous thread (see below) and I now want to label the upper point where the hyperboloid intersects the vertical axis as A. If I try to ...
7
votes
2answers
247 views

How to draw a ruby laser

I would like to draw a ruby laser like in images bellow or What I did so far is taken from How can I draw nucleosomes with wrapped DNA in tikz or pstricks?. The problem is that the glass tube around ...
3
votes
1answer
210 views

How to draw a real corkscrew

I would like to draw a real screw like in image below. Any codes in tikz, asymptote or pstricks are welcomed! In order do not confuse with my linked question about laser who as well is based on ...
3
votes
1answer
186 views

Algebraic curves in TikZ or Asymptote

I want to draw algebraic curves in asymptote, but I do not know how this works. Has anyone an example? If we want to plot for example k[x,y]/\langle x^2+y^2-1\rangle, where can I input the equation ...
7
votes
1answer
199 views

Render stl files in asymptote

I want to draw a propeller in 3D for my fluid dynamics lecture. I found a 3D model of a propeller that can be downloaded as a stl file. I found a python library numpy-stl that can read and draw, with ...
2
votes
1answer
61 views

Asymptote and Exsheets [duplicate]

How can I use asymptote language inside an exsheets question? For example, the code below will compile perfectly fine. But if the asypicture environment is moved inside the exsheets question ...
0
votes
1answer
69 views

How to set up latex-suite to compile asymptote in tex files?

I am using vim with latex-suite to compile to pdf. With the following in filename.tex: \usepackage{asymptote} ... \begin{asy} ... \end{asy} ... The file filename-1.asy is produced (and the log ...
0
votes
0answers
188 views

Draw a simplicial complex [on hold]

In a paper I'm writing using TeX I would like to include some pictures of Euclidean simplicial complexes. How can I draw an Euclidean simplicial complex embedded in R^3? That is, given a set of ...
1
vote
0answers
57 views

Asymptote in plain TeX [closed]

Is there a way to directly embed Asymptote code in plain TeX as it can be done in LaTeX? (For example by using miniltx or something like that?) Can labels in figures be typeset using plain TeX instead ...
0
votes
1answer
85 views

Integrating Asymptote into TeXShop

I'm trying to integrate Asymptote into my TeXShop, which I have been unsuccessful in so far. I've tried the instructions given in the document Integrating Asymptote and TeXShop for Mac OS X, but once ...
3
votes
1answer
94 views

Draw ontop of a graphic inserted using label(graphic(…), …)

I'd like to use Asymptote to compose an existing EPS file and draw some stuff onto it. I'm doing this using the suggested method of using label() and graphic() to place the EPS file on the canvas. The ...
2
votes
0answers
116 views

Asymptote: Intersect Line with Plane, z-order not correct

Hello TeX Stackoverflow! I have a question about 3D plotting in Asymptote. I want to produce a very simple 3D sketch of a line intersecting two planes, but I have trouble making it look "realistic": ...
2
votes
1answer
113 views

Installing the olympiad package on Mac

I've been trying to install the [Olympiad package][1] for asymptote on my Mac to use in TexShop, but I have no idea where to install it. I've tried to move the olympiad.asy file into the ...
3
votes
1answer
92 views

Adjust axes to plotted surface in Asymptote

I am plotting several parametric surfaces with Asymptote. When I change the parameters (tyMax in the MWE below), the value of the function can change significantly so I have to adjust the axes ...
5
votes
2answers
148 views

Solving an ODE in Asymptote

I am trying to graph a space curve from its curvature and torsion using Asymptote but cannot get the ODE solver to work in this case: import ode; real kappa(real t){return 1;} real tau(real ...
2
votes
1answer
148 views

Asymptote error in plain_Label.asy

I'm trying to compile the Asymptote script fig0090.asy from http://www.piprime.fr/files/asymptote/graph3/index.html by running asy fig0090.asy in the command line but I get the error ...
1
vote
0answers
117 views

Asymptote Animations

I am trying to define a type animation with Asymptote as follows. animation interf(real lambda,int n=20, int M=2, pair xyMin, pair xyMax){ animation A; // picture pic; pen[] ...
3
votes
1answer
82 views

How do I run Asymptote in batch mode, without creating windows?

I am using asymptote to generate lots of images in a LaTeX document. The images are translated from asymptote to PDF as this: pdflatex text.tex asy text-*.asy pdflatex text.tex However, asymptote ...
4
votes
1answer
93 views

asymptote multiple graphics in single file

One of the features I've liked in metapost and missed in asymptote is the fact that (in metapost) I can write the code for many figures in a single file. metapost then generates indexed set of figures ...
3
votes
1answer
68 views

Latexmk and the location of Asymptote's generated files

I am trying out Asymptote with latexmk and I would like to automate the interaction. Consider the following latex document test.tex: \documentclass{minimal} \usepackage{asymptote} ...
5
votes
2answers
178 views

Asymptote: How can I mix two colours

In latex, I can mix two colours like RoyalBlue!25!white. In asymptote I want to use the same color. How do I do this? MWE where I would like to replace the RoyalBlue color of the material by the ...
7
votes
1answer
455 views

Asymptote: Why are objects closer to the camera smaller

In the following example you can see that the atom that is closest to the camera, is acutally smaller than the rest, even though it should be the other way around. Shouldn't it? Here the MWE: ...
1
vote
1answer
150 views

Asymptote: Arrow3 only has 3D arrow head

If I draw a Arrow3, it does not really look 3D-ish because the line is not shaded like a cylinder. How do I change this? Probably drawing the cylinder and arrow head manually together? How? Here is a ...
1
vote
1answer
48 views

Including an existing asymptote picture in a LaTeX document

I have a project laid out like this: a parent folder, a subfolder named Main where the parts for my projects as well as the macros used throughout are, and another Figures subfolder containing my ...