| |
|
|
p.specht
| both, namely Bezierkurven 2. Order and Splines 3. Order (aka Kubische Splines) are engstens akin and ineinander überführbar. both are namely in reality kubische Polynomfunktionen. so go incidentally today skalierbare Schriften created: Duch Eckpunk-indicated. and legal protected is the Result then too!
Window Title "Parametrisch explizit gesteuerte 4-spots-Kurve"
'(DW) Demoware 2015-01-02 by P.woodpecker, Wien (Austria). without jedwede Gewähr!
Windowstyle 24:font 2:randomize:Window 0,0-%maxx,%maxy
Var xh&=width(%hwnd)/2:Var yh&=height(%hwnd)/2
proc fy :parameters y0!,y1!,y2!,y3!,a!:var a2!=sqr(a!):var a3!=a2!*a!
'*********************************************************************************
return a3!*y3!+(3*a2!-3*a3!)*y2!+(3*a3!-6*a2!+3*a!)*y1!+(-a3!+3*a2!-3*a!+1)*y0!
'*********************************************************************************
endproc
Declare i&,j&,k&,f!, x!,y!,x0!,y0!,x1!,y1!,x2!,y2!,x3!,y3!, a!
REPEAT :locate 2,2:print "1. point klicken"
whileloop 0,3
waitmouse
if %mousepressed=1
x!=%mousex:y!=%mousey
if (&Loop=0) or (&Loop=3):usepen 0,16,200
else :usepen 0,9,rgb(0,200,0)
endif : moveto x!,y!:lineto x!,y!:sound 500,10
if &Loop=0: x0!=x!:y0!=y!:locate 2,2:print "2"
elseif &Loop=1: x1!=x!:y1!=y!:locate 2,2:print "3"
elseif &Loop=2: x2!=x!:y2!=y!:locate 2,2:print "4"
elseif &Loop=3: x3!=x!:y3!=y!:locate 2,2:print "Drawing "
else : print "Huh?"
endif
endwhile
a!=0:x!=fy(x0!,x1!,x2!,x3!,a!):y!=fy(y0!,y1!,y2!,y3!,a!)
usepen 0,6,rgb(0,0,200):moveto x!,y!
whileloop 0,100:a!=&Loop/100
x!=fy(x0!,x1!,x2!,x3!,a!):y!=fy(y0!,y1!,y2!,y3!,a!):lineto x!,y!
endwhile
Until %Key=27:END
|
|
|
| Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'... | 05/12/21 ▲ |
|
|
|