read


lit une entité sur le disque

alea      ascii      audio      object audio
directory
displ
graphic
image
matrix      menu
obj      format
poi
text
write
zbuf
See also

read obj

read name("nnn.ext")[sort]

        Reads the objects described in the file nnn.ext overwriting any other objects of the same indicator.
ext depends on the type of the objects.
If sort is present, objects are renumbered in the order they are read.

read memory(id)format("anyflo")name("nnn")

Reads file nnn anyflo formated in memory id;

read audio

read audio name("nnn")

        Opens file nnn in read mode, returns -1 if error.

read(n)audio

        Returns n current values read from file nnn, and NIL if end of file.
Options:
number(num): reads n values numbers [num,num+n-1], num must been < file size.
format(ff): set datas type:
        "char": characteres string
        "long": long
        "float": float (default)

read(n)audio

        Returns ncurrent values from file nnn, and NIL if end of file.
See also:
end write audio to close the file.
write audio

read audio(id)name("NNN.wav")

Reads audio file nnn.wav in objetc id type audio with properties:
audio: containt of file nnn.wav.
max: list of amplitudes each 1/25 second.

read directory

read directory("dir"

        Returns the names of files in dir.
Options:
name("eee"): only file eee
Example:
read directory("ima")name("*.bmp");
Returns the list of all files extension bmp.

read displ

read displ "nnn"

        Reads the ASCII file nnn.displ of light-vol-view written by write displ

read alea

read alea "nnn"

        Reads the random file nnn.alea.

read ascii

read ascii vol "nnn"

        Reads the volumes file nnn.ascii.vol ASCII coded according to the format described in file manuel.format.htm of the environment folder.

read fog

read fog "nnn"

        Reads the fogs file nnn.fog

read format

read format vol

read format("Z") vol("nnn")
        Reads the compressed filr nnn.vol.Z by write format(1) vol("nnn")
read format("hrc") vol("nnn") (obsolète)
        Reads the volumes file /MODELS/nnn.1-0.hrc SOFTIMAGE format.
Remarques:
1) Only volumes of type mesh are processed
2) Coordnates are multiplied by 50, they will be divided by 50 when a formated writing.
read format("hrc") vol("nnn") coe(c)
        Allows specify the multiplier coefficient.
3) The datas base directory is ima.
4) defaul is 1, in order to specify this value:
read format("hrc") vol("nnn")ext(number_version)
Example:
directory "ima"="/usr/people/jules/Database_jules"

read format light

read format("lig") light("nnn")

(obsolète)
        Reads the /MODELS/name.1-0.lig SOFTIMAGE formated file.
Notes:
1) Tne coordinates are multiplied by 50, they will be divided by 50 with a write format("dsc") secen name("nnn")´
read format("lif") lun("nnn") coe(c)
        Allows specify the multiplier coefficient.
2) The datas base directory is "ima"
3) Par défaut la version est 1, pour préciser cette valeur:
read format("lig") light("nnn")ext(number_version)

read graphic

read graphic("nnn")

        Lit le fichier d´images name write par write graphic Pour jouer see play graphic

read image name

name
directory
interpol
network
win

read image name("nnn.eee")

Reads the file image nnn.ext
Options:
abs: alows to read an image whose name contains a space.
coe(c): image size *= c.
dim(nx,ny): changes the image sizes in (nx,ny).
name("name1 name2 ..."): reads files image nnni.ext in the the successive bitmaps of the D3 image id.
name("name.ext")number("4D",num,nb): reads the files image namei.ext (with i in [num,num+nb-1]) in successives bitmaps of the D3 image id.
normal: coordinates display normalized.
NP(ind): adds ind to num.
number(num): concates num to the name.
number("nD",num): concates num coded with b digits to the name.
poi(x,y): botom left corner (x,y) (screen botom left corner by default).
Example:
read image(1)name("../../bmp:A.bmp")number("4D",700)NP(100);
Reads the image file ../../A0800.bmp in image 1.
Note: It is possible that the message name_image.bmp already exists, overwrite it? [Y / n] appears in the text, while the program is waiting for a response: focus on the window and type y.

read image(id)name("nnn.raw")line(n,nb)

Reads nb lines of file nnn.raw (non compressed anyflo image format) from line n and returns the number of the next line to read, can be used for read images in pieces.
Options:
generate: if the image is a texture mapping.

read image(num)directory("dir")

        Reads every images of directory ddd in images num,num+1, ... and returns the number of the last image.
Options:
ext=eee: only files name nnn.eee.

read image("nnn") ext("eee")format(f)number(num)interpol(im1,im2,di)

        Reads images name nnn.eee numbers im1 to im2 according to format f calculating di interpolated images, the images are stored from the number num.

Example:
read image("A") ext("jpg")format(f)number(100)interpol(1,4,6)
        Reads images A0001.jpg, A0002.jpg, A0003.jpg and A0004.jpg which are stored in 100, 105, 110 et 115.
Images 100 and 105 are interpolated in 101, 102, 103 et 104.
Images 105 and 110 are interpolated in 106, 107, 108 et 109.
Images 110 and 115 are interpolated in 111, 112, 113 et 114.
Useful to animate textures: just do for example, ecah image:
interaction texture vol(1)=m
with m = num + c * 15
with c as a parameter varying between 0 and 1 (for example the normalized module of a sensor).

read image name("nnn.eee")network(id)

Reads image nnn.eee, relizes a convolution to the dimensions of a motif of the network id, transmits the result res to validate motif(res)network(id) and returns the output (the size of a law).

read image(num1,num2)name("nnn.eee")network(id)

Reads image nnn.eee, relizes a convolution to the dimensions of a motif of the network id in image num1, transmits the result res to validate motif(res)network(id) and returns the output (the size of a law) in image num2.

read image name("n1 n2 ... nn")network(id)dim(nx,ny)

Lit les images de noms n1 n2 ... nn dans le réseau id en les convolant de (nx,ny).
Options:
inv: symétrise les images en y.
motif dans les motifs.
law dans les lois.
motif law dans les motifs et dans les lois.
Options:
format("fff"):
format("L")network(id): image(rgba) -> motif(a)network(id) (valeur par défaut).
format("R")network(id): image(rgba) -> motif(r)network(id).
format("V")network(id): image(rgba) -> motif(v)network(id).
format("B")network(id): image(rgba) -> motif(b)network(id).

read image(id)name("nnn.ext") win(x,y)

        Reads the image file nnn.ext the file nnn.ext in (x,y).

read memory

read memory obj(id) name("x")

        Reads file x in memory of object id type obj
Notes:
1) obj ic: ´cin´, ´fog´, ´light´, ´traj´, ´vol´, ´view´
2) only one number can be read

read matrix

The commande read matrix can be extended to motifs and laws of a neural network:
read("MOT)matrix motif network(id);
       Loads the matrices file MOT in the motifs of the network id.
read("LOI)matrix law network(id);
       Loads the matrices file LOI in the laws of the network id.
read("ML)matrix motif law network(id);
       Loads the same matrices files MM in the motifs and in the laws of the network id.
Returns the read floats list and NIL if error:
Constraints: each file must consist of matrices of same dimensions as dimensions of motifs and laws (nx=columns number, ny=lines number).
Note:
dim matrix returns nb,nx,ny with:
       nb = read matrices number.
       nx,ny = common dimensions of matrices.

read menu

read menu("nnn")

       Loads the file nnn.menu as menus.

read poi

read poi format name number

read poi(n1,n2) format(f) name("fic")

        Returns the coordinates of the point numbered [n1,n2] of the file fic.

read poi(n1,n2) format(f) name("fic1") number(num)

        Assigns points numbers [n1, n2] volume number num from the fic file. The file is assumed formatted as follows:
x1 f y1 f z1
x2 f y2 f z2
.... f is a space (dafqult) or a comma.
read poi(n1,n2) format(f) line(num) name("fic")
        Lets start with the line num of file fic.

read poi vol("nnn")

        Replaces the volume points in memory by those of file nnn.vol
See also:
        read format vol

read text

read text "toto"

       Loads the font of name toto.

read write

Image format converter
Images interpolating
transparency color interpolating
transparency luminance interpolating
transparency luminance interpolating (image crossfade).
fade in.
fade out.
sounds crossfade

Image format converter:

read image("nnn1.ee1")write image("nnn2.ee2")
        Reads file name ("nnn1.ee1") and writes it in file name ("nnn2.ee2").
Options:
read image("*.ee1")write image("*.ee2"): reads every files *.ee1 and writes them as *.ee2.
Legal
extension.
Examples:
read image("X.jpg")write image("Y.bmp");
       Converts X.jpg in Y.bmp
read image("env/*.jpg")write image("*.bmp");
       Converts every file env/*.jpg in *.bmp

Images interpolating

read image("nnn1.ee1")number(num1)image("nnn2.ee2")number(num2) write image("nn3.ee3")number(num3)NP(nb)
Interpolates image file name ("nnn1.ee1") number num1 and image file name ("nnn2.ee2") number num2 saving the nb results in image files name ("nnn3.ee3") number num3.
Options:
acc: accelerated
dec: decelerated
directory("dir"): searching files in directoty dir/.
law(x1,y1,0, x2,y2,0, ...): acording to the law.
number("nD",num): numbers coded on ndigits.
pend: pendular

Example:
read image("dir1/A.bmp")number("4D",600) image("dir2/B.bmp")number("4D",1) write image("dir3/C.bmp")number("4D",1)NP(6);
Creates images files named dir3/C0001.bmp, dir3/C0002.bmp, ..., dir3/C0006.bmp interpolated between images dir1/A0600.bmp and dir2/B0700.bmp

transparency color interpolating

read image("nnn1.ee1")number(num1)image("nnn2.ee2")number(num2) write image("nn3.ee3")number(num3)NP(nb) transp(t11,t12)col(r11,g11,b11, r12,g12,b12) transp(t21,t22)col(r12,g12,b12, r22,g22,b22)
Interpolates images nnn1_[num1,num1+nb-1] with images nnn2_[num1,num2+nb-1] by varying the parameters transp(t1,t2)color(r1,g1,b1, r2,g2,b2) and writing the results in files nnn1_[num3,num3+nb-1]. transparency luminance interpolating (images crossfade):
read image("nnn1.ee1")number(num1)image("nnn2.ee2")number(num2) write image("nn3.ee3")number(num3)NP(nb) transp(t11,t12)luminance(lum11,lum12)transp(t21,t22)luminance(lum21,lum22)
        Interpolates images nnn1_[num1,num1+nb-1] with images nnn2_[num1,num2+nb-1] by varying the parameters transp(t1,t2)luminance(lum1,lum2) and writing the results in files nnn1_[num3,num3+nb-1].
Example:
read("A.bmp")number("4D",600)read("B.bmp")number("4D",700) write("C.bmp")number("4D",1)NP(25)
transp(0,1, 0,1)luminance(0,1, 1,1)
transp(0,1, 0,1)luminance(1,1, 0,1);

Interpolates images A0600.bmp, ..., A0625.bmp with images B0700.bmp, ..., B0725.bmp with a constant transparency (0,1), the luminance varying from (0,1) to (1,1) for the images A and from (1,1) to (0,1) for the image B and write the results in files C0001.bmp, ..., C0025.bmp, this a fade in fade out.

read write back image write image

read back(r,g,b)image(\"nn1.ee\")number(\"4D\",n1)write image(\"nn2.eee\") number(\"4D\",n2)NP(np)
Builds images nn2[n2,n2+np-1].eee as a fade in from color (r,g,b) to animated sequence nn1[n1,n1+np-1].eee.

read write_back image write image

read _image(\"nn1.ee\")number(\"4D\",n1)back(r,g,b)write image(\"nn2.eee\") number(\"4D\",n2)NP(np)
Builds images nn2[n2,n2+np-1].eee as a fade out fromcolor (r,g,b) to animated sequence nn1[n1,n1+np-1].eee to color (r,g,b).

read write audio

sounds crosfade:
read audio("nnn1.wav")audio("nnn2.wav") write audio("nn3.wav")time(t)
cros fade between the latest t seconds of file nn1.wav and the first t seconds of file nn2.wav, the result written in file nn3.wav.

read zbuf

read zbuf("nnn")

        Reads the name.zbuf in the zbuffer.
Note:
The type of z-buffer can be changed depending on those during the write zbuf.
Options:
read(2): reads the file name name.zbuf saved by write(2) zbuf("nnn") unformatted in shorts.
read(3): reads the file name name.zbuf saved by write(2) zbuf("nnn") unformatted in floats. Voir aussi

See also:

write