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
10 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
25 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
64 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
42 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
540 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
28 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
701 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
80 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
48 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
48 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 ...
3
votes
1answer
71 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
66 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
59 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
74 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
61 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
107 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
101 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
64 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
117 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
49 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
127 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
63 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
53 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
87 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
77 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}} ...
5
votes
2answers
91 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
92 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
71 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
123 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
103 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
220 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
235 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
109 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
705 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
126 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
331 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
253 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
156 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
92 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
102 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 ...
12
votes
3answers
538 views

Asymptote: draw surface from data points in 3D

In the figure below, you can see 25 curves. Each of these curves was plotted from a list of points in a file mypoints_i.dat. Each of these files contains the exact same number of points. How would ...
10
votes
1answer
421 views

Visualize singular vector fields with TikZ or PsTricks and friends

I am trying to find a good way to make really visually appealing plots of singular vector fields. For example electric fields of point like charges. I already tried this in python without too much ...
1
vote
0answers
43 views

Interact Mode in Asymptote

My question is about the interact mode in Asymptote. On a OS X terminal, I type asy -v <name-of-file>.asy and go to the interact mode. A window containing the relevant picture shows up. ...
1
vote
1answer
109 views

What is the simplest procedure for compiling Asymptote code in WinEdt?

I'm trying to compile a LaTeX document containg Asymptote code in WinEdt and my MWE is this: \documentclass{standalone} \usepackage{asymptote} \begin{document} \begin{asy}[width=10cm,height=10cm] ...
2
votes
0answers
109 views

there is a error when use Asymptote draw figures

I draw a figure by Asymptote, code as: import tube; import graph3; size(7.5cm,0); currentprojection=perspective(7,10,3); currentlight=light(8,10,2); real a=5; path3 ...
8
votes
1answer
121 views

Drawing the Reeb foliation

I am trying to draw the Reeb foliation. So far I have the code and image below. The problem is that one surface is very slightly bulging out through the one in front of it (through the very front ...
16
votes
4answers
496 views

How to draw random simple closed smooth curves but with the same perimeter?

I want to draw some random simple smooth closed curves. Each smooth curve must have the same perimeter but different area. See the following figure to illustrate what I meant clearly. Each smooth ...
0
votes
0answers
110 views

Matching default views of 3D Asymptote graphics

One can compile a 3D image in Asymptote without .prc content as a .pdf that is viewable in any .pdf reader (using the -noprc command line option). This views the 3D image from a certain viewpoint, set ...
2
votes
1answer
80 views

Transform Multiple Asymptote Surfaces Simultaneously?

Is there a way with asymptote to combine two surfaces, so so that I can transform both simultaneously? E.g., below I would like to say surface r = cp+cm;, then do r=rotate(45,Y)*r; instead of ...