eGospodarka.pl
eGospodarka.pl poleca

eGospodarka.plGrupypl.comp.programmingProgramowanie piśmienneRe: Programowanie piśmienne
  • X-Received: by 10.140.108.9 with SMTP id i9mr1384422qgf.1.1420311021642; Sat, 03 Jan
    2015 10:50:21 -0800 (PST)
    X-Received: by 10.140.108.9 with SMTP id i9mr1384422qgf.1.1420311021642; Sat, 03 Jan
    2015 10:50:21 -0800 (PST)
    Path: news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!news.glorb.com!
    bm13no3025023qab.0!news-out.google.com!n9ni77qai.0!nntp.google.com!bm13no302502
    0qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
    Newsgroups: pl.comp.programming
    Date: Sat, 3 Jan 2015 10:50:21 -0800 (PST)
    In-Reply-To: <m7s46r$7h4$1@node1.news.atman.pl>
    Complaints-To: g...@g...com
    Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=164.127.209.175;
    posting-account=Sb6m8goAAABbWsBL7gouk3bfLsuxwMgN
    NNTP-Posting-Host: 164.127.209.175
    References: <m7s46r$7h4$1@node1.news.atman.pl>
    User-Agent: G2/1.0
    MIME-Version: 1.0
    Message-ID: <1...@g...com>
    Subject: Re: Programowanie piśmienne
    From: firr <p...@g...com>
    Injection-Date: Sat, 03 Jan 2015 18:50:21 +0000
    Content-Type: text/plain; charset=ISO-8859-1
    Xref: news-archive.icm.edu.pl pl.comp.programming:207296
    [ ukryj nagłówki ]

    jedna z moich skinek do jezyka c
    (ostatnio opracowywane (jako 'opcja'))



    static

    ((dbl) summ value taken for controll)

    calculate mandelbrot for test (

    (int) CLIENT SIZE X,
    (int) CLIENT SIZE Y,
    (dbl) paint map centre x,
    (dbl) paint map centre y,
    (dbl) paint map size x ,
    (int) max number of iterations)
    {

    setup variables:

    (dbl) paint map size y = paint map size x * CLIENT SIZE Y / CLIENT SIZE X

    (dbl) per pixel delta x = paint map size x / CLIENT SIZE X
    (dbl) per pixel delta y = paint map size y / CLIENT SIZE Y

    (dbl) left top point x = paint map centre x - paint map size x * 0.5 + per pixel
    delta x * 0.5
    (dbl) left top point y = paint map centre y - paint map size x * 0.5 + per pixel
    delta y * 0.5 ;


    loop thru pixels:

    for (CLIENT SIZE Y) j:
    (dbl) c point imaginary = left top point y + j * per pixel delta y

    for (CLIENT SIZE X) i:
    (dbl) c point real = left top point x + i * per pixel delta x

    fire point calculation:
    (int) n = calculate n for mandelbrot escape ( c point real, c point
    imaginary, max number of iterations )

    summ value taken for controll += n

    set pixel in client area (i ,j, palette [n]) ;
    ;
    ;

    return summ value taken for controll
    }

Podziel się

Poleć ten post znajomemu poleć

Wydrukuj ten post drukuj


Następne wpisy z tego wątku

Najnowsze wątki z tej grupy


Najnowsze wątki

Szukaj w grupach

Eksperci egospodarka.pl

1 1 1

Wpisz nazwę miasta, dla którego chcesz znaleźć jednostkę ZUS.

Wzory dokumentów

Bezpłatne wzory dokumentów i formularzy.
Wyszukaj i pobierz za darmo: