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

5
votes
2answers
85 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 ...
1
vote
1answer
20 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
41 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
38 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 ...
3
votes
1answer
31 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
24 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} ...
3
votes
2answers
104 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 ...
6
votes
1answer
426 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
40 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
25 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 ...
0
votes
1answer
30 views

Why does this elementary Asymptote code returns an error?

I have spent several hours on understanding why my code eventually produced an error (for a large enough number of loops). I reduced the problem to the following MWE: file fout=stdout; // to write on ...
4
votes
0answers
88 views

Transparent background in Asymptote animation

In my TeX distribution there are two Asymptote examples named inlinemovie.tex and inlinemovie3.tex. (They are also available here.) Quick question The two animations in inlinemovie.tex have ...
1
vote
0answers
46 views

Change font in Asymptote

How can I to change the font in Asymptote (to Palatino) with TeXMaker? If I try usepackage{"mathpazo"}; I get this error message: test.asy: 4.11: cannot call 'guide operator spec(pair z, int p)' ...
21
votes
5answers
557 views

Recreate the sphere in TeX.SX logo

I'm trying to recreate this But looking in this Meta question the only code provided doesn't give that output %!TEX TS-program = xelatex \documentclass{minimal} \usepackage{pst-solides3d} ...
2
votes
0answers
30 views

Wrong subpath with end intersection points

Apologies upfront for cross-posting. I've posted the same question in asymptote discussion forums. I'm trying to find out the outline of two intersecting triangles. I'm expecting the outline of ...
19
votes
8answers
750 views

Compute and draw a convex hull

How can I use TikZ (+ LuaTeX), PSTricks, MetaPost, Asymptote, etc. to draw the convex hull of a set of points specified in no particular order? Here's an example where the convex hull was computed by ...
3
votes
2answers
95 views

How to center a label inside a closed path in Asymptote?

I am new to Asymptote and I need a little help. I would like to place a label exactly in the center of a closed path, for example in a triangle: unitsize(1cm); size(4cm); draw((0, 0) -- (0, 3) -- (3, ...
1
vote
0answers
61 views

Asymptote label is messing up image in latex document

I'm a newbie to asymptote, using it to create geometry figures. I'm creating an eps file from asymptote code, and include that in tex document instead of including the entire code in asy environment. ...
3
votes
1answer
59 views

Reading and Writing Asymptote Paths to File

I want to read/write asymptote cyclic path definitions from/to files. For example, while running asymptote code, I want to build up an arbitrary cyclic path and write that path information to an ...
4
votes
1answer
89 views

Asymptote: re-use picture

I have drawn a picture using the asymptote package (\usepackage{asymptote}), and the environment \begin{asy}...\end{asy}. I want to recycle the code in the {asy} environment without have to copy-paste ...
2
votes
1answer
78 views

Include LaTeX commands from external file in asymptote file

I have many asymptote drawings in a .asy file whose generated pdf is included in a main.tex. I have many user-defined commands, like \vec or \vxi which I use in my current main.tex and I want to use ...
2
votes
1answer
63 views

Include section of existing drawing in a new Asymptote file

Experts, I have created a drawing using Asymptote. Now I would like to include a specific section of this drawing in a new .asy-File to make it larger and add some additional lines. Is there a smart ...
6
votes
1answer
85 views

Draw multiple curves at a constant distance from one another in asymptote

In asymptote, I would like to draw arbitrary paths as in the following image, but with multiple colors. In the example, the path shown in black is also drawn with two parallel red lines. I would ...
3
votes
0answers
65 views

Old asymptote code in LaTeX document does not work after asymptote upgrad

I have a LaTeX-document with embedded Asymptote code that works fine. That is, in Asymptote 2.15. When I upgraded to 2.32 and rerun, the program gets stuck on working on one of the graphs. Stuck, no ...
5
votes
2answers
130 views

How to draw a line between two circles?

I want to create a graph using Asymptote and this graph consists of quite some circles with lines between them. Let me give a small example using two circles. pair a1=(4.5,2); pair a2=(0,0); real ...
3
votes
1answer
106 views

“If” statement inside of Asymptote function

I want to plot the function f(x,y)=cos(y)sin(x)/x even when x=0 (the function is continuous at such points). I can create a function in Asymptote that plots this surface with triple f(pair t) {return ...
2
votes
0answers
73 views

Asymptote in LaTeX - a peculiar problem

I wonder if someone can explain what follows to me and how to remedy it. The following piece of Asymptote code: import graph; import graph3; currentprojection=perspective(4,5,5); real f(pair z) ...
8
votes
2answers
132 views

How to draw cloud shape in Asymptote

I saw that TikZ can draw cloud shapes, even asymmetric ones: Asymmetric cloud shape in TikZ. But as I am not familiar with TikZ and prefer Asymptote's C++ like syntax, I would like to know how to ...
1
vote
0answers
52 views

tikzexternal, asymptote and duplicated asy files

I'm trying to work with tikzexternal and asymptote for my documents. Here is a sample TeX document : \documentclass[a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} ...
6
votes
2answers
144 views

Asymptote 3D label background

I'd like to create a 3D label in Asymptote that has a "background," effectively giving the label the look as though it were printed on poster board. I don't care if this background conforms to the ...
3
votes
0answers
64 views

Specify interactive rendering mode for asymptotes RPC/PDF export

I started using asymptote for some 3D graphics lately which works quite nice. For example I have a set of points on the sphere (where i put just e few of them into this example file) like import ...
3
votes
1answer
66 views

Problem getting 3D Asymptote to Work on Mac

I've been trying to get asymptote to work on my MacBook Pro running Yosemite. I downloaded asymptote onto the desktop and I tried to install it. I now have a "usr" folder on my desktop (is there a ...
4
votes
1answer
97 views

Asymptote: prevent label scaling in 3d perspective

Is there a simple way to prevent labels from scaling based on their distance to the camera in a perspective 3d view? (For example, see the first comment on this question or page 65 of this tutorial.) ...
1
vote
2answers
92 views

Asymptote working on Sharelatex but not on my local pdflatex

I have a document.tex file: \documentclass{article} \usepackage{asymptote} \begin{document} \begin{figure} \centering \asyinclude{test.asy} \caption{A test with \textsf{asymptote}} ...
6
votes
2answers
115 views

What does “emissive” in Asymptote do?

When drawing a 3D object in Asymptote, one can define the color with constructions like rgb(.4,.4,1) or rgb(1,0,1)+opacity(.5), which have fairly obvious meanings. One can also wrap these color ...
0
votes
0answers
117 views

How to run Asymptote inline for TeXstudio?

I try to run latexusage.tex as can be found on sourceforge.net using TeXstudio for Windows 7. I have downloaded Asymptote and put asymptote.sty in the folder I saved latexusage.tex in. However, when I ...
3
votes
1answer
74 views

texpath command returns empty array in Asymptote

when using the texpath command in Asymptote, I only get an empty path array. I'm using a miktex installation on a Windows 8 machine, ghostscript is installed. (I also have a TeX Live installation on a ...
5
votes
2answers
132 views

Asymptote fill area between two contours

I use Asymptote to make the graphics. I have two curves defined as contours C_1 and C_2. I want to fill the area between the two curves. The problem is that contour returns a guide structure in ...
0
votes
0answers
109 views

Building with asymptote: file-2.tex not found, null surface

I keep getting these weird errors when trying to compile with Asymptote. I compile with pdflatex, then asymptote, then pdflatex. The error is as stated in the title. For example, when building ...
10
votes
2answers
236 views

Stereographic projection of a circle to a plane in Asymptote

I would like to produce an Asymptote version of the scene portrayed here: https://www.youtube.com/watch?v=kE6aC51LMv0 The output should preferably be vector graphics. Nevertheless, this is how far I ...
10
votes
2answers
255 views

Light object / source in PGF / TikZ / PGFplots pictures like in PSTricks

I came across the PSTricks animation located at http://melusine.eu.org/syracuse/pstricks/pst-solides3d/animations/a43/ http://i.stack.imgur.com/NlqHZ.gif and noticed that it uses a light object / ...
5
votes
0answers
127 views

Using Ghostscript to compress pdf with 3D content

I have used Ghostscript to compress the pdf output of some large files as it seems to do a better job of getting rid of duplicate font information than Adobe Acrobat (which sometimes loses certain ...
11
votes
5answers
2k views

How one can draw 405 degree angle in learning material?

I would like to know how one can draw teaching material of trigonometry in LaTeX? Namely, I was looking how to draw 405 degree angle i.e. unit circle, a line segment to the circumference and a spiral ...
16
votes
6answers
748 views

Draw a smooth surface

I would like to draw a smooth surface like http://mathematica.stackexchange.com/questions/20912/how-to-draw-a-higher-genus-surface but using Asymptote, TikZ, Metapost, PStricks, or other TeX friendly ...
4
votes
1answer
143 views

Drawing Ellipsoids in Asymptote; Camera too Close

I am trying to draw a set of Ellipsoids in Asymptote which are given by an symmetric positive definite matrix or in other words by three vectors v1,v2,v3 of length 1 forming an ONB (the ellipsoids ...
4
votes
1answer
355 views

Best program for 3D plotting for LaTeX [closed]

I'm cross-posting this (also on Mathematics stack exchange, but not really getting the answers I'm looking for, so thinking I may have posted in the wrong community originally). I've hit a roadblock ...
5
votes
1answer
278 views

Best program/package for creating LOTS of function graphs to use in Beamer?

I am looking for program/package recommendations for drawing graphs. I know similar questions have been asked before, but I have some pretty specific needs because of the project I'll be working on. ...
5
votes
1answer
168 views

Clipping Asymptote 3D images

I am using Asymptote to generate 3D images which I embed in .pdf's. Is there a way to clip these 3D images, much like you can clip 2D images to a path? I'd be happy to clip to the interior of a ...
4
votes
0answers
94 views

Asymptote: set camera inside the box defined by the axis

The first figure is the (almost) the example elevation.asy from the demo gallery. I'd like to do an animation of a moving camera navigating in-between the peaks (a bit like a walkthrough in ...
5
votes
1answer
109 views

Asymptote: maintain window size while changing POV in animation

In every Asymptote animation example that I found (see e.g. here or here), the viewpoint is constant during the animation. I would like to make one which consists in a rotating viewpoint, the drawn ...