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

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
May
29
revised Help improving a diagram with Tikz?
edited title
May
29
comment Include section of existing drawing in a new Asymptote file
Additional note: include foo; has the effect of including all the code of foo.asy into the current file (including code you may not want, such as a no-longer applicable size or unitsize command).
May
28
comment How to draw revolved disk shape using TikZ?
You may well be right. Hopefully the OP will clarify.
May
28
answered How to draw revolved disk shape using TikZ?
May
28
comment How to draw revolved disk shape using TikZ?
Do you want to be able to see the inside?