Reputation
9,288
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
3 28 78
Impact
~263k people reached

2d
comment Asymptote: How can I mix two colours
interp(RoyalBlue, white, 0.75), where interp stands for "interpolate", will give you 75% of the way from RoyalBlue to white.
2d
comment Asymptote: Arrow3 only has 3D arrow head
@MrZ: You can't directly apply a material to a path3. To specify a full-blown material (as opposed to just a color and lighting), you need to get the actual surface (the arrowhead and the tube). I recommend you try to find a satisfactory color/lighting combination before resorting to this.
Jul
17
comment Transparent background in Asymptote animation
Your experience seems to be mistaken: 3d outputs always have opaque background in any file format unless settings.render = 0;.
Jul
9
comment Change font in Asymptote
If you are putting this as a line in the asy file, I think the line you want is usepackage("mathpazo");. The line texpreamble("\usepackage{mathpazo}"); will also work.
Jul
8
revised 3D Cube within a cube?
deleted 1 character in body; edited tags
Jun
16
revised Compute and draw a convex hull
improved spacing in code block
Jun
15
comment Wrong subpath with end intersection points
The problem is the way subpath works: if you place the greater time first, then it implicitly reverses the order (although it also switches the path orientation). In your case, you can make it do the right thing by changing the last line to sp = sp^^subpath(abc,arr[5][0], length(abc) + arr[0][0]);.
Jun
14
answered Reading and Writing Asymptote Paths to File
Jun
13
awarded  Nice Question
Jun
12
comment Compute and draw a convex hull
Plotting the original points and the convex hull in one line was suggested only because it's the sort of thing that happens in TikZ syntax; it's not a requirement for a good answer.
Jun
12
comment Compute and draw a convex hull
@Mark: A convex hull of many points need not be crowded if the points are not explicitly plotted (which was done mostly for illustration). One possible application is to draw a "random" convex polygon by choosing a bunch of random points inside a circle (or oval, rectangle, ...) and then taking their convex hull. Another application is to approximate the convex hull of a smooth curve by taking a large number of closely spaced points on the curve.
Jun
12
comment How to center a label inside a closed path in Asymptote?
@James: Please consider answering tex.stackexchange.com/q/249860/484
Jun
12
asked Compute and draw a convex hull
Jun
11
answered How to center a label inside a closed path in Asymptote?
Jun
5
comment Reading and Writing Asymptote Paths to File
Maybe I'll turn it into an answer this weekend. (I'm concerned about whether the include statement is executed at runtime or compile time; if the latter, then any changes made to the file during the current asy run would be omitted.) Anyway, I suspect that this version of write was included mainly for debugging purposes (which is also how I came across it; I was debugging and wanted to check if the "lazy" code worked before writing something more elaborate).
Jun
4
comment Reading and Writing Asymptote Paths to File
You can get the path string extracted using write(file, p); where p is the name of the path and file is the file you want (e.g. stdout works for a quick test). Preface it with writing the string 'path p = ' and append a ';' to get an includeable file.
Jun
4
answered Asymptote: re-use picture
Jun
2
revised Asymptote: re-use picture
clarified based on OP's comment
May
30
comment Include LaTeX commands from external file in asymptote file
You have (at least) two options: 1) Use the asymptote package with the inline option. 2) Near the beginning of your Asymptote file, include the line texpreamble("\include{commands}");.
May
29
awarded  Necromancer