Hi Yvan Yes I kept "!" so that the labels are horizontally misplaced (I focused only on the vertical shift). Without "!" I obtained the following picture.
Hy Ivan In my case (Linux, Texlive 2020, asy svn a few days ago) with xelatex or lualatex engine, I have the following result, which is ok (I think).
Hello Since it is a major new feature (again great works), I produced a web page in French about this new possibility, including two "heavy" examples: splinecontour and some fancy brush (http://olivier.guibe.free.fr/html5/fancy_brush_3Dbis.html) 3Mo. I added also some MathJax code. http://olivier.guibe.free.fr/blog/2019/09/asymptote_webgl/ (the figures are too small, I have to modify) Even if I am not a specialist I think that developping asy WebGL output directly in Jupyter notebook is possible...
Hy I tested another example (https://tex.stackexchange.com/questions/386055/asymptote-drawing-contours-of-spline-surface/386101#386101), which is more complicated and produces a very large html file : 2.9M. The result is fine http://olivier.guibe.free.fr/html5/testwebgl/newtestcomp.html but with Firefox 69 (Linux 64bits) moving the picture is not fast while with Chromium it is... I am very impressed !
Hy Ivan It seems that you are also curious (webgl branch is now regularly merged into master branch). For 3D pictures it is a webgl export. I tried to play with it: asy -f html your3D_picture.asy produces an html file. Outside your git asymptote tree (to avoid problem), copy the webgl directory, put the your3D_picture.html file into this directory, add WebGLheader.html and WebGLfooter.html to the your3D_picture.html file, verify some paths and it works. For example : http://olivier.guibe.free.fr/html5/testwebgl/newteapot.html...
Dear Klaus Thanks. Sorry for late. I tested also some scaling arguments. In particular it is possible to mimic add(pic.fit)) by appropriate add(scale(??)*pic by playing with size(pic) and size(pic,user=true). Please find the example size(6cm); draw(scale(5)*shift((-.5,-.5))*unitsquare); picture pic1; size(pic1,2cm); label(pic1,"T",(.5,.5)); label(pic1,"O",(1,1),SW); draw(pic1,scale(2,1)*unitsquare); draw(pic1,(.5,.5)--(1,1)); add(pic1); frame f1=pic1.fit(); add(f1,(0,-1.5)); dot((0,-1.5)); picture...
Many thanks for the link, a lot of very interesting examples. In fact with a first (even it is not the first) read, it is strange that add(pic1) and add(pic1,(0,0)) do not have the same behavior. In the second case it seems that pic1is specified in postscript coordinates.
Hello I try do understand, the routine add with different arguments, as frame, picture, position, align by making some examples (and then to help asymptote users, https://tex.stackexchange.com/questions/460508/what-does-the-fit-method-of-a-picture-do) To show the difference between scaling a frame and picture, in the second case the fixed-size objects (label, pen) are not scaled, I try add(scale(2)*pic1) and add(scale(2)*pic1.fit()) and I do not understand the behavior of add(pic1,(0,0)). Indeed...