eGospodarka.pl
eGospodarka.pl poleca

eGospodarka.plGrupypl.comp.programmingProgramowanie piśmienneRe: Programowanie piśmienne
  • X-Received: by 10.140.34.206 with SMTP id l72mr614846qgl.0.1420311452312; Sat, 03 Jan
    2015 10:57:32 -0800 (PST)
    X-Received: by 10.140.34.206 with SMTP id l72mr614846qgl.0.1420311452312; Sat, 03 Jan
    2015 10:57:32 -0800 (PST)
    Path: news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!news.glorb.com!
    h15no20771796igd.0!news-out.google.com!n9ni76qai.0!nntp.google.com!dc16no388325
    0qab.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
    Newsgroups: pl.comp.programming
    Date: Sat, 3 Jan 2015 10:57:32 -0800 (PST)
    In-Reply-To: <1...@g...com>
    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>
    <1...@g...com>
    User-Agent: G2/1.0
    MIME-Version: 1.0
    Message-ID: <8...@g...com>
    Subject: Re: Programowanie piśmienne
    From: firr <p...@g...com>
    Injection-Date: Sat, 03 Jan 2015 18:57:32 +0000
    Content-Type: text/plain; charset=ISO-8859-2
    Content-Transfer-Encoding: quoted-printable
    Xref: news-archive.icm.edu.pl pl.comp.programming:207295
    [ ukryj nagłówki ]

    W dniu sobota, 3 stycznia 2015 19:50:22 UTC+1 użytkownik firr napisał:
    > 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
    > }

    ps moje czesciowe wnisoki zwiazane z tym przykladem i czytelnoscia byly np takie ze
    dlugie nazwy sa brdziej informacyjne ale zarazem wolniej czytelne (czyli bardziej ale
    wolnie ;/ natomiast krotkie na odwrót : mniej ale szybciej ;/) (y a w n)

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: