English
Source / code snippets

Richtungsvektoren of Feldern present

 

p.specht


Window Title "Vektorfeld to that 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.woodpecker

    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'...
05/14/21  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.645 Views

Untitledvor 0 min.
Rschnett08/06/22
p.specht06/09/22
R.Schneider11/20/21
Uwe Lang11/20/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