Italia
Fonte/ Codesnippets

Richtungsvektoren von Feldern darstellen

 

p.specht


WindowTitle "Vektorfeld zum Mauszeiger":windowStyle 24:Window 0,0-%maxx,%maxy-40
var xx&=width(%hwnd):var yy&=height(%hwnd):var xh&=xx&*0.5:var yh&=yy&*0.5:var ende&=0

proc ArcTan4 :parameters x!,y!:var pi!=3.1415926535897932:var w!=0'(CL)2014-01 P.Specht

    if x!=0:if y!>0:w!=pi!*0.5:elseif y!<0:w!=pi!*1.5:else :w!=0:endif :return w!:elseif x!>0

        if y!=0:w!=0:return w!:elseif y!>0:if x!>y!:w!=arctan(y!/x!):else :w!=pi!/2-arctan(x!/y!):endif

            return w!:else :if x!<-y!:w!=pi!*1.5+arctan(x!/-y!):else :w!=2*pi!-arctan(-y!/x!):endif :return w!
            endif :else :if y!>0:if x!>-y!:w!=pi!/2+arctan(-x!/y!):return w!:else :w!=pi!-arctan(y!/-x!)
            return w!:endif :elseif y!<0:if x!<y!:w!=pi!+arctan(-y!/-x!):else :w!=pi!*1.5-arctan(-x!/-y!)
            endif :return w!:else :w!=pi!:return w!:endif :endif :Print " ArcTan4 ERROR":waitinput:waitinput

        endproc

        declare i&,j&,k&,w!,L!,LL! : L!=40 : LL!=L!*0.9

        Repeat

            MCLS xx&,yy&,$FFFFFF : startpaint -1

            WhileLoop 36:i&=LL!*&Loop:WhileLoop 18:j&=LL!*&Loop

                usepen 0,7,255:line i&,j& - i&+1,j&
                w!=arctan4(%mousex-i&,%mousey-j&)
                usepen 0,2,0:line i&,j& - i&+L!*cos(w!),j&-L!*sin(-w!)
                endwhile :endwhile : EndPaint
                MCopyBMP 0,0 - xx&,yy& > 0,0;0

            Until ende&

 
XProfan 11
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
14.05.2021  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

Kein Systemprofil angelegt. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Bitte anmelden um einen Beitrag zu verfassen.
 

Topic-Options

1.568 Views

Untitledvor 0 min.
Rschnett06.08.2022
p.specht09.06.2022
R.Schneider20.11.2021
Uwe Lang20.11.2021
Di più...

Themeninformationen

Dieses Thema hat 1 subscriber:

p.specht (1x)


Admins  |  AGB  |  Applications  |  Autori  |  Chat  |  Informativa sulla privacy  |  Download  |  Entrance  |  Aiuto  |  Merchantportal  |  Impronta  |  Mart  |  Interfaces  |  SDK  |  Services  |  Giochi  |  Cerca  |  Support

Ein Projekt aller XProfaner, die es gibt!


Il mio XProfan
Private Notizie
Eigenes Ablageforum
Argomenti-Merkliste
Eigene Beiträge
Eigene Argomenti
Zwischenablage
Annullare
 Deutsch English Français Español Italia
Traduzioni

Informativa sulla privacy


Wir verwenden Cookies nur als Session-Cookies wegen der technischen Notwendigkeit und bei uns gibt es keine Cookies von Drittanbietern.

Wenn du hier auf unsere Webseite klickst oder navigierst, stimmst du unserer Erfassung von Informationen in unseren Cookies auf XProfan.Net zu.

Weitere Informationen zu unseren Cookies und dazu, wie du die Kontrolle darüber behältst, findest du in unserer nachfolgenden Datenschutzerklärung.


einverstandenDatenschutzerklärung
Ich möchte keinen Cookie