English
Experimente

3D-spots circa Kardanwinkel-Drehachse rotate let

 

p.specht

with the r -Button can The direction changed go...
Window Title "Punktwolke"
Window Style 24
randomize:Window 0,0-%maxx,%maxy
var xx&=width(%hwnd):var yy&=height(%hwnd):var xh&=xx&\2:var yh&=yy&\2
def &n 500
declare px![&n],py![&n],pz![&n],i&,cw!,sw!,tmp!,cv!,sv!,cu!,su!
'Drehachse (Kardanwinkel):
var w!=1*pi()/180' circa z-axis
var v!=-0.6*pi()/180' circa x-axis
var u!=0.4*pi()/180' circa y-axis
'Random-spots
px![]=rnd(2*xx&)-xx&
py![]=rnd(2*xx&)-xx&
pz![]=rnd(2*xx&)-xx&
'draw
MCLs xx&,yy&,0

Repeat

    startpaint -1
    cls 0
    'cls 0
    'usepen 0,1,0:line 0,yh& - 2*xh&,yh& : line xh&,0 -xh&,2*yh&

    whileloop 0,&n:i&=&Loop

        if Pz![i&]>0' only The "hinter" the screen

            usepen 0,2+xh&/(1+pz![i&]/8),rgb(pz![i&],0,0)
            line xh&+px![i&],(yh&-py![i&]) - xh&+px![i&]-1,yh&-py![i&]

        endif

    endwhile

    endpaint
    MCopyBMP 0,0-xx&,yy&>0,0;0

    if w!<>0

        cw!=cos(w!):sw!=sin(w!)

        whileloop 0,&n:i&=&Loop

            tmp!=px![i&]*cw!+py![i&]*sw!
            py![i&]=py![i&]*cw!-px![i&]*sw!
            px![i&]=tmp!

        endwhile

    endif

    if v!<>0

        cv!=cos(v!):sv!=sin(v!)

        whileloop 0,&n:i&=&Loop

            tmp!=py![i&]*cv!+pz![i&]*sv!
            pz![i&]=pz![i&]*cv!-py![i&]*sv!
            py![i&]=tmp!

        endwhile

    endif

    if u!<>0

        cu!=cos(u!):su!=sin(u!)

        whileloop 0,&n:i&=&Loop

            tmp!=px![i&]*cu!+pz![i&]*su!
            pz![i&]=pz![i&]*cu!-px![i&]*su!
            px![i&]=tmp!

        endwhile

    endif

    waitinput 21
    case %key=114:w!=-w!

until %key=27

end
 
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
05/11/21  
 



Zum Experiment


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

844 Views

Untitledvor 0 min.
Member 640534304/16/22
RudiB.03/17/22
Ernst07/21/21
Sven Bader07/11/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