English
Source / code snippets

Ellipsenbogen in beliebiger site

 

p.specht


Window Title "Ellipsenbögen in beliebiger Lage"
'  Info: Please Achsendimensionen accommodate to Bildschirmauflösung!
'  (T) Trashware 2012 by P. woodpecker. To my Gunsten is on nachfolgender place one
'  maximum rechtswirksamer Haftungsausschließungtext of Programmanwender einzufügen:
'
'  <This lines intentionally left blank>
'  Bildausgabe changed by Volkmar Göritz
Window Style 16 | 64
Window 0,0 - %maxx,%maxy
Font 2:randomize
var col&=rgb(200,200,200)+rgb(rnd(56),rnd(56),rnd(56))
var f!=pi()/180:var xm!=%maxx/2:var ym!=%maxy/2
declare end&,ctr&
Declare Bitmap%
Begin:
inc ctr&

WHILELOOP 360,0,-10

    'Locate 1,1:Print " end: ESC hold! "
    'MCLS %maxx,%maxy,col&:StartPaint -1
    Case Bitmap% : DeleteObject Bitmap%
    Bitmap% = create("hNewPic", %maxx,%maxy,col&)
    StartPaint Bitmap%
    Text Color 20200,-1'col&
    DrawText 1,1,"Ende ESC"
    Achsen xm!,ym!
    Ellipsenbogen 400,170,f!*0; \'Halbachsen a,b, desired turn (f!*grd=rad)
    f!*&Loop+pi(),f!*(&Loop+30); \'Start- and Endwinkel from visibility the Ellipse_
    rgb(220,0,0),6;0' colour,strength,Segmentierschalter 0/1
    Ellipsenbogen 400,170,-f!*50; \'Halbachsen a,b, desired turn (f!*grd=rad)
    -f!*&Loop,-f!*(&Loop+40); \'Start- and Endwinkel from visibility the Ellipse_
    rgb(0,0,220),9;1' colour,strength,Segmentierschalter 0/1
    Ellipsenbogen 400,170,-f!*80; \'Halbachsen a,b, desired turn (f!*grd=rad)
    f!*&Loop,f!*(&Loop+60); \'Start- and Endwinkel from visibility the Ellipse_
    rgb(0,220,0),5;0' colour,strength,Segmentierschalter 0/1
    'EndPaint:MCopyBMP 0,0 - %maxx,%maxy >0,0;0
    Endpaint
    DrawPic Bitmap%, 0, 0; 0
    waitinput 5:if %key=27:end&=1:break :endif

ENDWHILE

if end&:Sound 2200,40: DeleteObject Bitmap% :END :Endif

    Goto "Begin"
    END

    proc Ellipsenbogen

        parameters a!,b!,alpha!,beta!,gamma!,col&,thk&,sw&
        declare x!,y!,g!,tmp!,nenr!,wrz!,inkr!

        if beta!>gamma!:tmp!=gamma!:gamma!=beta!:beta!=tmp!:endif

            var of!=beta!:var To!=gamma!:g!=of!
            Repeat :x!=a!*cos(-g!):y!=b!*sin(-g!)
            inkr!=1/(13.2+sqrt(abs(x!*y!/(a!*b!))))
            tmp!=x!*cos(alpha!)+y!*sin(alpha!)
            y!=x!*sin(alpha!)-y!*cos(alpha!):x!=tmp!
            case g!=of! : moveto xm!+x!,ym!-y!
            usepen 0,thk&,col&:lineto xm!+x!,ym!-y!:usepen 0,1,0
            case sw&:line  xm!,ym! - (xm!+x!),ym!-y!
            g!=g!+inkr!:until g!>=To!

        endproc

        proc Achsen :parameters x!,y!

            line xm!,0 - xm!,2*ym!
            line 0,ym! - 2*xm!,ym!

        endproc

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

528 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