Français
Experimente

Ellipsennocke avec Auflagestange

 

p.specht


Windowstyle 16 | 64
Fenêtre 0,0 - %maxx,%maxy
' Ellipsennocke avec Auflagestange (zB comme Bildschirmschoner)
' (D)emoware 2012-05 by P. Specht, sans chacun Gewähr!
var xm!=%maxx\2
var ym!=2*%maxy\3'Mittelpunkt
var a!=%maxx\6
var b!=%maxy\12'Halbachsen
var f!=pi()/180'Grad2roue
var qaa!=1/(a!*a!)
var qbb!=1/(b!*b!)'dedans/Aussen-Hilfsvariablen
declare w&,w!,ww!' Winkel
declare x!,y!, xp!,yp!' Berührpunkt, Ext.Punkt
declare nenn!,wrz!,c1!,c2!' Divi/0 et Minuswurzel-Abfang
declare tmp!,xe!,ye!,k!
var laen!=%maxx\2' Auflagestange
var rm!=b!/3
usebrush 7,rgb(120,120,120)
Begin:

WHILELOOP 0,360,4

    MCLS %maxx, %maxy, $FFFFFF
    Début de peinture -1
    w&=&loop:w!=w&*f!
    xp!=1.2*a!:yp!=b!+a!/3
    waitinput 37
    cas %clé=27:end
    '''cls
    '''locate 3,3:imprimer "Abbruch avec Esc"
    DrawText 4, 4, "Abbruch avec ESC"
    usepen 0,6,rgb(0,0,200)
    Ellipse xm!+rm!,(ym!+rm!) - (xm!-rm!),ym!-rm!
    Elips a!,b!,w&,xm!,ym!
    'point xp!,yp!
    tmp!=xp!*cos(-w!)+yp!*sin(-w!)
    yp!=xp!*sin(-w!)-yp!*cos(-w!)
    xp!=tmp!
    nenn!=a!*a!*yp!*yp!+b!*b!*xp!*xp!

    si nenn!<>0

        c1!=a!*a!*b!*b!
        wrz!=a!*a!*yp!*yp!+b!*b!*xp!*xp!-c1!

        si wrz!>0

            x!=(a!*a!*yp!*sqrt(wrz!)+c1!*xp!)/nenn!

        endif

    endif

    y!=0

    si a!<>0

        c2!=a!*a!-x!*x!

        si c2!>0'              !>

            si ((xp!>-a!) and (yp!<0)) or (xp!>a!)

                y!=-(b!*sqrt(c2!))/a!

            d'autre

                y!= (b!*sqrt(c2!))/a!

            endif

        endif

    endif

    tmp!=xp!*cos(-w!)+yp!*sin(-w!)
    yp!=xp!*sin(-w!)-yp!*cos(-w!)
    xp!=tmp!
    tmp!=x!*cos(-w!)+y!*sin(-w!)
    y!=x!*sin(-w!)-y!*cos(-w!)
    x!=tmp!

    si (xp!*xp!*qaa!+yp!*yp!*qbb!)>=1

        usepen 0,9,rgb(255,0,0)
        point x!,y!
        line (xm!+xp!),(ym!-yp!) - (xm!+x!),ym!-y!

        si xp!<>x!

            k!=arctan((yp!-y!)/(xp!-x!))
            xe!=xp!-laen!*cos(k!)
            ye!=yp!-laen!*sin(k!)
            line (xm!+xp!),(ym!-yp!) - (xm!+xe!),ym!-ye!

        endif

    endif

    a!=0.999*a!
    EndPaint
    MCopyBMP 0, 0 - %maxx,%maxy > 0, 0; 0

ENDWHILE

Goto "Begin"

proc Elips : parameters a!,b!,g!,xm!,ym!

    declare w!,x!,y!,xe!,ye!
    var f!=-pi()/180:g!=g!*f!
    xe!=a!*cos(g!):ye!=a!*sin(g!)
    Moveto xm!+xe!,ym!-ye!

    WhileLoop 0,360,6

        w!=&Boucle*f!
        x!=a!*cos(w!)
        y!=b!*sin(w!)
        xe!=x!*cos(g!)+y!*sin(g!)
        ye!=x!*sin(g!)-y!*cos(g!)
        lineto xm!+xe!,ym!-ye!

    Endwhile

ENDPROC

proc point : parameters xp!,yp!

    rectangle xm!+xp!+3,(ym!-yp!+3) - (xm!+xp!-3),ym!-yp!-3

ENDPROC

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



Zum Experiment


Topictitle, max. 100 marque.
 

Systemprofile:

ne...aucune Systemprofil angelegt. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

s'il te plaît s'inscrire um une Beitrag trop verfassen.
 

Options du sujet

464 Views

Untitledvor 0 min.
Member 640534318.01.2022
Ernst21.07.2021
Uwe ''Pascal'' Niemeier13.06.2021
R.Schneider28.05.2021
plus...

Themeninformationen

cet Thema hat 1 participant:

p.specht (1x)


Admins  |  AGB  |  Applications  |  Auteurs  |  Chat  |  protection des données  |  Télécharger  |  Entrance  |  Aider  |  Merchantportal  |  Empreinte  |  Mart  |  Interfaces  |  SDK  |  Services  |  Jeux  |  cherche  |  Support

un projet aller XProfaner, qui il y a!


Mon XProfan
Privé Nouvelles
Eigenes Ablageforum
Sujets-La liste de voeux
Eigene Posts
Eigene Sujets
Zwischenablage
Annuler
 Deutsch English Français Español Italia
Traductions

protection des données


Wir verwenden Cookies seulement comme Session-Cookies à cause de qui technischen Notwendigkeit et chez uns gibt es aucun Cookies de Drittanbietern.

si du ici sur unsere Webseite klickst ou bien navigierst, stimmst du unserer Erfassung de Informationen dans unseren Cookies sur XProfan.Net trop.

Weitere Informationen trop unseren Cookies et en supplément, comment du qui Kontrolle par-dessus behältst, findest du dans unserer nachfolgenden Datenschutzerklärung.


d'accordDatenschutzerklärung
je voudrais keinen Cookie