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

3
votes
0answers
82 views

Draw molecule structure with torsion angles in TikZ

I am trying to reproduce this figure in LaTeX: The packages that I have seen for annotating chemical structures do not seem to accomplish what I want (not to mention that my knowledge on chemical ...
3
votes
2answers
110 views

Import 3D object in LaTeX

Is there any way to import a 3D file of an object (.stl for example) to draw a 2D projection of it into a TeX document ? I have been surprised to don't find any subject about that, I was thinking a ...
6
votes
1answer
51 views

Adding arrows on 3D curves in Asymptote

I am trying to plot (1D) trajectories in 3D with Asymptote (because I am also plotting surfaces with opacity and do not want to use hacks for hidden surfaces). Each curve is defined by points in an ...
3
votes
0answers
34 views

A compatibility problem between the fontspec package and asymptote

Has anyone run across a compatibility issue between the fontspec package and asymptote? In the MWE below, commenting out the \usepackage{fontspec} allows for proper compilation and embedding of the ...
5
votes
1answer
34 views

Asymptote: Project object with planeproject and XYplane

I need to draw the figure like the following: The idea is to first draw blue rectangle and then project it to XY plane. My current code is pasted below. import graph3; import three; ...
3
votes
1answer
74 views

Dark colors in Asymptote

I came across strange color behavior in Asymptote. It seems that colors are darker as they should be when I draw 3D figure. Please consider the figures embedded below. Any idea or pointer? ...
0
votes
0answers
81 views

xasy not showing

When I do xasy circles.asy in the examples folder, nothing except a bounding box when you click shows up in xasy. So how to use xasy and let the figure shown correctly?
4
votes
2answers
200 views

Plotting 3D polyhedra, which package?

I have been using TikZ a lot but only for 2D plots. I was hoping I could use the 3D package for plotting regions on the (x,y,z) plane given by linear inequalities (currently I'm using Mathematica for ...
7
votes
2answers
158 views

Asymptote 3D: how to draw a surface with a pattern (e.g. checkerboard)?

In Asymptote, I'd like to draw two intersecting planes, one with a solid color and another with some pattern (e.g. checkerboard), so that it would look okay if printed black and white. However, the ...
5
votes
1answer
75 views

How to make PDF outputs of PSTricks rotatable on the PDF viewer as we can do on Asymptote's ones?

I just played with Asymptote outputs viewed on Adobe Reader and noticed the outputs can be zoomed, rotated, filtered which objects to be viewed, etc, etc. The following screenshot shows the features. ...
4
votes
0answers
107 views

Why my asymptote image is rendered like this?

After successful installation of Asymptote, when I execute a sample file why are there horizontal lines in the image (with pdflatex) but if I make it as a separate asy file and execute asy file.asy ...
0
votes
0answers
89 views

asymptote.sty not found

Running a sample code with \usepackage{asymptote}, I get asymptote.sty not found. I have installed ProTeXt which installed MikTeX 2.9. Now, to resolve this issue, I installed asypictureb package the ...
31
votes
6answers
2k views

How to make the length of a car moving on a roller coaster track remain unchanged?

For any arbitrary parametric smooth curve, how can I make the length of a car remain unchanged? \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-plot,pst-node} \pstVerb { ...
8
votes
2answers
407 views

Drawing Solids with LaTeX

I want to know if there is a package that automatically draw solids (spheres, cylinders, cubes, prisms). I know I can do this kind of drawing using TikZ or PSTricks. But what about a package where ...
10
votes
1answer
412 views

Draw a spiral on a sphere

My goal is to visualize damped magnetic precession. Wikipedia features an image, but it doesn't quite capture one essential constraint. Namely, that the magnetization M should be normalized. So the ...
3
votes
0answers
185 views

font size and type in asymptote

I am struggling to find font sizes and types for labels on my math figures in asymptote. I am creating two images which should be essentially the same, but for a sphere and cylinder. I haven't been ...
11
votes
4answers
398 views

Plot the cusp catastrophe surface

I'm trying to draw (plot) the Cusp catastrophe surface into latex using any software logic. I am completely stuck because I'm definitely not a mathematician. The surface has the potential: V(x) = ...
3
votes
1answer
73 views

Asymptote: Prevent Scientific Notation on Tick Labels

I have a graph whose x-axis goes from 2000 to 10,000. Unfortunately, the tick labels are "2000" on one end and "1 X 104" on the other. How can I avoid or prevent this? I tried giving an explicit list ...
4
votes
1answer
180 views

Drawing circular arcs on the surface of the sphere

I would like to draw circular arcs on the surface of a sphere to model as atoms intersect a probe atom in a molecule. I attach an example image that I would like to draw with either tikz or asymptote. ...
2
votes
2answers
212 views

Inserting graphics into asymptote or pgfplots

How another graphics can be inserted into Asymptote or pgfplots? The following is a MWE in pgfplots that creates three figures in the document. The main figure which I want to insert graphics in is a ...
11
votes
2answers
223 views

Asymptote: when white isn't white

I'm trying to display a white 3D ball with Asymptote (3D PDF), but it always turns up gray: import graph3; import solids; defaultrender.merge=true; size(10cm,0); ...
3
votes
0answers
60 views

Getting TeXnicCenter to see Asymptote

I am re-installing my LaTeX system onto a new computer, and am having trouble forcing Asymptote to output PDF files. As always, I've been following the instructions on the Art of Problem Solving ...
3
votes
1answer
90 views

Vertical alignment in a tabular environment with asymptote image

In a tabular environment, I would like to align text vertically at the top of one cell while placing an Asymptote image in an adjacent cell. There are numerous posts on vertical alignment with images ...
6
votes
1answer
162 views

Transform/Mapping of path in asymptote

I have recently started using asymptote for some plotting and drawings for my research. I have however stumbled upon something that I would like to do - but I don't know if it is possible. I have a ...
38
votes
12answers
3k views

Drawing a Reuleaux Triangle

A Reuleaux triangle is a shape of constant width sort of like a rounded equilateral triangle. (Reuleaux triangle - Wikipedia, the free encyclopedia) It can be formed by the intersection of three ...
4
votes
1answer
166 views

Positioning Labels in Asymptote

How can I control the position of the $x$ label below? Created with draw("$x$",O--X,blue,Arrow3) I know I can manually control label positions with label("$x$",<position>,blue), but is there a ...
4
votes
0answers
69 views

Configure latexmk to recognize an old file with a new name

When the asymptote package is used, it generates Asymptote source files with sequential names. For instance, if the tex file is called foo.tex, then running LaTeX on it will generate Asymptote source ...
6
votes
1answer
81 views

(How) Can I upload an Asymptote module to CTAN?

Let's say I have an experimental Asymptote module that I want to make available through CTAN. I can think of several options for this: Create a package that uses a filecontents* environment to ...
7
votes
3answers
223 views

How to automatically draw the images of a point placed between 2 inclined mirrors?

Consider a point X placed between two inclined mirrors as follows. \documentclass[pstricks,border=20pt,12pt]{standalone} \usepackage{pst-eucl} \def\Angle{37}% extreme case in which 360/\Angle-1 is ...
12
votes
2answers
456 views

The height function on a Torus

See the torus as a surface of revolution around the x (or y) axis. Define the height function on it. How to shade only a part of the torus based on the height function? There are illustrations of ...
1
vote
0answers
130 views

Asymptote and \asyinclude command doesn't work fine

I've the main.tex \documentclass{article} \usepackage[inline]{asymptote} \def\asydir{figure} \graphicspath{{figure/}} \begin{asydef} // Global Asymptote definitions can be put here. ...
4
votes
1answer
167 views

Hide Asymptote Play Button

How do I hide the annoying play button that appears whenever I do 3D graphics with asymptote? \documentclass{standalone} \usepackage{asymptote} \begin{document} \begin{asy} import three; ...
5
votes
1answer
310 views

Drawing torus points and arches with coordinates read from a file

I have a quite intricate question... I have to plot a torus of radii (r,R) with two set of points of different colour on it its surface. The points' coordinates are in two different files that must be ...
2
votes
1answer
109 views

I can't integrate asymptote with TeXShop

I'm trying to use Asymptote with TeXShop on Mac OS X 10.8.5. I'm attempting to follow the instructions given at http://asymptote.sourceforge.net/TeXShopAndAsymptote.pdf I got through step 2, but when ...
40
votes
9answers
3k views

The Spiral of Roots in TikZ

How can one create a spiral of roots as shown in the diagram below: where one can use a command to draw more parts to the spiral. For example, a command like \sqrtspiral{1}, \sqrtspiral{2}, ...
7
votes
2answers
449 views

Projection of included 2D graphics to a plane

General purpose I want to project a graphic file from external sources (example.pdf saved on my computer e.g. a chip design) on the bottom of a 3D graphic (which I can draw in LaTeX by using TikZ, ...
7
votes
1answer
104 views

Labeling within Loops in Asymptote

I'm fairly new to Asymptote, and am trying to create a basic number line using a for loop. I would like the for loop to also label the points for me. Could somebody tell me how to fix this? ...
30
votes
1answer
595 views

Randomly bouncing balls with constant tails in a spherical constraint

How easy is the following animation made with TikZ, PSTricks, and Asymptote? Use the following as a starting template to save your time. \documentclass[border=12pt]{standalone} \begin{document} . ...
6
votes
1answer
196 views

Is it possible to compile asymptote(.asy) file without displaying the figure

Today I want to draw several 3D schematic diagrams that could be inserted in my LaTeX files. And I chose asymptote because of its widely known 3D rendering advantage over other tools. I configured ...
3
votes
1answer
83 views

Point coordinates inside “add”

I'm a begginner in asymptote. I want to make a line(curve with arrow) from point B to point A that has more tension than normal (causing a smaller loop). I decided to create a function to calculate ...
7
votes
2answers
285 views

Cropping 3D Graphs in Asymptote

I would like to crop the 3D graph below at the plane z=1. I have tried using limits((-1,-1,0),(1,1,1),Crop);, but this just removed my frame. \documentclass{article} \usepackage{asymptote} ...
8
votes
6answers
975 views

Draw Vertices of Regular Polygon

I am trying to draw just the nodes (no sides) at the vertices of a regular hexagon. This answer should be easily modified to accomplish what I want, but I am such a novice that I have difficulty ...
2
votes
2answers
181 views

Drawing reflected (billiard) trajectories

I'm writing a paper on billiards, and would like to draw the following figures myself. Are there any good packages that can render them? I've heard that asymptote might be a good choice, but am not ...
12
votes
3answers
688 views

Graphing multiple functions on the same graph

I'm new to LaTeX and am attempting to type up some old differential equations notes. The only part I seem to be having trouble with is graphing multiple functions onto a single graph. For example the ...
5
votes
2answers
191 views

What is the easiest method to construct a bezier curve for the half part of a symmetric bezier curve?

Consider the following symmetric (about vertical axis) bezier curve constructed by 4 points A, B, C, and D. Now I want to construct another bezier curve (named L) for just either the left or right ...
6
votes
2answers
134 views

Close the corners of a grid (of tubes) on a surface in asymptote

Consider the following simple drawing of a saddle surface using asymptote import graph3; real f (pair p) { real x = p.x; real y = p.y; return 0.5*(x^2-y^2); } surface ...
4
votes
1answer
188 views

Asymptote: globally define latexmkrc

In section 7 of the Asymptote manual is suggested that for a better use of the LaTeX integration via latexmk one need to put the file latexmkrc into the folder of its own *.tex file. However I was ...
2
votes
0answers
72 views

Asymptote-LaTeX: Evince not displaying coordinate axes in plots [closed]

I was using asymptote in order to do some plot I needed and in stand alone it all seem to work. The code is: import graph; size(10cm); scale(Linear,Linear(-1)); typedef real realfcn(real); ...
38
votes
5answers
1k views

Showcase of translations to Asymptote from TikZ/PSTricks

So you already know TikZ and/or PSTricks, but you would like to expand your knowledge by learning Asymptote as well? Here's your chance. The task/question: Find an example of an impressive diagram ...
1
vote
1answer
236 views

Displaying long division manually with some caveats [closed]

Due to odd circumstances, I need to present long division manually (in math mode). That is, without using a macro. Moreover, I cannot use \multicolumn or \cline. Normally, I would do: \[ ...