English
Source / code snippets

circle draw through two Umfangspunkte and Kreistangente in P1 To mouse

 

p.specht

at that building possible kompakter gear diving sometimes the angesprochene trouble on. with us here's it at least a nice geometrische Spielerei.
Windowtitle "Kreis, definiert through two spots and a Tangente"
'(CL) Copyleft P.woodpecker@gmx.at, No however geartete Gewähr!
'xm=-(sin(a)*sqr(y2)-2*sin(a)*y1*y2-2*cos(a)*x1*y2+sin(a)*sqr(y1)+2*cos(a)*x1*y1\
'+sin(a)*sqr(x2)-sin(a)*sqr(x1))/(2*(cos(a)*y2-cos(a)*y1-sin(a)*x2+sin(a)*x1))
'ym=1/tan(a)*(x1-xm)+y1 : r=sqrt(sqr(x1-xm)+sqr(y1-ym))
Windowstyle 24:window (%maxx-680)/2,0-680,%maxy-40
declare xm!,a!,sa!,y2!,y1!,x1!,ca!,x2!,ym!,xh!,yh!,dx!,dy!,ta!,r!
declare mausx&,mausy&:UseFont "Arial",15,9,1,0,0
Textcolor rgb(0,0,0),-1:usebrush 0,rgb(255,255,255)
x1!=150:y1!=150'P1
a!=-10/180*pi()'absolute Tangentenwinkel
x2!=400:y2!=300'P2
xh!=(x1!+x2!)/2:yh!=(y1!+y2!)/2
lup:
xm!=-(sin(a!)*sqr(y2!)-2*sin(a!)*y1!*y2!-2*cos(a!)*x1!*y2!+sin(a!)*sqr(y1!)+2*cos(a!)*x1!*y1!\
+sin(a!)*sqr(x2!)-sin(a!)*sqr(x1!))/(2*(cos(a!)*y2!-cos(a!)*y1!-sin(a!)*x2!+sin(a!)*x1!))
case a!<>0:ym!=cos(a!)/sin(a!)*(x1!-xm!)+y1!
r!=sqrt(sqr(x1!-xm!)+sqr(y1!-ym!))
cls
print "Kreis, definiert through two spots and a Tangente"
usepen 0,3,rgb(255,0,0)
ellipsis xm!+r!,ym!+r! - xm!-r!,ym!-r!
usepen 0,11,255:line x1!,y1!-x1!+1,y1!:line x2!,y2!-x2!+1,y2!:line xm!,ym! - xm!+1,ym!
usepen 0,8,0:line xh!,yh! - xh!+1,yh!
usepen 1,1,0:line x1!,y1! - x2!,y2!
usepen 1,1,rgb(0,0,255):line xh!,yh! - xm!,ym!:line x1!,y1! - xm!,ym!
usepen 2,1,rgb(0,0,255):line mausx&,mausy&-x1!,y1!
drawtext x1!,y1!-22,"P1":drawtext x2!,y2!-22,"P2"
drawtext xh!,yh!-22,"H":drawtext xm!,ym!-22,"M"
waitinput 333:mausx&=%mousex:mausy&=%mousey:a!=0
case mausx&-x1!:a!=arctan((mausy&-y1!)/(mausx&-x1!))
goto "lup"
 
XProfan 11
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
04/29/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

620 Views

Untitledvor 0 min.
N.Art11/27/22
Ernst07/21/21
Uwe ''Pascal'' Niemeier06/13/21
R.Schneider05/28/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