vectorgraphics / asymptote

2D & 3D TeX-Aware Vector Graphics Language
https://asymptote.sourceforge.io/
GNU General Public License v3.0
547 stars 90 forks source link

latest version cannot process this file #306

Closed avpanov closed 2 years ago

avpanov commented 2 years ago

I use TeXLive 2021 under Linux with recent versions of various packages,

-- gs --version 9.55.0

asy --version Asymptote version 2.78 [(C) 2004 Andy Hammerlindl, John C. Bowman, Tom Prince]

ENABLED OPTIONS: V3D 3D vector graphics output WebGL 3D HTML rendering OpenGL 3D OpenGL rendering SSBO GLSL shader storage buffer objects GSL GNU Scientific Library (special functions) FFTW3 Fast Fourier transforms XDR External Data Representation (portable binary file format for V3D) CURL URL support Readline Interactive history and editing Sigsegv Distinguish stack overflows from segmentation faults GC Boehm garbage collector threads Render OpenGL in separate thread

DISABLED OPTIONS: LSP Language Server Protocol

latex --version pdfTeX 3.141592653-2.6-1.40.23 (TeX Live 2021) kpathsea version 6.3.3 Copyright 2021 Han The Thanh (pdfTeX) et al. There is NO warranty. Redistribution of this software is covered by the terms of both the pdfTeX copyright and the Lesser GNU General Public License. For more information about these matters, see the file named COPYING and the pdfTeX source. Primary author of pdfTeX: Han The Thanh (pdfTeX) et al. Compiled with libpng 1.6.37; using libpng 1.6.37 Compiled with zlib 1.2.11; using zlib 1.2.11 Compiled with xpdf version 4.03

--

The output from asy is following

-- Processing disk_pores Loading plain from /usr/local/share/asymptote/plain.asy Including plain_constants from /usr/local/share/asymptote/plain_constants.asy Loading version from /usr/local/share/asymptote/version.asy Including plain_strings from /usr/local/share/asymptote/plain_strings.asy Including plain_pens from /usr/local/share/asymptote/plain_pens.asy Including plain_paths from /usr/local/share/asymptote/plain_paths.asy Including plain_filldraw from /usr/local/share/asymptote/plain_filldraw.asy Including plain_margins from /usr/local/share/asymptote/plain_margins.asy Including plain_picture from /usr/local/share/asymptote/plain_picture.asy Loading plain_scaling from /usr/local/share/asymptote/plain_scaling.asy Loading simplex from /usr/local/share/asymptote/simplex.asy Loading plain_bounds from /usr/local/share/asymptote/plain_bounds.asy Including plain_scaling from /usr/local/share/asymptote/plain_scaling.asy Including plain_prethree from /usr/local/share/asymptote/plain_prethree.asy Including plain_Label from /usr/local/share/asymptote/plain_Label.asy Including plain_arcs from /usr/local/share/asymptote/plain_arcs.asy Including plain_boxes from /usr/local/share/asymptote/plain_boxes.asy Including plain_shipout from /usr/local/share/asymptote/plain_shipout.asy Including plain_markers from /usr/local/share/asymptote/plain_markers.asy Including plain_arrows from /usr/local/share/asymptote/plain_arrows.asy Including plain_debugger from /usr/local/share/asymptote/plain_debugger.asy Loading disk_pores.asy from disk_pores.asy Loading three from /usr/local/share/asymptote/three.asy Loading math from /usr/local/share/asymptote/math.asy Loading embed from /usr/local/share/asymptote/embed.asy Including three_light from /usr/local/share/asymptote/three_light.asy Including three_surface from /usr/local/share/asymptote/three_surface.asy Loading bezulate from /usr/local/share/asymptote/bezulate.asy Loading interpolate from /usr/local/share/asymptote/interpolate.asy Loading graph_splinetype from /usr/local/share/asymptote/graph_splinetype.asy Including three_margins from /usr/local/share/asymptote/three_margins.asy Including three_tube from /usr/local/share/asymptote/three_tube.asy Including three_arrows from /usr/local/share/asymptote/three_arrows.asy Loading plain_pens from /usr/local/share/asymptote/plain_pens.asy latex \scrollmode latex -output-format=dvi \nonstopmode\input diskpores.tex This is pdfTeX, Version 3.141592653-2.6-1.40.23 (TeX Live 2021) (preloaded format=latex) restricted \write18 enabled. entering extended mode LaTeX2e <2021-11-15> patch level 1 L3 programming layer <2022-02-05> (./diskpores.tex (/usr/local/texlive/2021/texmf-dist/tex/latex/base/article.cls Document Class: article 2021/10/04 v1.4n Standard LaTeX document class (/usr/local/texlive/2021/texmf-dist/tex/latex/base/size12.clo)) (/usr/local/texlive/2021/texmf-dist/tex/latex/txfonts/txfonts.sty) (/usr/local/texlive/2021/texmf-dist/tex/latex/txfonts/ot1txr.fd) (/usr/local/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-dvips.def) No file diskpores.aux. (/usr/local/texlive/2021/texmf-dist/tex/latex/txfonts/omltxmi.fd) (/usr/local/texlive/2021/texmf-dist/tex/latex/txfonts/omstxsy.fd) (/usr/local/texlive/2021/texmf-dist/tex/latex/txfonts/omxtxex.fd) (/usr/local/texlive/2021/texmf-dist/tex/latex/txfonts/utxexa.fd) (/usr/local/texlive/2021/texmf-dist/tex/latex/txfonts/utxmia.fd) (/usr/local/texlive/2021/texmf-dist/tex/latex/txfonts/utxsya.fd) (/usr/local/texlive/2021/texmf-dist/tex/latex/txfonts/utxsyb.fd) (/usr/local/texlive/2021/texmf-dist/tex/latex/txfonts/utxsyc.fd) [1] [2] [3] (./diskpores.aux) ) Output written on diskpores.dvi (3 pages, 2392 bytes). Transcript written on diskpores.log. dvips -R -Pdownload35 -D600 -q -odiskpores.ps diskpores.dvi gs -q -dBATCH -P -dSAFER -sDEVICE=ps2write -sOutputFile=/dev/null diskpores.ps adjusting camera to (32.2126717057531,25.4639116840595,10.5169377810012) adjusting target to (7.20772901111569,6.44038400513571,1.48605704910618) X Error of failed request: GLXBadFBConfig Major opcode of failed request: 151 (GLX) Minor opcode of failed request: 0 () Serial number of failed request: 42 Current serial number in output stream: 42 warning [unbounded]: x scaling in picture unbounded warning [unbounded]: y scaling in picture unbounded warning [unbounded]: x scaling in picture unbounded warning [unbounded]: y scaling in picture unboundedlatex \nonstopmode\input diskpores.tex This is pdfTeX, Version 3.141592653-2.6-1.40.23 (TeX Live 2021) (preloaded format=latex) restricted \write18 enabled. entering extended mode LaTeX2e <2021-11-15> patch level 1 L3 programming layer <2022-02-05> (./diskpores.tex (/usr/local/texlive/2021/texmf-dist/tex/latex/base/article.cls Document Class: article 2021/10/04 v1.4n Standard LaTeX document class (/usr/local/texlive/2021/texmf-dist/tex/latex/base/size12.clo)) (/usr/local/texlive/2021/texmf-dist/tex/latex/graphics/graphicx.sty (/usr/local/texlive/2021/texmf-dist/tex/latex/graphics/keyval.sty) (/usr/local/texlive/2021/texmf-dist/tex/latex/graphics/graphics.sty (/usr/local/texlive/2021/texmf-dist/tex/latex/graphics/trig.sty) (/usr/local/texlive/2021/texmf-dist/tex/latex/graphics-cfg/graphics.cfg) (/usr/local/texlive/2021/texmf-dist/tex/latex/graphics-def/dvips.def))) (/usr/local/texlive/2021/texmf-dist/tex/latex/txfonts/txfonts.sty) (/usr/local/texlive/2021/texmf-dist/tex/latex/txfonts/ot1txr.fd) (/usr/local/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-dvips.def) No file diskpores.aux. (/usr/local/texlive/2021/texmf-dist/tex/latex/txfonts/omltxmi.fd) (/usr/local/texlive/2021/texmf-dist/tex/latex/txfonts/omstxsy.fd) (/usr/local/texlive/2021/texmf-dist/tex/latex/txfonts/omxtxex.fd) (/usr/local/texlive/2021/texmf-dist/tex/latex/txfonts/utxexa.fd)

! LaTeX Error: File `disk_pores+0' not found.

See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ...

l.64 ...}{\includegraphics[hiresbb]{disk_pores+0}} % [1] (./diskpores.aux) ) (see the transcript file for additional information) Output written on diskpores.dvi (1 page, 380 bytes). Transcript written on diskpores.log.

_shipout(prefix,f,currentpatterns,format,wait,view,t); ^ /usr/local/share/asymptote/plain_shipout.asy: 116.11: runtime: shipout failed

--

avpanov commented 2 years ago

This file can be processed with asymptote 2.65.

avpanov commented 2 years ago
import three; 
import plain_pens;
usepackage("txfonts");
//usepackage("xcolor");

size(7.5cm,7.5cm); 
int num = 6;
int elnum = num - 1;
real radius = 0.8;
real lattpar = 2.5;
real height = 1;
real center = (radius + lattpar*(num - 1))*0.5;
//real w=10,h=10;
//real zS2 = height;
//currentprojection = orthographic(1,10,1);
for (int i = 0; i < num; i += 1) { 
 for (int j = 0; j < num; j += 1) { 
  draw(shift(lattpar*i,lattpar*j,0) * scale(radius,radius,height) * unitcylinder, surfacepen = white); 
//  draw(shift(lattpar*i,lattpar*j,0) * shift(0,0,0) * scale(radius,radius,height) * unitdisk, surfacepen = white);
 }
}

path3[] pr=reverse(shift(-lattpar/2,-lattpar/2,height)*scale(lattpar*num,lattpar*num,0)*unitsquare3);
//path3[] pr=reverse((-w,-h,zS2)--(w,-h,zS2)--(w,h,zS2)--(-w,h,zS2)--cycle);
for (int i = 0; i < num; i += 1) { 
 for (int j = 0; j < num; j += 1) { 
  pr = pr^^shift(lattpar*i,lattpar*j,0)*scale(radius,radius,height)*unitcircle3;
 }
}
surface s = surface(pr, planar=true);
draw(s, surfacepen = white, render(merge=true)); //, light=nolight

draw(surface(shift(-lattpar/2,lattpar*num-lattpar/2,0)*scale(lattpar*num,0,height)*rotate(90,X)*unitsquare3), surfacepen = white);
draw(surface(shift(lattpar*(num-1/2),-lattpar/2,0)*scale(0,lattpar*num,height)*rotate(270,Y)*unitsquare3), surfacepen = white);
label("$h$", align=W, position=(lattpar*(num-1/2), lattpar*(num-1/2), height*0.7), yellow);

//draw(shift(0,0,height)*path3(box((lattpar*(elnum-1), lattpar*(elnum-1)),(lattpar*elnum,lattpar*elnum))), blue, L=Label("$a$", align=NE, yellow));
draw(shift(0,0,height)*path3(box((lattpar*(elnum-1), lattpar*(elnum-1)),(lattpar*elnum,lattpar*elnum))), blue);
label("$a$", align=NE, position=(lattpar*(elnum), lattpar*(elnum-1/2), height), yellow);

//draw((lattpar*elnum-radius,0,height)--(lattpar*elnum+radius,0,height), arrow=Arrows3(TeXHead2, emissive(green)), p=green+linewidth(1pt));
draw((lattpar*elnum-radius,0,height)--(lattpar*elnum+radius,0,height), p=green+linewidth(1pt), L=Label("$2r$", align=SE, yellow));
//label("$r$", align=SE, position=(lattpar*(elnum), 0, height), yellow);

//draw(unitplane, surfacepen = white); 
defaultpen(squarecap);
//draw((1,1,2.2)--(1,1,1.5),blue,Arrow3);
//defaultpen(4);
draw((center,center,7)--(center,center,5),deepgreen+2,Arrow3);
johncbowman commented 2 years ago

This is the source of the problem: X Error of failed request: GLXBadFBConfig Your asy file runs fine on a machine with Asymptote 2.78 and a working graphics library. Try updating your drivers or try running on a different platform. Asymptote now needs support for OpenGL 4.3 (from 2013) or later to run properly.