English
Experimente

Bilineare Bézierkurven, to that debug and might try experimenting...

 

p.specht


Windowtitle "Bilineare Bézierkurven"
' (X) Experimentalware 2013-09 by P. woodpecker, Wien. No Gewähr!
Window 0,0-%maxx,%maxy
Appendmenubar 10,"Endpunkte for each 2 lines clicking. Between becomes then The curve painted."
declare x0!,y0!,x1!,y1!,x2!,y2!
declare x!,y!,xa!,ya!,xb!,yb!,xc!,yc!,L!
WaitMouse
x0!=%mousex:y0!=%mousey
usepen 0,2,0
point x0!,y0!
WaitMouse
x1!=%mousex:y1!=%mousey
usepen 0,2,0
point x1!,y1!
usepen 0,1,0
line x0!,y0! - x1!,y1!

repeat

    WaitMouse
    x2!=%mousex:y2!=%mousey
    usepen 0,2,0
    point x2!,y2!
    usepen 0,1,0
    'line x0!,y0! - x2!,y2!
    line x1!,y1! - x2!,y2!
    xa!=(x0!+x1!)/2:ya!=(y0!+y1!)/2
    xb!=x1!:yb!=y1!
    xc!=(x1!+x2!)/2:yc!=(y1!+y2!)/2
    usepen 0,12,rgb(0,200,0)
    moveto xa!,ya!

    whileloop 0,100

        L!=&Loop/100
        ' amber-Polynome:
        x!=(xc!-2*xb!+xa!)*sqr(L!)+2*L!*(xb!-xa!)+xa!
        y!=(yc!-2*yb!+ya!)*sqr(L!)+2*L!*(Yb!-ya!)+ya!
        lineto x!,y!

    endwhile

    x0!=x1!:y0!=y1!
    x1!=x2!:y1!=y2!

until %key=27

end

proc point

    parameters x!,y!
    usepen 0,2,rgb(255,0,0)
    rectangle x!-3,(y!-3) - x!+3,y!+3

endproc

 
XProfan 11
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
05/09/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

708 Views

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