English
Experimente

Bezierkurven 2. Order and kubische Splines

 

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  
 



Zum Experiment


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

809 Views

Untitledvor 0 min.
H.Brill10/10/24
Member 640534301/18/22
Sven Bader08/11/21
Ernst07/21/21
More...

Themeninformationen

this Topic has 1 subscriber:

p.specht (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie