English
Source / code snippets

Getcircp

 
only another vorgerechnete Sinuswertetabelle would faster...

Very speedy Function to point on circle with radius r and Winkel w/1000 To detect:
 {$cleq}
cls

whileLoop 0,359 *1000, 1000 {

    setPixel 320+getCircP(100,loop),240+getCircP(100,loop +90000),rnd($FFFFFF)

}

waitInput
end

nProc getCircP(long r,w){

    return long(sin(0.0174532925199433*float(w)/1000.0)*float(r))

}

thanks too again on Hubert Binnewies the then with of/ one ähnlichen thing a similar function optimierte -

here only optimiert as native function.
 
08/27/11  
 



was strain erwünscht:
 {$cleq}
cls
usepen 0,0,$FF0000
/*
parameter:
1,2:draw where:x,y
3:size:radius
4,5:gradvon,gradbis
6:each wievielten point
7:line on how much strain
*/
paintWhl(50,50,50,150,210,5,-30)
paintWhl(120,50,50,150,210,5,-20)
paintWhl(190,50,50,150,210,5,-10)
paintWhl(260,50,50,150,210,5,0)
paintWhl(330,50,50,150,210,5,10)
paintWhl(400,50,50,150,210,5,20)
paintWhl(470,50,50,150,210,5,30)
waitinput
end

paintWhl(long xp,yp,r,df,dt,step,target){

    long x,y
    df=df*1000
    dt=dt*1000
    step=step*1000
    target=180-target
    target=target*1000

    whileLoop df,dt,step {

        x=GetCircP(r,loop)
        y=GetCircP(r,90000+loop)
        setpixel xp+x,yp+y,0

    }

    line xp,yp - xp+GetCircP(r,target),yp+GetCircP(r,target+90000)

}

getCircP(long r,w){

    return sin(0.0174532925199433*w/1000.0)*r

}


Reines XProfan:
'{$cleq}
cls
usepen 0,0,$FF0000
'parameter:
'1,2:draw where:x,y
'3:size:radius
'4,5:gradvon,gradbis
'6:each wievielten point
'7:line on how much strain
paintWhl(50,50,50,150,210,5,-30)
paintWhl(120,50,50,150,210,5,-20)
paintWhl(190,50,50,150,210,5,-10)
paintWhl(260,50,50,150,210,5,0)
paintWhl(330,50,50,150,210,5,10)
paintWhl(400,50,50,150,210,5,20)
paintWhl(470,50,50,150,210,5,30)
waitinput
end

proc paintWhl

    parameters xp&,yp&,r&,df&,dt&,step&,target&
    declare x&,y&
    df&=df&*1000
    dt&=dt&*1000
    step&=step&*1000
    target&=180-target&
    target&=target&*1000

    whileLoop df&,dt&,step&

        x&=GetCircP(r&,&loop)
        y&=GetCircP(r&,90000+&loop)
        setpixel xp&+x&,yp&+y&,0

    wend

    line xp&,yp& - xp&+GetCircP(r&,target&),yp&+GetCircP(r&,target&+90000)

endproc

proc getCircP

    parameters r&,w&
    return sin(0.0174532925199433*w&/1000.0)*r&

endproc

 
10/18/14  
 




GDL
Hallöle,

thanks.

Grüßle
Georg
 
XProfan X3
Windows7 Xprofan 8,9,10 [...]  [...] 
10/18/14  
 



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

6.322 Views

Untitledvor 0 min.
p.specht11/20/21
Uwe Lang11/20/21
Manfred Barei11/19/21
Wilfried Friebe11/17/21
More...

Themeninformationen

this Topic has 2 subscriber:

iF (2x)
GDL (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