Questions tagged [asymptote]

Asymptote is a TeX-aware vector graphics language with built-in 3D capabilities. This tag, which is compatible with the [diagrams] tag, 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.

Asymptote is a TeX-aware vector graphics language with built-in 3D capabilities. This tag, which is compatible with the tag, may be used for questions about drawing diagrams even if not embedded into TeX code. It is also appropriate for questions about the asymptote package, which allows Asymptote code to be included directly in .tex files.

See the Asymptote website.

794 questions
13
votes
1 answer

Labels and angles in crystal structure using Asymptote

How can I denote the angle between the bonds and label a few atoms to denote the angle in the figure drawn in the link below ? Help creating solid cylinders along a path in Tikz for crystal lattice diagram
cosmicraga
  • 2,630
12
votes
2 answers

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} \begin{document} \begin{asy}[width=0.5\linewidth] import…
11
votes
0 answers

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,size); fill(pic2,unitcircle,green); picture…
11
votes
2 answers

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 commands in emissive(..), as in…
GregH
  • 3,499
11
votes
3 answers

Asymptote: convert triple to array

How might I convert a triple of three real numbers into an array, or otherwise treat it as such. I can go from an array to a triple as: \documentclass{article} \usepackage{graphicx} \usepackage{asymptote} \begin{document} \begin{asy} triple[] p; …
Scott H.
  • 11,047
10
votes
1 answer

Create squared sphere with Asymptote

I want to create a sphere with a grid on it using Asymptote. I have been able to create a sphere with horizontal lines, but I can't find how to make vertical lines. Here's my code so…
9
votes
2 answers

Possible conflict between pst-poker and asymptote packages?

I'm running into a problem when I try to use the LaTeX packages pst-poker and asymptote in the same document. In particular, the face cards produced by pst-poker have the face images displayed in the wrong position. For…
Jesse
  • 183
9
votes
1 answer

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)); dot((50,50)); \end{asy} \end{document}
Display Name
  • 46,933
9
votes
1 answer

Union of paths in asymptote

I am trying to get the union of four circles in asymptote: unitsize(1mm); import graph; pair o1 = (0, 0); pair o2 = (10, 0); pair o3 = (10, 10); pair o4 = (0, 10); path c1 = Circle(o1, 10); path c2 = Circle(o2, 10); path c3 = Circle(o3, 10); path c4…
qed
  • 708
8
votes
1 answer

Fractional linear transformations in Asymptote

I'm using Asymptote to create some figures illustrating constructions in the disc model of the hyperbolic plane, and I need to be able to transform paths by fractional linear transformations (FLTs), but haven't found any built-in functionality that…
8
votes
2 answers

How to add text as 2D in 3D onto a plane?

These are things I try: settings.outformat="pdf"; settings.prc=false; settings.render=0; import three; unitsize(1cm); size(8cm,0); currentprojection=orthographic(2,1,0.8); triple v1=(4,0,0), v2=(0,6,0), p0=(-2,-3,0); path3…
user197952
8
votes
1 answer

Why does the asymptote succession compilation result in a non-vector pdf?

I'm running the following code using MiKTeX 2.9 \documentclass{article} \usepackage[inline]{asymptote} \begin{document} \begin{asy} settings.outformat = "pdf"; settings.prc = false; import three; size(3cm,0); …
user175607
8
votes
1 answer

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 this simple code \begin{asy} import patterns; …
Upko
  • 81
8
votes
1 answer

Automatically draw hidden portions of paths with dashed lines in asymptote

In a great answer to another question of mine about asymptote, @Paolo Brasolin managed to draw the hidden portion of a path with dashed lines. But, as far as I understand, it is not automated and not available with all kinds of perspective. I…
cjorssen
  • 10,032
  • 4
  • 36
  • 126
8
votes
2 answers

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 like to do the same thing but with green on the…
James
  • 4,587
  • 1
  • 12
  • 27
1
2 3
14 15