Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [asymptote]

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 in .tex files.

3
votes
1answer
66 views

Cannot get basic labels working

I've tried really hard to look for all kinds of solutions but so far nothing seems to have helped. \begin{figure} \centering \begin{asy} include graph; size(3inch); pair A,B,C,D,E,F,G,H,...
2
votes
1answer
77 views

How to get points on a 3D curve (to make 3D animation) in Asymptote?

I want to make 3D animation in Asymptote: the blue small sphere moving along the 3D cyclic curve (that I named "orbit8"). I have heard that curves in Asymptote are parameterized. However, I don't know ...
2
votes
1answer
30 views

Asymptote package generating unwanted margins

I have the following code: \documentclass{standalone} \usepackage{asymptote} \begin{document} \begin{asy} size(100); import graph; path bill = Circle((0,0),100); real phi = 70*pi/180; draw(bill); ...
1
vote
0answers
43 views

Asymptote cannot draw label: camera too close

I get a strange error (Camera too close) when I try to draw a label in 3D with Asymptote. This is my MWE settings.toolbar=true; import graph3; size(200,0); currentprojection=perspective( ...
0
votes
0answers
68 views

Just started using Visual Studio Code, how do I use Minted and (optional) Asymptote?

I had been using TeXnicCenter for Windows with MikTeX for a while now and I decided to use a different IDE to check out better IDEs for LaTeX. I decided to download Visual Studio Code along with the ...
3
votes
2answers
60 views

Asymptote: How do I make a gap in a segment to include a label?

I am wondering how to make a gap in a segment to include a label? In my example code, I'd ideally like the label '16' to be in a gap the middle of the end-barred segment. Also, is there a more ...
2
votes
0answers
52 views

Running Asymptote in one go

I've followed the tutorial on Art of Problem Solving to implementing and using Asymptote in LaTeX. However I don't want to go through the 3 steps that they outlined (build output > run asymptote > ...
2
votes
1answer
64 views

Asymptote: How to use nested arrays?

How would I create a nested array in Asymptote such as [[1,2,3],[4,5,6]] and call upon element 1 of array 1 and such?
7
votes
2answers
173 views

Error in asymptote using upacity to draw a lemniscate

I am trying to draw a lemniscate using the code from this answer: How to draw lemniscate with TikZ However, if when I run asymptote I get the following error messages: Error: /undefined in ....
41
votes
7answers
8k views

Welcoming 2019 Lunar New Year: How to draw a (lovely) pig?

Chinese Zodiac and Lunar Year can be called very close friends. In Eastern cultures, each lunar year is assigned to one of the twelve animals in Chinese zodiac. The animal (or rather a mascot) of this ...
2
votes
2answers
153 views

Drawing hexagonal prisms

Simmilar to: Drawing spheres I want to draw multiple 3D hexagonal cylinders like this one: with different sizes and positions.
11
votes
3answers
1k views

How to construct a circle that is tangent to three given semi- circles?

\documentclass[border=15pt,pstricks,12pt]{standalone} \usepackage{pst-eucl} \begin{document} \begin{pspicture}[showgrid](-5,-5)(10,10) \psset{unit=2cm,PointSymbol=none,PointName=none} \pstTriangle(0,4)...
3
votes
1answer
51 views

Why am I getting blank pdf pages when I try to reproduce examples on asymptote's site?

I'm still new to asymptote but so far I've read the documentation and I believe to have followed the directions accordingly. I've checked that all the packages are installed and the necessary gsviewer ...
2
votes
1answer
73 views

What is the difference between settings.render=10 and settings.render=15 in the following examples?

Both examples in ASY_3D.pdf \documentclass[border=5pt,varwidth]{standalone} \usepackage{asymptote} \begin{document} \begin{asy} settings.outformat="png"; // settings.render=10; //<<<---- ...
5
votes
0answers
83 views

How to understand main packages of Asymptote without its document except for geometry.asy

I am a new user with Asymptote. I used TikZ before and because of personal reasons I start with Asymptote. However, when using Asymptote, I realized that there is no documentation for every package ...
1
vote
0answers
78 views

How to disable the interactive 3D view and prevent Asymptote from generating raster output?

I don't need the interactive 3D view because it will be viewed on papers. I just want to draw vector graphics 3D objects. For the following code, it seems that Asymptote rasterizes the output. Is ...
8
votes
1answer
409 views

How to troubleshoot unwanted white spaces smartly?

Why is there a white space on the left side? \documentclass{standalone} \usepackage{asymptote} \begin{document} \noindent \begin{asy} size(10cm,10cm); draw((0,0)--(100,100)); draw((0,100)--(100,0)); ...
2
votes
2answers
139 views

How to fill color between curves in Asymptote

\documentclass[border=5pt]{standalone} \usepackage{asymptote} \begin{document} \begin{asy} size(5cm); draw((0,0){up}--{right}(3,3){down}--{left}(1,1){right}--{up}(2,2){left}--{down}(0,0)); draw((0,0)...
7
votes
1answer
69 views

Include curve into a filldraw cycle

I have a question regarding asymptote drawing in LaTeX. I'm an absolute novice in using asymptote, and I could not find any help in the manuals I found online. Here is the problem. Starting from ...
5
votes
2answers
316 views

improve code - formulas in perspectives and rotated

I want to reproduce the next image or improve it, that has depth and an effect of small points like stars. \documentclass{standalone} \usepackage{amsmath,amsfonts,amssymb} \usepackage{tikz} \begin{...
3
votes
2answers
134 views

Adding sticker on top of bbox frame

I'm using following asymptote code. size(6cm,4cm,false); import graph; real f(real x) {return sqrt(x);} real xmin=0, xmax=50, xStep = 5, xstep = 0; real ymin=0, ymax=7, yStep = 1, ystep = 0; draw(...
1
vote
1answer
53 views

I can not draw arc in a clockwise direction

with this program in asymptote I have to trace the meridians. settings.outformat = "png"; settings.render = 16; size(6cm,0); import solids; currentlight=Headlamp; // inutile car Headlamp est la ...
3
votes
2answers
99 views

Error with 3D Asymptote graphs

Help me with 3D arc in asymptote. Thank you very much! Code: \begin{asy} settings.outformat="pdf"; import three; size(7.5cm,0); currentprojection=perspective(20,18,8); currentlight=light(8,10,2); ...
8
votes
0answers
88 views

What does the .fit() method of a picture do?

What does the .fit() method of a picture do in the following Asymptote code? picture pic1; real size=50; size(pic1,size); fill(pic1,(0,0)--(50,100)--(100,0)--cycle,red); picture pic2; size(pic2,...
3
votes
2answers
128 views

Drawing the volume of revolution of a region bounded by two curves

I've been preparing my submission of my calculus assignment, and have been typesetting it in LaTeX, using Overleaf v2. There are problems involving the volume (and surface areas) of the solid of ...
2
votes
1answer
109 views

Filled contour plot from data set

I want to create a filled contour plot in pgfplot from a dataset mydata.dat I get a ugly picture like this: The code that I use is \documentclass{standalone} \usepackage{pgfplots} \...
4
votes
1answer
82 views

output directory Asymptote in TeXLive

How does the asymptote and asypictureB packages determine the output file and working directories? I tried to use asypictureB and TeXLive to produce my files and put all the output files to a ...
1
vote
1answer
109 views

Running asymptote code in latex

Using some tutorial on the Art of Problem solving forum on Asymptote, I was able to use Asymptote code inline with my Latex like so \begin{figure}[h] \centering \begin{asy} include graph; ...
1
vote
0answers
41 views

Problem with Asymptote

I recently install the latest version of asymptote (2.47), and now Nothing work with asymptote. On windowds 10 system, I have this messages when I want compile a file.asy open with NotePadd++: asy -...
1
vote
0answers
45 views

Asymptote dictionaries.

I have been looking through the manual of Asymptote and it seems it does not have Hash-Tables or dictionaries. Are they present in the language? It does seem like a glaring omission for what ...
0
votes
0answers
42 views

Make Asymptote read YAML or JSON files

I often write my data-files from simulations written in Python or C++ in json on yaml files. I recently heard about the asymptote software which can be used for really 2d and 3d plotting. Is it ...
1
vote
0answers
60 views

ASymptote export animation as mp4

I want to make a series of images titled anim0.png, anim1.png corresponding to different frames of an animation. As I understand, the examples page typically outputs a pdfmovie which can only be ...
1
vote
1answer
82 views

Asymptote could not load module (filename-1.asy)

after seeing this answer, I tried to make my own ball and stick model of a diagram. So I made the following code: \documentclass{standalone} \usepackage[inline]{asymptote} \begin{document} \begin{...
1
vote
0answers
46 views

How to define materials in Asymptote?

I searched in the Asymptote documentation and found that material is handled as a structure in three_light.asy that has the following definition: struct material { pen[] p; // diffusepen,ambientpen,...
1
vote
0answers
87 views

vector graphics programming languages [closed]

What is the best vector graphics programming language (similar to Asymptote)? I'd like to be able to control 3D rendering parameters such as lighting, perspectives, material (optics, textures). ...
0
votes
1answer
187 views

Is this the right way to use Asymptote in LaTeX?

This is the code i have written: \documentclass[12pt,openany]{book} \usepackage{asymptote} \begin{document} \begin{asydef} import three; import solids; \end{asydef} \begin{asy} draw((0,0)--(...
2
votes
1answer
72 views

How to normalize the coordinate without changing the object size?

The following MWE produces \documentclass[pstricks,border=12pt,12pt]{standalone} \usepackage{pst-circ} \psset { unit=1cm, dipolestyle=zigzag, } \begin{document} \begin{pspicture}[showgrid=...
3
votes
0answers
136 views

TikZ Arrowheads for Asymptote

For some figures, I need Asymptote over TikZ. However, I like the arrowheads in TikZ more than I do the arrowheads in Asymptote, particularly the stealth' arrowhead in TikZ. Is there a way to create ...
4
votes
1answer
77 views

The light rendering in Asymptote

I am trying to draw a hemisphere decomposed with multiple patches. Here is the figure The issue is that on the periphery, it gets very dark. I would like the surface to be less smooth, so it can be ...
1
vote
1answer
61 views

What is the difference between the many options given by “Texmaker” to run a script?

I always run with "Quick build" and it works good. I wonder what is the usefulness of the other options like "LaTex", "Dvi->PS", "PDFLaTex","XeLaTex" etc. Thank you
3
votes
0answers
97 views

How could I draw mesh line for nurbs surface in asymptote?

For a bezier patch, I can define the patch as a surface and plot mesh line, as in the example code: import three; size(10cm); currentlight=Viewport; surface s=surface(patch(new triple[][] { {(0,...
0
votes
0answers
138 views

Asymptote errors

I use Asymptote to create 3D plots with the asymptote package loaded in my preamble \documentclass[a4paper]{article} \usepackage[no-math,cm-default]{fontspec} \usepackage{amsmath} \...
10
votes
5answers
3k views

How to draw $y^4 - y^2 = x$?

I am having some trouble to draw the equation $y^4 - y^2 = x$. Can someone help me? Thanks a lot!
0
votes
0answers
71 views

There are surprisingly few information about the asymptote package… what do i do after i download it? Is it a package for LaTeX?

Ive opened it i i get this...... do i type stuff inside? Or.......what should i do with it? Im very new to asyptote actually Or cn anybody reccomend me any sites or videos to get me started? I ...
2
votes
1answer
189 views

Drawing a 3D commutative diagram

I was drawing a commutative-diagram when I had the (questionable?) idea of drawing a tetrahedral version of it. I used Asymptote in the hope of getting good-looking thumbnail and a nice embedded 3D ...
2
votes
1answer
106 views

Bug with Asymptote: horizontal black lines

I encounter this bug with Asymptote (latest version on Windows): These horizontal lines are not from my code, they underisably appear. I have found only this link reporting the same problem, but no ...
2
votes
3answers
712 views

Drawing a convolution with Tikz

I need to draw something like this, can anyone tell me how to do this with Tikz or recommend a program to draw diagrams like this one?
0
votes
0answers
55 views

How to draw intersection of a line and surfaces with `bsp` package of Asymptote

It seems that if I want to draw intersection of planes and output vector graphics (rather than raster graphics with option settings.render non-zero), I have to use bsp package. In the Asymptote ...
2
votes
0answers
69 views

Asymptote and ePiX: What is the advantage of one over the other?

Links: Asymptote, popular vector graphics language. ePiX, is also similar software created by one of the top Stack Exchange members. Both are based on C, which is nice for me because I hate the TikZ ...
0
votes
0answers
36 views

Asymptote labels cause problems in ShareLaTeX

I've recently tried to move some of my LaTeX projects into ShareLaTeX. All of my Asymptote code is written directly into the .tex files in an asy environment. When I compile, any code that included ...