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

15
votes
4answers
306 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
50 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
44 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 ...
5
votes
2answers
247 views

How to draw 3d vector field on a line?

How to draw 3d vector field on a line? I want to visualize the vector field $( m_x(x), m_y(x), m_z(x) )$. After searching "visualize vector field", I find that most plotting software either plotting ...
3
votes
2answers
71 views

Errors with Asymptote

I am trying to draw a simple tetrahedron with the following code (in Asymptote) size(10cm,0); import math; import three; import graph3; currentprojection=perspective(1/3,-1,1/2); real l2=sqrt(0.75); ...
2
votes
1answer
57 views

How to draw the intersection of two surfaces using Asymptote?

I'm trying to draw the intersection of a plane with a hyperboloid with asymptote. The result should either be 2 crossing lines or a conic (ellipse, circle or parabola). Heres the code: ...
1
vote
1answer
44 views

Specifying ticks in Asymptote 3D graph

How do I create 3D axes in Asymptote with customized tick locations? For instance, I know that xaxis3("$x$",-1,1,black,OutTicks(2,2),Arrow3); produces an arrowed-axis with two intervals between -1 ...
3
votes
1answer
73 views

Cannot compile asymptote 3D graphic

I just installed Asymptote on my laptop and while I can compile 2D images, rendering never completes when compiling 3D images. Here is what I did on my Windows 8.1, 64 bit machine: installed ...
2
votes
1answer
92 views

How to fill a planar 3D path in asymptote?

Is there, in Asymptote an equivalent of the fill command that works for planar 3D paths? I thought surface did this: I expected the commands fill(project(p)) and draw(surface(p)) to always ...
4
votes
1answer
98 views

Camera zoom and picture size in Asymptote

I am trying to make a 3D animation in Asymptote involving moving infinite surfaces. I would like to set up a "steady camera", so that a unit ball would always look the same size relative to the ...
1
vote
1answer
85 views

latexmkrc, asymptote and subfolders on Mac OS

I just started to learn asymptote (actually because TikZ is not that great for 3D surfaces and curves on these). To set up my system i would like asymptote to work in a subdirectory in order to keep ...
0
votes
0answers
65 views

Error Asymptote when compilling file ?

I try install program Asymptote at My computer and i follow all instructions from this, when i am compile my file like this : \documentclass[12pt]{article} % Use this form to include EPS (latex) or ...
4
votes
1answer
117 views

Asymptote: Parametric surface isn't working with Spline interpolation

I have a parametric surface that is defined in terms of the Lambert W function and which I want to display with Asymptote. For that the Lambert W function was implemented using Newton's method and the ...
3
votes
1answer
94 views

Labels in 3D mode don't work in Asymptote

When I create 3D asymptote graphics, labels just don't work. When I copy the code from the question in Positioning Labels in Asymptote I get the exact same plot just without the "x". Everything works ...
1
vote
0answers
77 views

How to plot a diamond shape ball in LATEX [closed]

Let d:M \to \mathbb{R} be defined by d(X,Y)=|x_1-y_1|+|x_2-y_2| where X=(x_1,x_2), Y=(y_1,y_2) \in \mathbb{R}^2. This is called the Manhattan metric. Plot the unit open ball B with center at the point ...
5
votes
1answer
117 views

Asymptote: How to draw surfaces with more than four vertices without “seams?”

In Asymptote 3D, I need to draw surfaces with more than 4 vertices, but when I do, either it simply doesn't work (I can't reproduce this in a simple example, but can provide a more complicated case ...
2
votes
1answer
123 views

Asymptote SVG export as vectors, instead of rendered. How?

TL;DR : my question is in bold below. Preamble: I'm pretty new to Latex. Been fiddling around with both MikTex and TexLive for a few days. Have got a working setup on Windows (with ghostscript, Image ...
3
votes
0answers
153 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 ...
4
votes
2answers
239 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
135 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
63 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
77 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
110 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
192 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
253 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
282 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
85 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
156 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
199 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
500 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
475 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
373 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
509 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
93 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
240 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
316 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
290 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
92 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
121 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
183 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
277 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
88 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
85 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 ...
8
votes
3answers
238 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
541 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 ...
0
votes
0answers
162 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
202 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
370 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 ...