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

0
votes
0answers
7 views

How to place picture in three d

How do you add a 2 dimensional picture into a three dimensional drawing in asymptote? I have tried add(picture, triple), but it gives no output. import three; picture p; draw(p, (0,0)--(1,1)); ...
0
votes
0answers
18 views

Fill enclosed region on sphere

Given the longitude and latitude coordinates of multiple points on a sphere, I can connect them using circular arc segments by using the Arc command in Asymptote: path3 arc(triple c,real r,real ...
0
votes
0answers
24 views

Problem running Asymptote

I cant seem to to run asymptote after installing ghostscript, gsview, and MikTex please help me. All i get when i write the asy command in the cmd is this. I have a Windows 7 Ultimate installed on my ...
1
vote
0answers
54 views

Can't select text in PDF created using Asymptote [duplicate]

I am making 3D diagrams using Asymptote, export them as PDF and then use them in LaTeX documents. I cannot select the text/labels inserted in the pictures/diagram in the final PDF of the LaTeX ...
1
vote
0answers
44 views

Asymptote or pst-solides3d for 3d figure

I want to draw three dimensional figures and diagrams for my physics classes. Some examples of drawing can be various crystal structures in various orientations, various planes in them, three ...
10
votes
3answers
135 views

Draw border of a line

I have a line like this: line.tex: \documentclass[12pt]{article} \usepackage{asymptote} \begin{document} \begin{asy} unitsize(1cm); defaultpen(0.5cm); draw((0,0)--(1,1)); \end{asy} \end{document} ...
1
vote
0answers
22 views

After use of \def\asydir{filename} asymptote cannot find files

After I use \def\asydir{asyfiles}, asymptote cannot seem to find the .asy files any more. I have tried asy.exe asyfiles/[filename]-*.asy, but it doesn't work (both \ and /). Could someone please tell ...
1
vote
1answer
45 views

Asymptote Files

Whenever I use Asymptote with Latex, each instance of the environment gets its own new file. This creates a large amount of files. Is there any way to get all of these files placed into another folder ...
5
votes
0answers
66 views

Export matplotlib triangle mesh to an asymptote surface

This is a followup of a question of mine at stackoverflow partially reproduced here for clarity. I'm playing a bit with scikit-image marching cubes algorithm. Here is a simplified version of the ...
2
votes
0answers
91 views

Plane intersecting sphere

I have made this in matematica, but I need similar picture in metapost. Any ideas how to do so? sl3d1 = Graphics3D[{{Opacity[.5], Sphere[{0, 0, 0}, 1]}, {PointSize[.02], ...
1
vote
0answers
38 views

Asymptote out-of-memory error when plotting many points

I am using Asymptote 2.37 on Windows 7. I'm trying to make some large scatter plots but get a memory error. When trying to process the following MWE unitsize(10inch); for (int i = 0; i < 140000; ...
2
votes
0answers
56 views

How to use Asymptote system() command

Edit: I have since upgraded to release 2.37 with the same result. I'm running asymptote 2.15 on Windows 7. I'm trying to use the int system(string s) command for the first time to call a system ...
1
vote
1answer
58 views

Asymptote (XeLaTeX): Use custom-defined colors/Call drawing functions from external file

I'm quite new to Asymptote, although it's great to manipulate vector graphics within LaTeX. Specifically, I'm using XeLaTeX. What I'm trying to do is to change the color of a vector graphic to ...
5
votes
1answer
92 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: corrected after this question original package (before ...
3
votes
1answer
52 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
80 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
148 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
86 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
58 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
94 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
71 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
44 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
57 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 ...
4
votes
1answer
61 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 ...
4
votes
1answer
58 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
136 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
83 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
73 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
80 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 http://asymptote.sourceforge.net/doc/...
3
votes
1answer
60 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
103 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
101 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
110 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
55 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
162 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
44 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
76 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", 24)...
2
votes
1answer
59 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
469 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
74 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
277 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
238 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
218 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
302 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
74 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
78 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 ...
1
vote
0answers
59 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
2answers
118 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
114 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
133 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": ...