Figures sur fond noir (solids)

Tout ce qui concerne le langage Asymptote. Ce langage est utilisable sur le forum via les balises asy.
[participation réservée aux utilisateurs inscrits]
Règles du forum
Merci de soigner la rédaction de vos messages et de consulter ce sujet avant de poster. Pensez également à utiliser la fonction recherche du forum.
alekhine
Utilisateur éprouvé
Utilisateur éprouvé
Messages : 228
Inscription : samedi 18 août 2007, 21:57
Localisation : Caen

[Résolu] Figures sur fond noir (solids)

Message non lu par alekhine »

Bonjour à tous,

je viens d'installer la version 1.66 d'asymptote et lorsque j'utilise l'extension solids j'obtiens les figures sur un fond noir.
Par exemple sur une figure du site de Marris, lorsque je compile ce code :

Code : Tout sélectionner

size(7cm,0);
import solids;

currentprojection = orthographic(50,50,25);

real r=4, h=7;
triple pO=(0,0,0), pS=(0,0,h), pA=(r,0,0);
revolution CoRev=cone(pO,r,h,axis=Z,n=1);

draw(CoRev,1bp+blue);

draw(pS--pA);
draw(pS--pO^^pO--pA,dashed);

label("$S$",pS,N);
dot(Label("$O$",align=SE),pO);
dot(Label("$A$",align=SW),pA);
le fond est noir.
Comment faire pour de nouveau avoir un fond blanc ?
Merci.
Dernière modification par alekhine le mercredi 22 avril 2009, 11:48, modifié 3 fois.
GMaths
Utilisateur chevronné
Utilisateur chevronné
Messages : 2042
Inscription : lundi 01 octobre 2007, 10:20

Re: [Asymptote] Problème avec l'extension solids

Message non lu par GMaths »

alekhine a écrit :je viens d'installer la version 1.66 d'asymptote
pourquoi la 1.66 ? alors que la version actuelle est la 1.70.
alekhine a écrit : et lorsque j'utilise l'extension solids j'obtiens les figures sur un fond noir.
bizarre... mais l'image est toute noire ou tu as la figure néanmoins ?
alekhine a écrit :Comment faire pour de nouveau avoir un fond blanc ?
Peut-être un problème de carte graphique...

Quelqu'un a déjà parlé de problème de rectangle noir, http://sourceforge.net/forum/message.php?msg_id=6930075
et tu verras dans les réponses que John Bowman a suggéré :
That means your graphics driver is broken. The workaround (see the manual) is to use
asy -glOptions=-indirect
alekhine
Utilisateur éprouvé
Utilisateur éprouvé
Messages : 228
Inscription : samedi 18 août 2007, 21:57
Localisation : Caen

Re: [Asymptote] Problème avec l'extension solids

Message non lu par alekhine »

GMaths a écrit :
alekhine a écrit :je viens d'installer la version 1.66 d'asymptote
pourquoi la 1.66 ? alors que la version actuelle est la 1.70.
Parce que j'ai essayé d'insatller la version 1.70 en la convertissant avec alien en .deb (je suis sous Linux) mais bizarrement ça ne fonctionne pas. Et comme je ne sais pas compiler les fichiers sources... Une idée là-dessus ?
GMaths a écrit :
alekhine a écrit : et lorsque j'utilise l'extension solids j'obtiens les figures sur un fond noir.
bizarre... mais l'image est toute noire ou tu as la figure néanmoins ?
J'obtiens bien les figures, mais sur fond noir.
GMaths a écrit :
alekhine a écrit :Comment faire pour de nouveau avoir un fond blanc ?
Peut-être un problème de carte graphique...

Quelqu'un a déjà parlé de problème de rectangle noir, http://sourceforge.net/forum/message.php?msg_id=6930075
et tu verras dans les réponses que John Bowman a suggéré :
That means your graphics driver is broken. The workaround (see the manual) is to use
asy -glOptions=-indirect
J'ai essayé, et effectivement les figures apparaissent bien sur fond blanc mais la qualité est vraiment médiocre.

Le mieux sera je pense d'installer la version 1.70. Mais j'aurais besoin d'aide pour compiler le source pour une distribution ubuntu.

En tout cas merci pour ton aide.
alekhine
Utilisateur éprouvé
Utilisateur éprouvé
Messages : 228
Inscription : samedi 18 août 2007, 21:57
Localisation : Caen

Re: [Asymptote] Problème avec l'extension solids

Message non lu par alekhine »

J'ai essayé de compiler la version 1.70 en suivant les indications d'OG dans ce post mais après un make all j'obtiens à la fin le message :

Code : Tout sélectionner

~/sources/asymptote-1.70/psfile.cc:74: undefined reference to `compress'
prc/PRCbitStream.o: In function `PRCbitStream::compress()':
~/sources/asymptote-1.70/prc/PRCbitStream.cc:42: undefined reference to `deflateInit_'
~/sources/asymptote-1.70/prc/PRCbitStream.cc:47: undefined reference to `deflateBound'
~/sources/asymptote-1.70/prc/PRCbitStream.cc:56: undefined reference to `deflate'
~/sources/asymptote-1.70/prc/PRCbitStream.cc:71: undefined reference to `deflateEnd'
~/sources/asymptote-1.70/prc/PRCbitStream.cc:81: undefined reference to `deflateEnd'
collect2: ld a retourné 1 code d'état d'exécution
make: *** [asy] Erreur 1
Et lorsque à tout hasard je lance asy j'obtiens :

Code : Tout sélectionner

asy: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
C'est vraiment à se taper la tête contre les murs ces histoires de compilation !
OG
Modérateur spécialisé
Modérateur spécialisé
Messages : 2293
Inscription : lundi 12 mars 2007, 11:20
Localisation : Rouen

Re: [Edit] Problème d'installation Asymptote 1.70

Message non lu par OG »

bonsoir

Il faudrait savoir quelle distribution Linux utilises-tu ?
As-tu bien suivi tous les conseils d'OG ?
Ensuite tu peux refaire un essai mais il faut faire un peu de nettoyage avant tout (un petit make clean par exemple).
Refaire le ./configure et si la compilation échoue merci de donner ici la sortie de ton ./configure.
À partir de demain je ne peux plus répondre.

O.G.
alekhine
Utilisateur éprouvé
Utilisateur éprouvé
Messages : 228
Inscription : samedi 18 août 2007, 21:57
Localisation : Caen

Re: [Edit] Problème d'installation Asymptote 1.70

Message non lu par alekhine »

Bonsoir

je suis sous ubuntu 8.10 (hardy heron)
Donc j'ai tout bien fait comme indiqué dans le post redonné ci-dessus.
Je viens de faire un make clean et voila ce que me donne le ./configure :

Code : Tout sélectionner

checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking for kpsewhich... true
checking for texi2dvi... no
checking for texi2dvi4a2ps... no
configure: Using /usr/local/share/texmf/tex/latex/asymptote for LaTeX style file
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... none needed
checking whether yytext is a pointer... no
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether make sets $(MAKE)... yes
checking for bison... bison -y
checking how to run the C++ preprocessor... g++ -E
checking fftw3.h usability... yes
checking fftw3.h presence... yes
checking for fftw3.h... yes
checking for fftw_execute in -lfftw3... yes
checking for gc-7.1.tar.gz... yes
configure: enabling local Boehm Garbage Collector gc-7.1
checking for getopt_long_only... yes
checking tr1/unordered_map usability... yes
checking tr1/unordered_map presence... yes
checking for tr1/unordered_map... yes
checking for setupterm in -lncurses... yes
checking for sqrt in -lm... yes
checking for deflate in -lz... yes
checking for pthread_create in -lpthread... yes
checking for stackoverflow_install_handler in -lsigsegv... yes
checking for rl_completion_matches in -lreadline... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking fenv.h usability... yes
checking fenv.h presence... yes
checking for fenv.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking ncurses/curses.h usability... no
checking ncurses/curses.h presence... no
checking for ncurses/curses.h... no
checking ncurses.h usability... yes
checking ncurses.h presence... yes
checking for ncurses.h... yes
checking fpu_control.h usability... yes
checking fpu_control.h presence... yes
checking for fpu_control.h... yes
checking for library containing xdrstdio_create... none required
checking gsl/gsl_sf.h usability... yes
checking gsl/gsl_sf.h presence... yes
checking for gsl/gsl_sf.h... yes
checking for gsl_sf_Si in -lgsl... yes
checking for glutMainLoop in -lglut... no
configure: *** Could not find glut: will compile without OpenGL support ***
checking for pid_t... yes
checking for size_t... yes
checking for ptrdiff_t... yes
checking for long long... yes
checking for long... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking return type of signal handlers... void
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for dup2... yes
checking for floor... yes
checking for memset... yes
checking for pow... yes
checking for sqrt... yes
checking for strchr... yes
checking for tgamma... yes
checking for strftime... yes
checking for strptime... yes
checking for strptime declaration in time.h... yes
checking for error_at_line... yes
checking for _LARGEFILE_SOURCE value needed for large files... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating doc/png/Makefile
config.status: creating config.h
checking for gc-7.1.tar.gz... (cached) yes
alekhine
Utilisateur éprouvé
Utilisateur éprouvé
Messages : 228
Inscription : samedi 18 août 2007, 21:57
Localisation : Caen

Re: [Edit] Problème d'installation Asymptote 1.70

Message non lu par alekhine »

Ca y est j'ai finalement réussi à installer asymptote 1.70. C'était un problème de librairie manquante (un bug sur ubuntu 8.10). D'ailleurs si quelqu'un rencontre ce problème, qu'il n'hésite pas à me demander, je suis super au point maintenant :)
Par contre, je retombe sur le même problème. Avec l'extension solids, les figures apparaissent bien, mais sur fond noir. Pourtant j'ai déjà maintes fois utilisé cette extension sans aucun problème, et je n'ai pas changé de carte graphique entre temps, puisqu'elle ne pose aucun problème par ailleurs.
Je reviens donc au problème initial : comment éviter le fond noir ?
kojak
Modérateur général
Modérateur général
Messages : 10450
Inscription : samedi 18 novembre 2006, 19:50

Re: [Edit] Problème d'installation Asymptote 1.70

Message non lu par kojak »

bonjour,
alekhine a écrit :C'était un problème de librairie manquante
Mets le nom de la librairie manquante, ça sera plus pratique. :wink:
Pas d'aide par MP.
alekhine
Utilisateur éprouvé
Utilisateur éprouvé
Messages : 228
Inscription : samedi 18 août 2007, 21:57
Localisation : Caen

Re: [Asymptote] figures sur fond noir avec l'extension solids

Message non lu par alekhine »

Bonjour,

La librairie manquante était libtinfo.so.5,
le message était le suivant :

Code : Tout sélectionner

asy: error while loading shared libraries:libtinfo.so.5: cannot open shared object file: No such file or directory
Tout est résolu ici.
alekhine
Utilisateur éprouvé
Utilisateur éprouvé
Messages : 228
Inscription : samedi 18 août 2007, 21:57
Localisation : Caen

Re: [Asymptote] figures sur fond noir avec l'extension solids

Message non lu par alekhine »

Bon, finalement pour le problème du fond noir j'utilise la solution proposée par GMath :

Code : Tout sélectionner

asy -glOptions=-indirect
et ça fonctionne.
Merci à tous.
Répondre
  • Sujets similaires
    Réponses
    Vues
    Dernier message