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.

1
vote
1answer
16 views

How to make letters size on picture the same as in text

The following two pictures are drawn in TikZ 3D (the first) and in Asymptote (the second). It is visible that the letter sizes for the Asymptote picture are bigger than the ones with TikZ 3D (for ...
3
votes
0answers
43 views

MacTeX 2019, asymptote stopped working using the `-render` option

Yesterday I installed TeXLive 2019 on my Mac using MacTeX 2019. I am working quite a lot with asymptote, so I was surprised, that asy seemed to have stopped working. No error message, but also no ...
4
votes
2answers
262 views

Is there any other simpler way to draw the following cross section?

Given that a regular pyramid T.ABCD in which P is on TC such that TP:PC = 1:3 R is on the extension of BC such that BR:BC = 1:3 Q is arbitrarily on the plane TAD but neither outside nor on the ...
0
votes
1answer
50 views

How to draw irregular hendecagon in asymptote

I am sorry if this is a duplicate question but how would I draw an irregular hendecagon using asymptote? I am new to it and I know how to draw a regular one but not an irregular one. [asy] size(9cm); ...
0
votes
0answers
38 views

hendecagonsssss [duplicate]

I need help with my homework. Does anyone know how to draw a hendecagon(eleven sided shape) on LaTeX or asymptote? Because I have tried many times to find an answer but I can't. So can somebody ...
0
votes
0answers
19 views

Floating point exception in asymptote

I am getting a floating point error where I think I shouldn't get one. May be I am missing something obvious. import graph; size(6cm); real f(real t) {return sqrt(8*cos(2*t));} draw((-4,0) -- (4,0));...
2
votes
1answer
182 views

making a book cover by Asymptote

A way I make a book cover with TikZ is getting 4 coordinates of the cover page (book), then freely drawing inside ABCD with TikZ commands. Can we do similar for Asymptote, that is, getting 4 ...
0
votes
1answer
50 views

How to choose the correct area to fill using build cycle in asymptote for strophoid?

I had asked this question earlier here How to choose the correct area to fill using buildcycle in asymptote? and got the correct answer from Thruston. I have run into a similar problem, this time ...
3
votes
1answer
103 views

What does the `align` argument do in this Asymptote code?

The following code produces the output picture pic1; size(pic1,10); fill(pic1,(0,0)--(5,10)--(10,0)--cycle,red+opacity(0.5)); // triangle picture pic2; size(pic2,10); fill(pic2,unitcircle,green+...
2
votes
0answers
55 views

Reading a file into Asymptote

The documentation of Asymptote says that it can read data contained in csv files. The example from the homepage of asymptote contains an explicit example to do this. The corresponding raw data file ...
0
votes
0answers
57 views

How to install Asymptote for Windows 10 (64 bit)?

I installed Asymptote (program, not package) on my computer (64 bit, Windows 10 Home). It works quite well. However I realize that my Asymptote version is for Windows 32 bit. https://sourceforge.net/...
2
votes
2answers
84 views

Finding the intersection of two circles

I am attempting to use pair[] intersectionpoints to find and label the intersection points of the circles defined by path h and path g. Thanks for the help. \documentclass{standalone} \usepackage{...
5
votes
1answer
309 views

Asymptote: 3d graph over a disc

Is there a straightforward way to draw a 3D graph over a disc domain? Say z=x^2-y^2 for x^2+y^2<1. [I just started to use asymptote; this page explained me how to do it for a rectangular domain. I ...
7
votes
2answers
266 views

Drawing all planes passing through two given points in a cube

Is there a smarter way to find a collection of possible planes passing through 2 given points P on ABFE and Q on DCGH such that we can see that the point R is the intersection of PQ and the common ...
3
votes
1answer
50 views

How to choose the correct area to fill using buildcycle in asymptote?

I want to fill the area cut off from an ellipse by a line segment. I want to fill the upper half. I don't know how to select the upper half. import contour; import graph; size(7cm); import ...
3
votes
1answer
85 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
101 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
34 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
63 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
218 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
72 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
65 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
76 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
199 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 ....
42
votes
8answers
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
190 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
67 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
83 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
88 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
94 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
413 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
148 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
73 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
331 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
140 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
60 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
113 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); ...
9
votes
0answers
104 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
137 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
141 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
97 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
130 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
49 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
50 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
53 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
69 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
109 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
49 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
107 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). ...