Asymptote tutorial?

16 messages
Open this post in threaded view
|

Asymptote tutorial?

 Hello, Does anyone know of there any detailed tutorials for Asymptote available online? I've found the following web resource: http://www.artofproblemsolving.com/Wiki/index.php/Asymptote_%28Vector_Graphics_Language%29but, aside from that, all I have is the full Asymptote manual, which isn't particularly easy-going for a novice... The problem I'm trying to solve arises from the following diagram, which illustrates a neighborhood of a point on the unit 2-simplex. I'm trying to figure out how to transform the labels U and \sigma so that they are drawn in the plane of the simplex. (The way it's done now looks weird if you rotate the diagram to a different perspective in Adobe Reader.) \begin{asy} import three; import graph3; unitsize(1cm); size(4.5cm); currentprojection=orthographic(5, -2, 3); xaxis3( Label("$s_1$"), 0, 1.25, Arrow3); yaxis3( Label("$s_2$"), 0, 1.25, Arrow3); zaxis3( Label("$s_3$"), 0, 1.25, Arrow3); path3 simplex = (1,0,0)--(0,1,0)--(0,0,1)--cycle; draw( surface(simplex), gray+opacity(.5) ); draw( simplex ); draw( circle((.3,.4, .3), .2, (1,1,1)), linetype( new real[] {4,4}) ); dot( (.3,.4,.3) ); label("$\sigma$", (.3,.4,.3), S ); label( "$U$", (.27,.27,.46), N ); \end{asy} Cheers, Jason -- Dr J. McKenzie Alexander Department of Philosophy, Logic and Scientific Method London School of Economics and Political Science Houghton Street, London WC2A 2AE Please access the attached hyperlink for an important electronic communications disclaimer: http://lse.ac.uk/emailDisclaimer----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

Re: Asymptote tutorial?

 There was a talk by Michael Doob and Jim Hefferon at last summer's TeX Users Group that might be helpful.  See:   http://tug.org/TUGboat/tb33-2/ William SloughMathematics and Computer Science DepartmentEastern Illinois University600 Lincoln AvenueCharleston, IL  61920 On Sat, Apr 20, 2013 at 12:08 PM, J. McKenzie Alexander wrote: Hello, Does anyone know of there any detailed tutorials for Asymptote available online? I've found the following web resource: http://www.artofproblemsolving.com/Wiki/index.php/Asymptote_%28Vector_Graphics_Language%29 but, aside from that, all I have is the full Asymptote manual, which isn't particularly easy-going for a novice... The problem I'm trying to solve arises from the following diagram, which illustrates a neighborhood of a point on the unit 2-simplex. I'm trying to figure out how to transform the labels U and \sigma so that they are drawn in the plane of the simplex. (The way it's done now looks weird if you rotate the diagram to a different perspective in Adobe Reader.) \begin{asy} import three; import graph3; unitsize(1cm); size(4.5cm); currentprojection=orthographic(5, -2, 3); xaxis3( Label("$s_1$"), 0, 1.25, Arrow3); yaxis3( Label("$s_2$"), 0, 1.25, Arrow3); zaxis3( Label("$s_3$"), 0, 1.25, Arrow3); path3 simplex = (1,0,0)--(0,1,0)--(0,0,1)--cycle; draw( surface(simplex), gray+opacity(.5) ); draw( simplex ); draw( circle((.3,.4, .3), .2, (1,1,1)), linetype( new real[] {4,4}) ); dot( (.3,.4,.3) ); label("$\sigma$", (.3,.4,.3), S ); label( "$U$", (.27,.27,.46), N ); \end{asy} Cheers, Jason -- Dr J. McKenzie Alexander Department of Philosophy, Logic and Scientific Method London School of Economics and Political Science Houghton Street, London WC2A 2AE Please access the attached hyperlink for an important electronic communications disclaimer: http://lse.ac.uk/emailDisclaimer ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faq List Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/ List Archive: http://tug.org/pipermail/macostex-archives/ TeX on Mac OS X Website: http://mactex-wiki.tug.org/ List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

Re: Asymptote tutorial?

 In reply to this post by J. McKenzie Alexander Le 20 avr. 2013 à 19:08, J. McKenzie Alexander <[hidden email]> a écrit : > Hello, > > Does anyone know of there any detailed tutorials for Asymptote available online? I've found the following web resource: > > http://www.artofproblemsolving.com/Wiki/index.php/Asymptote_%28Vector_Graphics_Language%29> > but, aside from that, all I have is the full Asymptote manual, which isn't particularly easy-going for a novice… If you know some French, there is a very well-made tutorial for Asymptote in this language, written by Christophe Grospellier, with a bunch of illustrated examples: http://cgmaths.fr/cgFiles/Dem_Rapide.pdfHTH, Franck Pastor ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

Re: Asymptote tutorial?

 On Apr 20, 2013, at 3:08 PM, Franck Pastor wrote: > > Le 20 avr. 2013 à 19:08, J. McKenzie Alexander <[hidden email]> a   > écrit : > >> Hello, >> >> Does anyone know of there any detailed tutorials for Asymptote   >> available online? I've found the following web resource: >> >> http://www.artofproblemsolving.com/Wiki/index.php/Asymptote_%28Vector_Graphics_Language%29>> >> but, aside from that, all I have is the full Asymptote manual,   >> which isn't particularly easy-going for a novice… > > If you know some French, there is a very well-made tutorial for   > Asymptote in this language, written by Christophe Grospellier, with   > a bunch of illustrated examples: > > http://cgmaths.fr/cgFiles/Dem_Rapide.pdfIf you don't know French, I have long been thinking of getting to work   on Asymptote so you would give me an excuse actually to get started. Regards --alain schremmer (the i is for real.) ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

Re: Asymptote tutorial?

 In reply to this post by J. McKenzie Alexander Some wonderful examples: http://www.piprime.fr/files/res/geometry_en.pdfhttp://www.piprime.fr/asymptote/http://marris.org/asymptote/D. On Apr 20, 2013, at 10:08 AM, J. McKenzie Alexander wrote: > Hello, > > Does anyone know of there any detailed tutorials for Asymptote available online? I've found the following web resource: > > http://www.artofproblemsolving.com/Wiki/index.php/Asymptote_%28Vector_Graphics_Language%29> > but, aside from that, all I have is the full Asymptote manual, which isn't particularly easy-going for a novice... > > The problem I'm trying to solve arises from the following diagram, which illustrates a neighborhood of a point on the unit 2-simplex. I'm trying to figure out how to transform the labels U and \sigma so that they are drawn in the plane of the simplex. (The way it's done now looks weird if you rotate the diagram to a different perspective in Adobe Reader.) > > \begin{asy} > import three; > import graph3; > unitsize(1cm); > size(4.5cm); > currentprojection=orthographic(5, -2, 3); > xaxis3( Label("$s_1$"), 0, 1.25, Arrow3); > yaxis3( Label("$s_2$"), 0, 1.25, Arrow3); > zaxis3( Label("$s_3$"), 0, 1.25, Arrow3); > > path3 simplex = (1,0,0)--(0,1,0)--(0,0,1)--cycle; > draw( surface(simplex), gray+opacity(.5) ); > draw( simplex ); > draw( circle((.3,.4, .3), .2, (1,1,1)), linetype( new real[] {4,4}) ); > dot( (.3,.4,.3) ); > label("$\sigma$", (.3,.4,.3), S ); > label( "$U$", (.27,.27,.46), N ); > \end{asy} > > Cheers, > > Jason > > -- > Dr J. McKenzie Alexander > Department of Philosophy, Logic and Scientific Method > London School of Economics and Political Science > Houghton Street, London WC2A 2AE > > Please access the attached hyperlink for an important electronic communications disclaimer: http://lse.ac.uk/emailDisclaimer> ----------- Please Consult the Following Before Posting ----------- > TeX FAQ: http://www.tex.ac.uk/faq> List Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/> List Archive: http://tug.org/pipermail/macostex-archives/> TeX on Mac OS X Website: http://mactex-wiki.tug.org/> List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex> ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

Re: Asymptote tutorial?

 In reply to this post by Alain Schremmer-2 Am 21.04.2013 um 04:31 schrieb Alain Schremmer: > If you don't know French, I have long been thinking of getting to work on Asymptote so you would give me an excuse actually to get started. When you want to start using graphics elements inside LaTeX files, then I'd recommend to start with TikZ/PGF. Among the advantages is that you do not need/do not depend on any external utilities. Your workflow is very straightforward and simple. In case of bugs you have only one dependency: that from the author. No-one else needed to upgrade or patch and then rebuild the external utilities. The fonts used in TikZ/PGF are exactly the same as used in LaTeX. It cannot happen that by using am encoded LaTeX font of the same name the text in the asy picture is also re-encoded – and may read something different. Similarly when you decide to save some trees and reduce the font size from 12pt to 11pt or less. With TikZ/PGF you do not have to change anything, other graphics packages are less flexible. Moreover, using XeTeX or LuaTeX you can use non-English text for labels and annotations, even Right-To-Left scripts. TikZ/PGF also has clever concepts for repetitions…         texdoc tikz -- Greetings   Pete Build a man a fire and he'll be warm for a night, but set a man on fire and he'll be warm for the rest of his life. ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

Re: Asymptote tutorial?

 Agreed, tixz's fantastic; a little daunting at first, but worth the investment in time to learn. Cheers, On Apr 21, 2013, at 13:05 , Peter Dyballa wrote: > > Am 21.04.2013 um 04:31 schrieb Alain Schremmer: > >> If you don't know French, I have long been thinking of getting to work on Asymptote so you would give me an excuse actually to get started. > > When you want to start using graphics elements inside LaTeX files, then I'd recommend to start with TikZ/PGF. Among the advantages is that you do not need/do not depend on any external utilities. Your workflow is very straightforward and simple. In case of bugs you have only one dependency: that from the author. No-one else needed to upgrade or patch and then rebuild the external utilities. The fonts used in TikZ/PGF are exactly the same as used in LaTeX. It cannot happen that by using am encoded LaTeX font of the same name the text in the asy picture is also re-encoded – and may read something different. Similarly when you decide to save some trees and reduce the font size from 12pt to 11pt or less. With TikZ/PGF you do not have to change anything, other graphics packages are less flexible. Moreover, using XeTeX or LuaTeX you can use non-English text for labels and annotations, even Right-To-Left scripts. TikZ/PGF also has clever concepts for repetitions… > > texdoc tikz > > -- > Greetings > >  Pete > > Build a man a fire and he'll be warm for a night, but set a man on fire and he'll be warm for the rest of his life. > > ----------- Please Consult the Following Before Posting ----------- > TeX FAQ: http://www.tex.ac.uk/faq> List Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/> List Archive: http://tug.org/pipermail/macostex-archives/> TeX on Mac OS X Website: http://mactex-wiki.tug.org/> List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex> Martin Berggren ------------------------------------------------------------------- Department of Computing Science, UMIT Research Lab Umeå Universitet Campustorget 5, S-901 87 Umeå, Sweden. Ph: +46-70-732 8111 http://www.cs.umu.se/~martinb, [hidden email] ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

Re: Asymptote tutorial?

Open this post in threaded view
|

Re: Asymptote tutorial?

 In reply to this post by Martin Bergren On Apr 21, 2013, at 7:26 AM, Martin Berggren wrote: > Agreed, tixz's fantastic; a little daunting at first, but worth the   > investment in time to learn. While I have no doubt about this last, it takes a staunch heart to   switch! And, so far, ... Best regards --schremmer ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

Re: Asymptote tutorial?

 In reply to this post by J. McKenzie Alexander Here is another vote for TikZ/PGF.  To add to what Peter D. wrote: TikZ/PGF was originally written by Till Tantau who also wrote Beamer. Great manual, in English. If you read the Beamer manual then you'll know what to expect. Read the Tutorial Chapter I.2 to get the flavour. Disclaimer: I never used asymptote I am just a very impressed user of TikZ/PGF. Peter----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

Re: Asymptote tutorial?

 In reply to this post by Peter Dyballa Le 21 avr. 2013 à 13:05, Peter Dyballa <[hidden email]> a écrit : > > Am 21.04.2013 um 04:31 schrieb Alain Schremmer: > >> If you don't know French, I have long been thinking of getting to work on Asymptote so you would give me an excuse actually to get started. > > When you want to start using graphics elements inside LaTeX files, then I'd recommend to start with TikZ/PGF. Among the advantages is that you do not need/do not depend on any external utilities. Your workflow is very straightforward and simple. In case of bugs you have only one dependency: that from the author. No-one else needed to upgrade or patch and then rebuild the external utilities. The fonts used in TikZ/PGF are exactly the same as used in LaTeX. It cannot happen that by using am encoded LaTeX font of the same name the text in the asy picture is also re-encoded – and may read something different. As far as I know, If you use Asymptote in its inline mode — that is to say, if you use the "Asymptote" LaTeX package with the "inline" option, then Asymptote (the program) uses by default the font of your LaTeX document. > Similarly when you decide to save some trees and reduce the font size from 12pt to 11pt or less. With TikZ/PGF you do not have to change anything, other graphics packages are less flexible. See above… > Moreover, using XeTeX or LuaTeX you can use non-English text for labels and annotations, even Right-To-Left scripts. TikZ/PGF also has clever concepts for repetitions… Asymptote is fully compatible with Xe(La)TeX (which I don't use, so I've not tested this compatibility). As far as I know, it (still) can't be used with Lua(La)TeX. Anyway, it can't be doubted that Tikz is better integrated to LaTeX than Asymptote. Still, it is easier to program your own macros/functions in Asymptote since it's a full-fledged programming language, close to C++. And it is very powerful, far more than Tikz, especially for 3D drawings which Asymptote fully supports. See this very impressive documentation (also in French): http://marris.org/ressources/ASY_3D.pdfFranck Pastor ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

Re: Asymptote tutorial?

 In reply to this post by J. McKenzie Alexander Many thanks for all the detailed replies. Given the number of documents in French, it looks like I'll be searching for an online translator that can handle PDFs. (Google Translate doesn't like large files, it seems.) And I generally agree with the recommendations for PGF/TiKZ, at least for two-dimensional graphics and figures. However, for 3D graphics of any complexity, the best tools I've found so far seem to be Asymptote and Sketch. Best wishes, Jason On 21 Apr 2013, at 18:35:51, Franck Pastor <[hidden email]> wrote: > Anyway, it can't be doubted that Tikz is better integrated to LaTeX than Asymptote. Still, it is easier to program your own macros/functions in Asymptote since it's a full-fledged programming language, close to C++. And it is very powerful, far more than Tikz, especially for 3D drawings which Asymptote fully supports. See this very impressive documentation (also in French): > > http://marris.org/ressources/ASY_3D.pdf> > > Franck Pastor Please access the attached hyperlink for an important electronic communications disclaimer: http://lse.ac.uk/emailDisclaimer----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

Re: Asymptote tutorial?

 On Apr 22, 2013, at 4:23 AM, J. McKenzie Alexander wrote: > 3D graphics of any complexity, the best tools I've found so far seem to be Asymptote and Sketch First off, I'll note that I was very successful w/ Asymptote for a basic 2D engineering task recently, and found using TeXshop as a front-end quite straight-forward --- see the archives. Second, a request --- what is Sketch'' in this context? William -- William Adams senior graphic designer Fry Communications Sphinx of black quartz, judge my vow. ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

Re: Asymptote tutorial?

 On Apr 22, 2013, at 8:01 AM, William Adams wrote: > Second, a request --- what is Sketch'' in this context? Sketch is "a small, simple system for producing line drawings of two- or three-dimensional solid objects and scenes." http://www.frontiernet.net/~eugene.ressler/Josh----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex