chellier a écrit :Non...
J'essaie de me souvenir de ce que j'ai fait à ma dernière installation sous linux, sachant que c'était particulier, puisque c'était sous windows7/virtualbox... et comme je ne sais plus, je vais devoir recommencer.
Sans rien connaitre à glut, je lance une idée : libglut3 n'est pas une librairie satisfaisante... il faut obligatoirement freeglut dont parle la doc.
Je cite deux passages de la doc :
2.6 Compiling from UNIX source
To compile and install a UNIX executable from a source release x.xx, first execute the commands:Code : Tout sélectionner
gunzip asymptote-x.xx.src.tgz
tar -xf asymptote-x.xx.src.tar
cd asymptote-x.xx
By default the system version of the Boehm garbage collector will be used; if it is old we recommend first putting
http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.1.tar.gz in the Asymptote source directory.
If your graphics card supports multisampling, we recommend using version 2.6.0-rc1 (or later) of freeglut to support antialiasing in Asymptote’s adaptive OpenGL 3D renderer (MacOS X users can skip this step since Asymptote is configured to use the native glut library on that platform).
Download http://prdownloads.sourceforge.net/freeglut/freeglut-2.6.0.tar.gz
and type (as the root user):Then compile Asymptote with the commandsCode : Tout sélectionner
tar -zxf freeglut-2.6.0.tar.gz
cd freeglut-2.6.0
./configure --prefix=/usr
make install
cd ..Code : Tout sélectionner
./configure
make all
make install
Be sure to use GNU make (on non-GNU systems this command may be called gmake).
To build the documentation, you may need to install the texinfo-tex package.
If you get errors from a broken texinfo or pdftex installation, simply put http://asymptote.sourceforge.net/asymptote.pdf in the directory doc and repeat the command make all.
For a (default) system-wide installation, the last command should be done as the root user.
To install without root privileges, change thecommand toCode : Tout sélectionner
./configure
Code : Tout sélectionner
./configure --prefix=$HOME/asymptote
One can disable use of the Boehm garbage collector by configuring with ./configure --disable-gc.
For a list of other configuration options, say ./configure --help.
For example, one can tell configure to look for header files and libraries in nonstandard locations:
./configure CFLAGS=-I/opt/usr/include LDFLAGS=-L/opt/usr/lib
If you are compiling Asymptote with gcc, you will need a relatively recent version (e.g. 3.4.4 or later). For full interactive functionality, you will need version 4.3 or later of the GNU readline library.
The file gcc3.3.2curses.patch in the patches directory can be used to patch the broken curses.h header file (or a local copy thereof in the current directory) on some AIX and IRIX systems.
The FFTW library is only required if you want Asymptote to be able to take Fourier transforms of data (say, to compute an audio power spectrum).
The GSL library is only required if you require the special functions that it supports.
If you don’t want to install Asymptote system wide, just make sure the compiled binary asy and GUI script xasy are in your path and set the configuration variable dir to point to the directory base (in the top level directory of the Asymptote source code).
4 façons d'afficher de la 3D :
There are four choices for viewing 3D Asymptote output:
1.
Use the native Asymptote adaptive OpenGL-based renderer (with the command-line option -V and the default settings outformat="" and render=-1).
Ajout par GM : " Un commentaire personnel : il faut l'option -V sous unix (car l'option par défaut est -noV)........... mais pour les utilisateurs de Windows, c'est le contraire : -V est l'option par défaut et donc il pourra être utile de connaitre -noV par moments.
If you encounter warnings from your graphics card driver, try specifying -glOptions=-indirect on the command line.
On UNIX systems with graphics support for multisampling, we recommend installing the latest SVN (antialiased) version of the freeglut library
(see [multisampling], page 6); the sample width can be controlled with the setting multisample.
An initial screen position can be specified with the pair setting position, where negative values are interpreted as relative to the corresponding
maximum screen dimension.
The default settingsCode : Tout sélectionner
import settings;
leftbutton=new string[] {"rotate","zoom","shift","pan"};
middlebutton=new string[] {"menu"};
rightbutton=new string[] {"zoom/menu","rotateX","rotateY","rotateZ"};
wheelup=new string[] {"zoomin"};
wheeldown=new string[] {"zoomout"};
bind the mouse buttons as follows:The keyboard shortcuts are:
- Left: rotate
- Shift Left: zoom
- Ctrl Left: shift viewport
- Alt Left: pan
- Middle: menu (must be unmodified; ignores Shift, Ctrl, and Alt)
- Wheel Up: zoom in
- Wheel Down: zoom out
- Right: zoom/menu (must be unmodified)
- Right double click: menu
- Shift Right: rotate about the X axis
- Ctrl Right: rotate about the Y axis
- Alt Right: rotate about the Z axis
- h: home
- f: toggle fitscreen
- x: spin about the X axis
- y: spin about the Y axis
- z: spin about the Z axis
- s: stop spinning
- m: rendering mode (solid/mesh/patch)
- e: export
- c: show camera parameters
- p: play animation
- r: reverse animation
- : step animation
- +: expand
- =: expand
- >: expand
- -: shrink
- : shrink
- <: shrink
- q: exit
- Ctrl-q: exit
2.
Render the scene to a specified rasterized format outformat at the resolution of n pixels per bp, as specified by the setting render=n.
A negative value of n is interpreted as |2n| for EPS and PDF formats and |n| for other formats.
The default value of render is -1.
By default, the scene is internally rendered at twice the specified resolution; this can be disabled by setting antialias=1.
High resolution rendering is done by tiling the image.
If your graphics card allows it, the rendering can be made more efficient by increasing the maximum tile size maxtile beyond the screen dimensions (indicated by maxtile=(0,0).
If your video card generates unwanted black stripes in the output, try setting the horizontal and vertical components of maxtiles to something less than
your screen dimensions.
The tile size is also limited by the setting maxviewport, which restricts the maximum width and height of the viewport.
On UNIX systems some graphics drivers support batch mode (-noV) rendering in an iconified window; this can be enabled with the setting iconify=true.
Some (broken) UNIX graphics drivers may require the command line setting -glOptions=-indirect, which requests (slower) indirect rendering.
3.
Embed the 3D PRC format in a PDF file and view the resulting PDF file with version 9.0 or later of Adobe Reader.
In addition to the default settings.prc=true, this requires settings.outformat="pdf", which can be specified by the command line option -f pdf, put in the Asymptote configuration file (see [configuration file], page 158), or specified in the script before three.asy (or graph3.asy) is imported.
Version 2008/10/08 or later of the movie15 package is also required (see Section 8.17 [embed], page 93).
The example pdb.asy illustrates how one can generate a list of predefined views (see 100d.views).
A stationary preview image with a resolution of n pixels per bp can be embedded with the setting render=n; this allows the file to be
viewed with other PDF viewers.
Alternatively, the file externalprc.tex illustrates how the resulting PRC and rendered image files can be extracted and processed in a separate
LaTeX file.
However, see Chapter 7 [LaTeX usage], page 82 for an easier way to embed three-dimensional Asymptote pictures within LaTeX.
The open-source PRC specification is available from
http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/API_References/PRCReference/PRC_Format_Specification/.
4.
Project the scene to a two-dimensional vector (EPS or PDF) format with render=0.
Only limited hidden surface removal facilities are currently available with this approach (see [PostScript3D], page 138).