home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Inside Multimedia 1995 August
/
IMM0895.ISO01.iso
/
magazin
/
optix
/
disk1
/
optxppac.set
/
LINMORPH.OPT
< prev
next >
Wrap
Text File
|
1995-06-08
|
2KB
|
103 lines
def(i)
def(buf)
def(bufx)
def(bufy)
def(ecken,15)
def(morph_faktor,1)
defs(dum$)
defs(obj$)
defai(objekt,3,2,15)
procedure setze_objekt(indx)
locals(i,j,x,y,ln)
len(obj$,ln)
for i:=1 to ln step 8 do
dum$:=obj$
mid(dum$,i,3)
val(dum$,x,j)
dum$:=obj$
mid(dum$,i+4,3)
val(dum$,y,j)
objekt[indx,1,i/8+1]:=x
objekt[indx,2,i/8+1]:=y
next(i)
return
procedure zeichne_bild(m)
locals(i,j,sc)
sc:=2
j:=m*60-270/sc
line(objekt[3,1,1]/sc+j,objekt[3,2,1]/sc,objekt[3,1,1]/sc+j,objekt[3,2,1]/sc,0)
for i:=2 to ecken do
lineto(objekt[3,1,i]/sc+j,objekt[3,2,i]/sc,0)
next(i)
return
procedure morph
locals(s,k,ecke)
for k:=1 to ecken do
buf:=objekt[1,1,k]
objekt[3,1,k]:=buf
buf:=objekt[1,2,k]
objekt[3,2,k]:=buf
next(k)
repeat
if s<10-morph_faktor
inc(s,morph_faktor)
for ecke:=1 to ecken do
buf:=objekt[3,1,ecke]+(morph_faktor*(objekt[2,1,ecke]-objekt[1,1,ecke]))/10
objekt[3,1,ecke]:=buf
buf:=objekt[3,2,ecke]+(morph_faktor*(objekt[2,2,ecke]-objekt[1,2,ecke]))/10
objekt[3,2,ecke]:=buf
next(ecke)
zeichne_bild(s)
endif
until s>=10-morph_faktor
return
begin
new(objekt)
setcolor(12)
obj$:= '301,148+301,167+317,175+326,238+348,266+'
obj$:=obj$+'348,304+329,331+285,342+253,320+257,265+'
obj$:=obj$+'283,219+291,173+296,168+298,148+301,148+'
setze_objekt(1)
obj$:= '297,196+297,209+315,202+344,221+355,267+'
obj$:=obj$+'345,304+315,325+280,323+257,295+253,256+'
obj$:=obj$+'258,218+279,204+292,207+293,191+297,196+'
setze_objekt(2)
for i:= 1 to 15 do
bufx:=objekt[3,1,i]
bufy:=objekt[3,2,i]
buf:=objekt[1,1,i]
objekt[3,1,i]:=buf
buf:=objekt[1,2,i]
objekt[3,2,i]:=buf
buf:=objekt[2,1,i]
objekt[1,1,i]:=buf
buf:=objekt[2,2,i]
objekt[1,2,i]:=buf
buf:=objekt[3,1,i]
objekt[2,1,i]:=buf
buf:=objekt[3,2,i]
objekt[2,2,i]:=buf
objekt[3,1,i]:=bufx
objekt[3,2,i]:=bufy
next(i)
morph
pause(0)
end