User:Soul windsurfer

From Wikibooks, open books for an open world
(Redirected from User:Adam majewski)
Jump to navigation Jump to search

In my opinion, the "best" solution is the one that can be read by another programmer (or the original programmer two years later) without copious comments. You may well want the fastest or cleverest solution which some have  already provided but I prefer readability over cleverness any time.In my opinion, the "best" solution is the one that can be read by another programmer (or the original programmer two years later) without copious comments. You may well want the fastest or cleverest solution which some have already provided but I prefer readability over cleverness any time.[1]
it was so easy that I am ashamed of having asked.

I’m not a big fan of speculating, so I’ve done a lot of testing. It is always important to validate your assumptions. I have heard many experts claim something to be true (in theory), only to find that real-world factors make the theory essentially irrelevant. A Ferrari is theoretically faster than a Ford truck, but maybe not on a dirt road. GREG BENZ

Sorry, I don't really understand this. I like mathematics but my knowledge is very limited.

 It is a great idea! Mindboggling, but I don't know how it would be done.

 faces two separate but interconnected problems.

 Benefits and drawbacks of each method = pros and cons = pro et contra ( latin)

 Julia Programming For Nervous Beginners   

 The rabbit hole is deep with many paths to explore. ( 3DickUlus )
   I don't think that this answers the OP's question in any way. ( Here OP's means probably Other People's )
"The answer is no, although it doesn't seem so easy to give a rigorous counter-example."  Glougloubarbaki[2]

" Mathematics takes place at different time-scales. If you can solve a problem in 55 minutes that others need an hour to solve, you can probably get a good job. If you can solve a problem in a month that others might need a year to solve, you will probably do well as a graduate student. But if you can solve a problem in 10 years that nobody else can solve in a lifetime, you could be a great mathematician." Robert Israel

  " anyone who wishes to study this topic should earn a Ph.D. in number theory and spend several years researching the relevant topics in depth, with the guidance of a world class expert." Alon Amit, PhD in Mathematics; Mathcircler.

  "The author apologises wholeheartedly to those who dare read the source code." Freddie R. Exall
  "Category theory is ... the most, abstract fields of mathematics" Robb Seaton[3]
  For the sake of completeness, here is the entire code I used:"
   "That's quite a comprehensive analysis: It'll take me probably a week (or better a month) to understand it. " marcm200[4]
    I feel this is a very basic question, but I seem to be unable to find an answer for (neither by myself nor searching)  marcm200

My home page - dead (:-(

Wikipedia - Adam majewski

Commons - Adam majewski

My Dropbox public folders

Mathematics Stack Exchange

gitlab repo

Sources of informations

  • printed:
    • books
    • journals
  • (mostly) not printed ( online, but some online can also be printed)


AI art engines: Midjourney (good control through text), Lexica (great at generating stylized beauty), PlaygroundAi (based on Stable Diffusion).

Image-to-text engines (describe images in words): Midjourney's "describe" command, CLIP, Replicate.

Visual libraries of artists: Midlibrary.

Prompt marketplaces: Promptbase.

Stock images: Unsplash.




Despite expanding finite iterations, there's a series maps the exterior of a unit disk to the exterior of the $M$ set.

John H. Ewing, Glenn Schober, The area of the Mandelbrot Set

Strictly speaking, we won't say the iteration converges when the final states are oscillating. Hence, **not all** the points on the Mandelbrot set converge to a limit. All points in $n$-periodic cycles $(n>1)$ or chaotic bands are **bounded**, so they belong to the Mandelbrot set but **do not converge**.

If you insist for how interior of $M$ is mapped to its final states. Please see derivation about period $1$ cycle and its final state below:

In conclusion, where

For period one cycle, $z$ and $c$ can be expressed in quadratic: $$z^2-z+c=0$$

Taking the branch enclosing the super-attractive point $c=0$,

which has the radius convergence of $\dfrac{1}{4}$.

The boundary of the mapping:

$c=\frac{e^{i\theta}}{4} \mapsto

  z=\frac{1-\sqrt{|\sin \frac{\theta}{2}|+|\sin \frac{\theta}{2}|^2}}{2}-
    \frac{i\operatorname{sgn} (\sin \theta) \sqrt{|\sin \frac{\theta}{2}|-|\sin \frac{\theta}{2}|^2}}{2}$$
- The iteration and series agree only when $|c| \le \dfrac{1}{4}$.
> Below is the comparison between the exact iterations (blue) and the series summation (red):
[![enter image description here][6]][6]
> The green boundaries refer pre-image and image enclosed for period two cycle.
[![enter image description here][7]][7]
- Animation of successive iterations of the Mandelbrot Set:
[![enter image description here][8]][8]


Riemann mapping

Computing the Riemann mapping of a hyperbolic component of the Mandelbrot set can be a challenging task, as it involves solving a number of complex analytic problems. However, there are a few general steps that can be followed to compute a Riemann mapping of a given hyperbolic component:

Identify the hyperbolic component: The first step is to identify the hyperbolic component that you wish to map. This typically involves finding the boundary of the component and determining its connectivity.

Find a conformal map from the component to the unit disk: The next step is to find a conformal map from the hyperbolic component to the unit disk. A conformal map is a holomorphic function that preserves angles, which is necessary to maintain the topological properties of the component. There are various methods to find such a conformal map, like the method of the kernel function, or the method of the half-plane.

Compute the Riemann mapping: Once a conformal map from the hyperbolic component to the unit disk has been found, the Riemann mapping can be computed by composing the conformal map with a suitable automorphism of the unit disk.

Verify the Riemann mapping: The final step is to verify that the computed Riemann mapping is a bijection and that it preserves the topological properties of the hyperbolic component.

It's worth noting that the above steps are very simplified and the actual process of finding the Riemann mapping can be quite involved and require a deep understanding of complex analysis. Also, in the case of the Mandelbrot set, the boundary of the hyperbolic component is fractal in nature and it's not clear cut, so it's not easy to identify it.

It is also important to note that this process is generally not an explicit one, meaning that it may not be possible to write down an explicit formula for the Riemann mapping in closed form, it is usually obtained via numerical methods.

The method of the kernel function is a technique for finding a conformal map from a simply connected region in the complex plane to the unit disk. The method is based on the idea of finding a special function called the kernel function, which can be used to construct the desired conformal map.

The basic idea behind the method is to find a function f(z) that satisfies the following conditions:

f(z) is holomorphic and non-constant on the region of interest f(z) maps the region to the unit disk f(z) maps the boundary of the region to the unit circle The function that satisfies these conditions is called the kernel function. The conformal map from the region to the unit disk is then given by the function g(z) = f(z) / f'(z0), where z0 is an arbitrary point in the region.

To find the kernel function, one typically starts by assuming that it has a certain form, such as f(z) = (z - z0)^k g(z) where k is a positive integer and g(z) is a holomorphic function on the region. Then one can use complex analysis techniques, such as the Schwarz reflection principle, to find the appropriate value of k and the function g(z) that make f(z) a kernel function.

It's worth noting that this method can be quite involved and requires a deep understanding of complex analysis. Also, finding the kernel function may not be possible in all cases, and finding a good approximation of it may be challenging.

The method of the half-plane is another technique for finding a conformal map from a simply connected region in the complex plane to the unit disk. This method is based on the idea of mapping the region to a half-plane and then mapping the half-plane to the unit disk.

The basic idea behind the method is to find a function f(z) that maps the region of interest to the upper half-plane and that satisfies the following properties:

f(z) is holomorphic and non-constant on the region of interest f(z) maps the region to the upper half-plane f(z) maps the boundary of the region to the real axis Once we have this function, we can then use the well-known Moebius transformation that maps the upper half-plane to the unit disk, given by g(z) = (z-i)/(z+i)

The final conformal map from the region of interest to the unit disk is the composition of f(z) and g(z) which is g(f(z))

As with the kernel function method, finding a good approximation of f(z) may be challenging and it may not be possible to find it in all cases.

It's also worth noting that this method can be quite involved and requires a deep understanding of complex analysis. The method of the half-plane is often used to find conformal maps of regions that have some special symmetry, such as regions that are symmetric with respect to the real axis.


== c source code==
<syntaxhighlight lang="c">

== bash source code==
<syntaxhighlight lang="bash">

<syntaxhighlight lang=makefile>
	chmod +x

Tu run the program simply 


==text output==


<syntaxhighlight lang="python"> </syntaxhighlight> 

{{displaytitle|title= |tab=Print version}}
{{print version notice}}
{{print version cover}}
{{PDF version}} 
{{Book title|{{BOOKNAME}}|A guide for the popular online role-playing game ''[[w:EverQuest II|EverQuest II]]''.}}
== Table of Contents ==
{{Book search}}
{{Print version}}
{{wikipedia|Everquest II}}
== How to write this book ==
Anyone who wishes to improve on this book is/are [[w:Wikipedia:Be bold in updating pages|highly encouraged to do so]]. Before you do, make sure you've read the [[Help:Editing|MediaWiki editing help page]].
{{shelves|Strategy guides}}

If you want the stable and official version of Fractal zoomer documentation you can make pdf from wikibooks and put it in wikibooks or your repos. Then you will have full control of it's content


Problem solving

  • brute-force analysis
  • Trial and error

2D computer graphic


  • raytracing
  • raymarching
  • rasterization


sudo apt-get install libsfml-dev
sudo apt-get install libcsfml-dev


HDR (high dynamic range) można krótko zdefiniować jako łączenie kilku zdjęć tej samej sceny, ale o różnym naświetleniu, w celu otrzymania jednego obrazu o powiększonym zakresie tonalnym (najciemniejszy punkt odpowiada takiemu punktowi na zdjęciu najciemniejszym, najjaśniejszy punkt odpowiada takiemu punktowi na zdjęciu najjaśniejszym). hdr-czy-tylko-tandetny-efekt. Sebastian Kończak

głębia bitowa urządzeń

  • które obecnie używamy to osiem bitów na kanał, czyli 256 gradacji tonów.
  • Tymczasem HDR to 32 bity na kanał (ta wartość jest różna dla poszczególnych algorytmów i formatów zapisu)


  • nasze oko widzi w HDR, czyli szerokim zakresie tonów
  • tymczasem aparaty fotograficzne (cyfrowe oczywiście też) „widzą” w mocno zawężonym zakresie LDR (low dynamic range)


  • wykonać zdjęcia jednej sceny, najlepiej trzy i więcej klatek.
  • Przy fotografowaniu sceny korzystamy z opcji bracketingu w aparacie. Standardowe podejście to –2EV, 0 (domyślna ekspozycja zmierzona przez aparat), +2EV. Zatem mamy zdjęcie niedoświetlone, naświetlone prawidłowo i prześwietlone. Połączenie ich razem da nam zakres tonalny od najciemniejszych wartości zdjęcia niedoświetlonego, aż do najjaśniejszych obszarów zdjęcia prześwietlonego.
  • Proponuję także fotografować w formacie RAW, ponieważ dodatkowo zachowujemy potężny zakres tonów (16 bitowy) w porównaniu do 8 bitów w pliku JPEG, nie wspominając o braku kompresji stratnej i innych obróbek dokonywanych przez aparat.
  • wybrać 16 bits/channel, co pozwoli nam przekonwertować HDR’a na głębię 16 bitową, korzystając z którejś z dostępnych metod, a także przywrócić użyteczność wszystkich narzędzi i opcji Photoshopa.

HDR Conversion, w którym mamy do wyboru cztery metody konwersji:

  • Exposure & Gamma (Ekspozycja i Kontrast Tonów Średnich) – pozwala na wybranie konkretnej ekspozycji (czyli po prostu jasności sceny) oraz jej kontrastu. Jest to metoda domyślna i produkuje najlepsze efekty, jeżeli naszym celem jest tylko poszerzony zakres tonalny, bez agresywnych efektów wizualnych, które możemy spotkać w internecie.
  • Highlight Compression (Kompresja Świateł) – jest metodą automatyczną, gdzie zakres tonalny zostaje skompresowany do 16 bitów od strony tonów jasnych. Pozwala to uniknąć prześwietleń w najjaśniejszych partiach sceny.
  • Equalize Histogram (Wyrównanie Histogramu) – metoda automatyczna, powoduje skompresowanie histogramu od strony cieni i świateł, zachowując przy tym średni, domyślny kontrast sceny.
  • Local Adaptation (Lokalne Dopasowanie) – jest to metoda produkująca tzw. „efekt” HDR, czyli charakterystyczne rozjaśnienia wokół konturów przedmiotów. Mamy tutaj dwa suwaki – Radius (Promień), w którym ustalamy wielkość lokalnego rozświetlenia, oraz Threshold (Próg) – w którym ustalamy jak bardzo mają się tonalnie różnić sąsiadujące piksele, by zakwalifikować je do jednego obszaru rozświetlenia. W tej metodzie mamy też do dyspozycji krzywą tonalną i histogram, dzięki którym możemy dopasować jasność i kontrast ogólny sceny. Ta metoda produkuje dobre „efekty” HDR, szczególnie w połączeniu z poleceniem Image – Adjustments – Shadow/Highlights (Obraz – Dopasowania – Cień/Światła).

Tone mapping



  • color mode = CMYK. Work in CMYK rather than RGB or convert to CMYK, icc profile : Coated FOGRA 39
  • Your poster should be easy to read from at least 5 feet (7.5 meters) away
  • The resolution: typical dpi for posters is 300 dpi ( at least 300 dpi for best results). 2400 dpi or more for large posters.
  • Standard poster sizes in inches are 11x17, 18x24, and 24x36. Big range is between 18 inches by 24 inches.
  • You have two choices for poster printing: digital or litho.



Teoretycznie się da ale ani to wygodne ani szybkie. Zakładam że w Inkscapie przygotowujesz rysunek wektorowy i tym wektorom chcesz nadać kolory cmykowe. Po pierwsze zainstaluj w systemie profile CMYK, oczywiście najlepiej te które dostaniesz od drukarni ale praktyka mówi że drukarnia nigdy nie wie jaki profil użyć więc jeśli jeszcze nie masz żadnych profili cmykowych to zainstaluj te z 326

Ja używam ISOcoated_v2_eci.icc to jest profil o zafarbieniu 340 (o ile dobrze pamiętam), gdybyś ich tam nie znalazł to tutaj masz linka bezpośredniego z mojego serwera:

Taki profil instalujesz sobie w systemie, w moim przypadku kopiuje je do odpowiedniego katalogu:

/home/tomek$ ls -1 .local/share/color/icc






eciRGB_v2_ICCv4.icc Teraz konfigurujesz inkscape aby używał odpowiedniego profilu, screenshot:

Następnie we właściwościach dokumentu Inkscepa w zakładce ‘kolor’ dodajesz odpowiedni profil:

Teraz w Inkscapie przy ustawianiu kolorów dla obiektów uaktywni się zakładka CMS (nie CMYK), na zakładce CMS z listy rozwijanej wybierzesz nasz profil i wtedy pojawią się cztery suwaczki którymi ustawiasz jaki kolor ma być w wyeksportowanym pliku. Jak zauważysz będziesz mógł zmieniać także kolor przy pomocy zakładki RGB albo CMYK ale te ustawienia będą tylko poglądowe na ekranie to co ma się wyeksportować to ustawiamy na zakładce CMS. Zrobiłem prosty dokument w którym na górze są cztery kwadraty w pełnych cmykowych kolorach oraz na dole tekst w 100 procentowym czarnym:

Nie ma jednak tak dobrze, to jeszcze nie koniec. Inkscape będzie używał naszego cmyka ale tylko w dokumentach SVG, w tej chwili nie potrafi jeszcze wyeksportować cmykowego dokumentu PDF. Z pomocą przyjdzie nam Scribus. W Inkscapie zapisujemy dokument *.svg, najlepiej wybrać opcję ‘czysty dokument svg’ aby Inkscape nie dodawał zbędnych atrybutów a następnie w Scribusie importujemy dokument SVG i eksportujemy cmykowego PDFa. Oczywiście na początku wstępna konfiguracja dokumentu:

I po konfiguracji wybieramy opcję Plik -> Importuj -> Pobierz plik wektorowy… Tu jednak nastąpi problem, Scribus nie potrafi wczytać wszystkich właściwości obiektów (pędzle, wypełnienia itp) które ustawi Inkscape. Możemy to obejść otwierając dokument svg w edytorze tekstu bo to przecież jest zwykły xml i usuwając pare nadmiarowych styli które wstawił Inkscape:

A tak wygląda dokument po usunięciu styli:

Teraz ponownie próbujesz zaimportować plik do Scribusa i tym razem się udaje:

I już możesz wyeksportować plik pdf:

Zauważ że eksportuję jako PDFX, dlaczego to zakładam że wiesz. I tutaj końcowy efekt naszych prac: 123

Możesz ten plik otworzyć w programie graficznym obsługującym cmyka (przy imporcie uważaj aby była zaznaczona konwersja z cmyka) i po imporcie sprawdzić kolory, kwadraty będą miały czyste kolory cmykowe, odpowiednio pierwszy z lewej od góry: (100, 0, 0, 0), w środu u góry (0, 100, 0, 0) i tak dalej a tekst będzie miał tylko setke czarnego.

Jeśli w swojej pracy masz bitmapy to je umieszczasz w Scribusie, Inkscape chyba nie da rady wyeksportować bitmapy cmykowej.

Sam widzisz że dać się da ale ani to wygodne a i możliwość popełnienia błędu duża szczególnie przy poprawkach pliku w edytorze tekstu.



  • 300 dpi does the trick
  • 600 dpi looks great with graphics
  • 1200 dpi is ready to be sent to the company executives
  • 1440+ dpi is professional-level photographic print quality

Printing method

  • a litho print involves the printer making a set of 'plates' that are used to press the image to the paper. Creating these plates comes at a cost and doesn’t offer the immediacy of digital poster printing. The initial outlay can be expensive, but if you’re doing a large print run and want to output up to A1, it’s the process that offers a higher quality print and finish than digital printing.
  • Digital printing with inkjet or laser printers is the cheaper and quicker of the two and good for smaller print runs. If budget is an issue and you’re not being too exacting over the quality, go with digital printing. This is also fine if you're not going above A3.



There are three main types of large posters:

  • Paper posters are the most common type of large poster. They are usually printed on high-quality paper and are a great way to make a statement. you can print it out onto some paper and laminate it.
  • Vinyl posters are made of durable vinyl and are perfect for outdoor use.
  • Fabric posters are made of lightweight fabric and are perfect for indoor use.


  • GSM stands for grams per square meter and determines how heavy the paper stock is

Different paper types for posters include:

  • Gloss ( Gloss Art FSC or 150gsm ) – As the name suggests, this paper offers a glossy sheen to any poster. The shiny finish encourages an eye-catching look for your poster designs and is available in six different paper weights.
  • Bond – 100% recycled and high-quality, bond paper is an environmentally-friendly poster option. It’s durable and available in two different weights at Solopress.
  • Day Glo – For a fluorescent colour scheme, day glo posters are the go-to. With a luminous effect, this paper is perfect for making a huge impression.
  • Light Box – When you’re using a back light to illuminate a poster advert, print it on light box paper. It’s the ideal method for use in cinemas, theatres and on the street.
  • 170gsm Silk


There are five A poster sizes to choose from, each suiting a different purpose:

  • A4 – Small, but with enough room to make an impact, A4 posters are a great option. Available in a huge selection of paper types and weights, they’re a versatile choice.
  • A3 – If you’re looking for a little more room to play with, A3 can get your message across. It’s commonly seen indoors in bars or shop windows – the right mix of detail and white space make it especially eye-catching.
  • A2 – This is the perfect size for gig and event posters. A2 posters can display snippets of information and leave enough room for impressive artwork and imagery.
  • A1 – Our most popular choice at Solopress, A1 posters can super-size your message. Large fonts and grand designs are ideal for posters hanging in exhibition halls or museums.
  • A0 – Over one metre in width, A0 posters can make a big impression on viewers. This size allows for large, eye-catching artwork and has space for lots of information.

A sizes (1.413 ratio):

  • A4 Paper Poster Size: 8.5” x 11” = (21 x 29.7 cm) = 2 550 x 3 300 points ( at 300 dpi ) =
  • A3 = 420 x 297 mm = 42 x 29.7 cm = 16.54 x 11.69 in = 4 962 x 3 507 points ( at 300 dpi)
  • A2 = 594 x 420 mm = 59.4 x 42 cm = 23.39 x 16.54 in = 7 017 x 4 962 points ( at 300 dpi )
  • A1 = 841 x 594 mm = 84.1 x 59.4 cm = 33.11 x 23.39 in = 9 933 x 7 017 points ( at 300 dpi)
  • A0 = 1189 x 841 mm = 118.9 x 84.1 cm = 46.81 x 33.11 in = 14 043 x 9 933 points ( at 300 dpi)

B sizes ( 1.4 ratio)

  • B2 = 707 x 500 mm = 70.7 x 50 cm = 27.83 x 19.69 in = 8 349 x 5 907 point ( at 300 dpi)
  • B1 = 1000 x 707 mm = 100 x 70.7 cm = 39.37 x 27.83 in =
  • B0 = 1400 x 1000 mm 140 x 100 cm = 55.12 x 39.37 in =

SIZE DIMENSION Smallest 8.5×11 in = 21.59 × 27.94 cm Small 11 × 17 in = 27.94 × 43.18 cm Medium 18 × 24 in = 45.72 × 60.96 cm Large 24 × 36 in = 60.96 × 91.44 cm Movie 27 × 40 in = 68.58 × 101.6 cm Bus Stop 40 × 60 in = 101.6 × 152.4 cm

unit system

  • The United States uses the Imperial system, which comes from the old British Imperial System.
  • The rest of the world uses the Metric system, developed in the late 18th century to unify all confusing measurements systems



  • GIMP - no CMYK
  • Krita ( CMYK)
  • Krita nie ma możliwości eksportu PDF, ani nie jest taka planowana. Aby utworzyć plik PDF z obrazami z Krity, należy użyć Scribus.
  • Scribus supports professional publishing features, such as CMYK colors, spot colors, ICC color management and versatile PDF creation


When several colors are printed on top of each other, there is a limit to the amount of ink or toner that can be put on paper. This maximum total dot percentage is referred to as either

When a designer ignores this technical limitation, the ink that gets laid down last won’t attach properly to the previous layers, leading to muddy browns in neutral areas. The ink also won’t dry properly on the press sheets. This can cause set-off where the ink of a still wet sheet rubs off on whatever is stacked on top of it.


  • Under Color Removal (UCR) does indeed reduce the amount of ink used to print grayish colors.
  • Gray Component Replacement (GCR) that replaces equal portions of cyan, magenta and yellow by black in all colors. It can lead to even bigger ink savings.

SWOP = Specifications for Web Offset Publications


  • color separation = split color to 4 ( or more) inks
  • RGB -> CMYK :
  • Color in printing
    • spot color = colour chosen from a colour swatch, like standard Pantone© colours swatch
    • Process Colour ( CMYK):
      • Pantone 032 colour split to CMYK: Cyan = 0% – Magenta = 90% – Yellow = 86% – Black = 0%
      • Pantone 247 is made up of 36% Cyan & 100% Magenta, with no yellow or black (K).

industry standards in the classification of spot color systems

  • Pantone, the dominant spot color printing system in the United States and Europe. PMS = Pantone Matching System
  • Toyo, a common spot color system in Japan.
  • DIC Color System Guide, another spot color system common in Japan – it is based on Munsell color theory.[5]
  • ANPA, a palette of 300 colors specified by the American Newspaper Publishers Association for spot color usage in newspapers.
  • GCMI, a standard for color used in package printing developed by the Glass Packaging Institute (formerly known as the Glass Container Manufacturers Institute, hence the abbreviation).
  • HKS is a color system which contains 120 spot colors and 3,250 tones for coated and uncoated paper. HKS is an abbreviation of three German color manufacturers: Hostmann-Steinberg Druckfarben, Kast + Ehinger Druckfarben and H. Schmincke & Co.
  • RAL is a color matching system used in Europe. The so-called RAL CLASSIC system is mainly used for varnish and powder coating.

Because each color system creates their own colors from scratch, spot colors from one system may be impossible to find within the library of another.

When to Use:

  • Spot Colors (Such as PMS Colors)
  • Process Colors (CMYK)
  • Process and Spot Colors Together
  • 6-Color or 8-Color Process Printing

Black in cmyk



  • czernią 100K ( ang. black), a tzw. bogatą czernią ( ang. rich black). Efekt jest taki, że w druku zwykła czerń (100K) jest ciemnoszara zamiast czarna. Po to właśnie używa się rich blacka.

profile kolorów

  • European Color Initiative (ECI)
  • print : Cmyku Coated FOGRA 39 dla profilu Print
  • RGB
    • sRGB dla profilu Web ( został stworzony do wyświetlania kolorów w internecie i posiada najwęższy zakres możliwych barw, dzięki czemu kolory są wyświetlane w całej gamie bez względu na klasę monitora i karty graficznej użytkownika. Jeżeli przygotowujesz jakąkolwiek grafikę czy zdjęcie, które umieścisz w internecie — chcesz przypisać profil sRGB )
    • Adobe RGB (1998) został stworzony jako większy brat sRGB, a jego zakres kolorów jest szerszy i służy głównie do opisywania kolorów na fotografiach (ogólnie mówiąc wszelkich skomplikowanych obrazach rastrowych, które mają być drukowane i obrabiane).
    • jest Lab (właściwie CIELAB D50). Posiada najszerszy gamut spośród wszystkich przestrzeni jakie istnieją. Opisywanie kolorów w tej przestrzeni oparte jest na postrzeganiu koloru przez ludzkie oko. I chociaż traktowany jest jako niezależny od urządzenia, można powiedzieć, że jest zależny od oka ludzkiego. Lab jest najtrudniejszy do zrozumienia, ponieważ nie posiada tradycyjnych kanałów z pojedynczymi kolorami. Skrót Lab to trzy kanały — luminancja (Lightness), a (tinta) i b (temperatura). Lightness zawiera informację jedynie o luminancji obrazu (jego naświetlenia, jasności i jaskrawości). Kanał ten przypomina z grubsza czarno białą wersję obrazu i przyjmuje wartości od zera (czerń) do 100 (biel). Kanał “a” to oś zieleń — czerwień (a właściwie karmazyn), natomiast kanał “b” to oś żółcień — ciemny niebieski (zbliżony do fioletu). Na pierwszy rzut oka te osie barw nie mają większego sensu, ale w rzeczywistości są odzwierciedleniem realnych barw powstających przy padaniu światła słonecznego na rzeczywiste obiekty. Z tego też powodu regulacja balansu bieli w module wywoływania negatywów cyfrowych w Photoshopie oparta jest na osiach Lab. Oś “b” odzwierciedla temperaturę barwową światła (od żółtej czyli ciepłej, do niebieskiej czyli zimnej), natomiast oś “a” to tinta, która reguluje zabarwianie sceny w zależności od światła odbitego od obiektów (np. ciasne podwórko wśród kamienic wydaje się być niebieskawo-fioletowe). Tryb Lab jest niezmiernie użyteczny, jeśli chcemy korygować jedynie tonację naszego zdjęcia, ponieważ pracujemy wtedy na kanale Lightness, podczas gdy w RGB proces ten jest niemożliwy, gdyż tony są połączone z informacją o barwie w poszczególnych kanałach. Wykonując np. polecenie poziomy (levels) w trybie RGB, zmieniamy także kolory. Lab znakomicie nadaje się też do nasycania kolorów — pracujemy przecież na odseparowanych kanałach barw. Kolory w Lab są żywsze i bardziej klarowne niż podczas obróbki w RGB. Niestety Lab nie jest trybem powszechnym, nie można zapisać pliku jpeg w trybie Lab i ogólnie mówiąc bardzo mało aplikacji obsługuje ten tryb. Jest to środowisko stricte edycyjne. Po dokonaniu potrzebnych korekt w Lab, musimy przekonwertować nasz plik z powrotem do RGB czy innego trybu.
    • profilem jest ProPhoto RGB, który ma najszerszy zakres gamutu i potrafi opisać całe bogactwo barw jakie tylko może zarejestrować matryca aparatu (nie do końca), przez co jest doskonałym wyborem jeśli chodzi o profesjonalną postprodukcję zdjęć i ich wydruk na wysokiej klasy drukarkach fotograficznych. Zarówno Adobe RGB jak i ProPhoto lepiej nadają się do obróbki zdjęć niż sRGB. Szczerze mówiąc różnica nie jest kolosalna, ale jeśli zależy nam na najwyższej możliwej jakości i elastyczności, lepiej obrabiać zdjęcia z powyższymi profilami, na samym końcu zamieniając go ewentualnie na sRGB.

Wielka trójka — RGB, CMYK, Lab. Sebastian Kończak

gray scale

In computing image pixels are usually quantized to store them as unsigned integers, to reduce the required storage and computation.

Some early grayscale monitors can only display up to sixteen different shades, which would be stored in binary form using 4 bits.

But today grayscale images intended for visual display are commonly stored with 8 bits per sampled pixel. This pixel depth allows 256 different intensities (i.e., shades of gray) to be recorded, and also simplifies computation as each pixel sample can be accessed individually as one full byte.

However, if these intensities were spaced equally in proportion to the amount of physical light they represent at that pixel (called a linear encoding or scale), the differences between adjacent dark shades could be quite noticeable as banding artifacts, while many of the lighter shades would be "wasted" by encoding a lot of perceptually-indistinguishable increments.

Therefore, the shades are instead typically spread out evenly on a gamma-compressed nonlinear scale, which better approximates uniform perceptual increments for both dark and light shades, usually making these 256 shades enough to avoid noticeable increments.


  • 2D
  • 3D
    • OpneGL

scaling or resizing

Scaling of object by by a scale factor s = sx+ sy*i

x’ = x * sx 
y’ = y * sy.


  • Uniform (maintains the object’s proportions as it scales): sx = sy
  • non-uniform: sx != sy

Resizing objects while maintaining a fixed centre point = Scaling object about their own center

  • width' = width * sx
  • height' = height * sy
  • compute coordinate of corners from the center


When we rotate a shape one should know:

  • a centre of rotation
  • the angle and units of the rotation
  • the direction of rotation


  • a rotation about the origin O by an angle θ
  • a 2D clockwise theta degrees rotation of point (x, y) around point (a, b)

About origin:

float s = sin(angle); // angle is in radians
float c = cos(angle); // angle is in radians

For clockwise rotation :

float xnew = p.x * c + p.y * s;
float ynew = -p.x * s + p.y * c;

For counter clockwise rotation :

float xnew = p.x * c - p.y * s;
float ynew = p.x * s + p.y * c;

Code in Java

  • global coordinate ( before rotation)
  • local coordinate ( after rotation)
  • origin = (pointX, pointY)
public static double[] getLocalFromGlobal(int pointX, int pointY, int localX, int localY, float angle) {
    float px = pointX - localX;
    float py = pointY - localY;

    double cos = Math.cos((Math.PI / 180) * angle);
    double sin = Math.sin((Math.PI / 180) * angle);

    double finalX = (px * cos) + (py * sin);
    double finalY = -(px * sin) + (py * cos);
    return new double[]{finalX, finalY};

First subtract the pivot point (cx,cy), then rotate it (counter clock-wise), then add the point again.

 POINT rotate_point(float cx,float cy, float angle, POINT p)
  float s = sin(angle);
  float c = cos(angle);

  // translate point back to origin:
  p.x -= cx;
  p.y -= cy;

  // rotate point
  float xnew = p.x * c - p.y * s;
  float ynew = p.x * s + p.y * c;

  // translate point back:
  p.x = xnew + cx;
  p.y = ynew + cy;
  return p;

def rotate(origin, point, angle):
    Rotate a point counter-clockwise by a given angle around a given origin.
    # Convert negative angles to positive
    angle = normalise_angle(angle)

    # Convert to radians
    angle = math.radians(angle)

    # Convert to radians
    ox, oy = origin
    px, py = point

    # Move point 'p' to origin (0,0)
    _px = px - ox
    _py = py - oy

    # Rotate the point 'p' 
    qx = (math.cos(angle) * _px) - (math.sin(angle) * _py)
    qy = (math.sin(angle) * _px) + (math.cos(angle) * _py)

    # Move point 'p' back to origin (ox, oy)
    qx = ox + qx
    qy = oy + qy

    return [qx, qy]

def normalise_angle(angle):
    """ If angle is negative then convert it to positive. """
    if (angle != 0) & (abs(angle) == (angle * -1)):
        angle = 360 + angle
    return angle


First, we need a function to rotate a point around origin.

When we rotate a point (x,y) around origin by theta degrees, we get the coordinates:

If we want to rotate it around a point other than the origin, we just need to shift it so the center point becomes the origin. Now, we can write the following function:

   from math import sin, cos, radians
   def rotate_point(point, angle, center_point=(0, 0)):
       """Rotates a point around center_point(origin by default)
       Angle is in degrees.
       Rotation is counter-clockwise
       angle_rad = radians(angle % 360)
       # Shift the point so that center_point becomes the origin
       new_point = (point[0] - center_point[0], point[1] - center_point[1])
       new_point = (new_point[0] * cos(angle_rad) - new_point[1] * sin(angle_rad),
                    new_point[0] * sin(angle_rad) + new_point[1] * cos(angle_rad))
       # Reverse the shifting we have done
       new_point = (new_point[0] + center_point[0], new_point[1] + center_point[1])
       return new_point

Some outputs:

   print(rotate_point((1, 1), 90, (2, 1)))
   # This prints (2.0, 0.0)
   print(rotate_point((1, 1), -90, (2, 1)))
   # This prints (2.0, 2.0)
   print(rotate_point((2, 2), 45, (1, 1)))
   # This prints (1.0, 2.4142) which is equal to (1,1+sqrt(2))

Now, we just need to rotate every corner of the polygon using our previous function:

   def rotate_polygon(polygon, angle, center_point=(0, 0)):
       """Rotates the given polygon which consists of corners represented as (x,y)
       around center_point (origin by default)
       Rotation is counter-clockwise
       Angle is in degrees
       rotated_polygon = []
       for corner in polygon:
           rotated_corner = rotate_point(corner, angle, center_point)
       return rotated_polygon

Example output:

   my_polygon = [(0, 0), (1, 0), (0, 1)]
   print(rotate_polygon(my_polygon, 90))
   # This gives [(0.0, 0.0), (0.0, 1.0), (-1.0, 0.0)]

In C by Aholio

X = x*cos(θ) - y*sin(θ)
Y = x*sin(θ) + y*cos(θ)

This will give you the location of a point rotated θ degrees around the origin. Since the corners of the square are rotated around the center of the square and not the origin, a couple of steps need to be added to be able to use this formula. First you need to set the point relative to the origin. Then you can use the rotation formula. After the rotation you need to move it back relative to the center of the square.

// cx, cy - center of square coordinates
// x, y - coordinates of a corner point of the square
// theta is the angle of rotation

// translate point to origin
float tempX = x - cx;
float tempY = y - cy;

// now apply rotation
float rotatedX = tempX*cos(theta) - tempY*sin(theta);
float rotatedY = tempX*sin(theta) + tempY*cos(theta);

// translate back
x = rotatedX + cx;
y = rotatedY + cy;


"A square is warped into a quarter-slice of a disk. The same transformation is again applied to the quarter-slice, and again to the resulting shape, repeatedly. A strange shape is created, with three spindly legs that appear to walk from corner to corner. This is the attractor of this particular transformation. [code]" matthen


A sequence of transformations can be combined into single one (composition, concatenation). The resulting matrix is called as composite matrix.

Advantage of composition :

  • It transformations become compact.
  • The number of operations is reduced.
  • Rules used for defining transformation in form of equations are complex as compared to matrix.

the order in which the transforms are applied:

  • is important
  • transforms are applied to objects in the reverse of the order in which they are given in the code (because the first transform in the code is applied to an object that has already been affected by the second transform).

2D normalized homogenous coordinate


  • finite point on the complex plane with Cartesian coordinate
  • point r on the extended complex plane (= Riemann sphere )
    • 2D homogenous coordinate
    • normalized 2D homogenous coordinate

Special points

  • origin
  • point at infinity
    • in homogenous coordinate : when last coordinate u is 1 then it is a point at infinity
    • in normalized homogenous coordinate


from homogenous to Cartesian coordinate

The original Cartesian coordinates are recovered by dividing the first two positions by the third. Thus unlike Cartesian coordinates, a single point can be represented by infinitely many homogeneous coordinates. Note that here not u ( typical) but 1-u is used

The mapping from the sphere to the finite plane is



If then z is point at infinity


  • deep” pixels – those containing multiple samples per pixel (and a potentially differing number of them in each pixel)
  • deep image = image with deep pixels
  • Deep color in wikipedia = 30-bit color depth and more


  • HDR TV / HDR Video
    • HD
      • UHD = 4K = Ultra High Definition = ultra HD
    • HDR-TV = Wider color gamut and contrast range than Standard Dynamic Range (SDR). Minimum 10-bit color depth and output at least 540 nits of peak brightness
      • four primary HDR formats are HDR10/10+, Dolby Vision, HLG, and Technicolor HDR
      • one need compatible equipment down the line ( from source, cables and all devices) An internet speed of 15 to 25mbps is required for stable viewing.
  • HDR photo
  • HDR image

SDR is a retronym that was established over the past 15 years to identify traditional content that uses:

  • gamma encoding
  • more limited luminance ranges
  • color gamuts such as Rec. 709 or sRGB. What is HDR? Without getting too deep into the technical details, an HDR display produces greater luminance and color depth than screens built to meet older standards. Here are some HDR basics:

HDR display luminance Display luminance describes the amount of light it emits, which in turn determines the gap between the brightest and darkest pixels on the screen. The increased light produced by an HDR display makes its brightest pixels far brighter than before, further differentiating them from the darkest ones. This increased contrast ratio enables more subtle pixel-to-pixel changes and better image reproduction.

Luminance is measured in candelas/m2 or "nits" -- a term that's increasingly common in the technical specifications for both professional and consumer monitors and laptop displays. Several different standards have been published to define what can qualify as an HDR display, generally starting at 400 nits for laptops and rising to 1000 or even 10,000 nits for high-end professional monitors.

HDR display color depth Color depth refers to how many bits of data each pixel of a display can utilize to produce the colors in an image or video. Before HDR, most displays topped out at 8-bit color. But the new HDR formats can process 10-bit (or even 12-bit) color, increasing the potential on-screen color variations exponentially.

It's all in the math. Whether directly or through what's called dithering, 8-bit color depth allows for 256 different shades of each primary color, making it possible to generate about 16.5 million color variations. 10-bit color bumps the number of shade options from 256 to 1024 -- increasing the maximum color variations to more than 1 billion!

4K resolution

  • DCI 4K is twice the 2048 x 1080 pixel resolution of projectors (4096 x 2160/approx. 17:9) and is the 4K resolution of the film industry.
  • UHD 4K (also called UHDTV 4K), on the other hand, is the 4K resolution of the television industry defined by the International Telecommunication Union (ITU). It has twice the horizontal resolution of 1920 x 1080 pixel full HD (3840 x 2160/16:9).


You need four things to enable HDR on your PC:

  • A GPU that supports HDR
  • A display that supports HDR
  • A DisplayPort 1.4 or HDMI 2.0a (or newer) connection
  • HDR content, such as a game or streaming service

HDR on a PC.

  • A monitor that’s DisplayHDR 1000 certified or a quality HDR television.
  • A video card from the AMD RX 400, Nvidia GTX 900 series, or Intel integrated graphics found in Intel 7th-gen Core, or newer.
  • An HDMI 2.0a, DisplayPort 1.4, or Thunderbolt 4 connection, or newer.
  • Microsoft’s HEVC Extensions, which are sold on the Microsoft Store.
  • HDR content, such as an HDR-compatible game or streaming service.

hdr video

HDR TV formats

  • HDR10: Most widely used open standard for HDR with 10-bit color and generalized meta data
  • Dolby Vision: Proprietary Dolby HDR technology promising 12-bit equivalent color and scene-by-scene meta data
  • HDR10+: A new, proprietary HDR format being developed reportedly with frame-by-frame meta data
  • HLG (Hybrid Log Gamma, from BBC and NHK)
  • Advanced HDR from Technicolor

HDR monitor : VESA's HDR standards for monitors:

  • VESA DisplayHDR 400
  • VESA DisplayHDR 1400





 git clone
 cd PBURF.jl
 cd src

   _       _ _(_)_     |  Documentation:
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.5.3
 _/ |\__'_|_|_|\__'_|  |  Ubuntu ⛬  julia/1.5.3+dfsg-3
|__/                   |

julia> pwd()

julia> readdir()
1-element Array{String,1}:

julia> include("PBURF.jl")

julia> import Pkg; Pkg.add("Polynomials")
julia>import Pkg; Pkg.add("Polynomials")
julia>import Pkg; Pkg.add("Colors")

function calculators

critical point

Just choose an appropriate pair of charts. Write , where and are polynomial functions with no common zeros. We may assume is not a constant function – the constant case is trivial. There are a few cases:

first case

  • – look at the function . The derivative is given by

but it's not immediate how to extract anything useful from this expression. Instead, suppose the leading term of is while the leading term of is . We must have if (in terms of ) and the denominator is of degree .

Now there are two subcases:

  • – then the value of the expression at is ; in particular, is not a critical point of .
  • – then the value of the expression at is , so is a critical point of .

second case


look at the function


The derivative is given by


but again it's not clear what we can say from this.

Let be the leading term of and let be the leading term of .

We must have if , and the numerator is of degree ) or (if ) and the denominator is of degree .

Now there are four subcases:

  • – then is a Möbius transformation and the value of the expression is non-zero; in particular, is not a critical point of .
  • – if the numerator is of degree as well, then the value of the expression is non-zero; if the numerator is of degree , then the value of the expression is zero. (Both sub-subcases are possible, of course.)
  • – then the value of the expression at is ; in particular, is not a critical point of .
  • – then the value of the expression at is , so is a critical point of .

At any rate, the point is that there is no _easy_ criterion purely in terms of the values of and .

rigorous studies of nonlinear systems

  • computing enclosures of trajectories
  • finding and proving the existence of symbolic dynamics
  • obtaining rigorous bounds for the topological entropy
  • methods for finding accurate enclosures of chaotic attractor
  • interval operators for proving the existence of fixed points and periodic orbits
  • methods for finding all short cycles


graphic software

text color

some notes

Some notes from | wikipedia

  • ,


A Gentle Introduction to the Art of Mathematics by Joe Fields,


The meaning of the terms "elliptic, hyperbolic, parabolic" in different disciplines in mathematics[6]


Moebius transformations




  • trace a curve
  • curve sampling = collect a list of points from curve
  • simplify curve
  • edge detection = ridge detection = line detection algorithm = Curve extraction
  • curve fitting


  • uniform sampling of the function ( curve)
  • adaptive sampling of the function ( curve)

simplify curve

smooth curve from points

"curve fitting is a set of techniques used to fit a curve to data points "

Fit method

  • linear
    • join points with segments = concatenated linear segments
    • straight line using linear regression
  • nonlinear
    • polynomial
    • cubic spline
      • Smooth Bézier Spline Through Prescribed Points

trace a curve

sketch a curve

boundary trace

types rose curve = n-folium: The curve is composed of a n base patterns. The pattern is called : the petal or branch / leaf / lobe - symmetrical about Ox obtained for angle between -pi/(2n) and pi/(2n)

osculating circle of a sufficiently smooth plane curve

level sets

curve properities


Interesting curves involning the curvature concept by Xah Lee:

  • Evolute curve (the centers of osculating circles)
  • Radial curve (locus of osculating circle normals)
  • circle = curve with constant curvature everywhere
  • line = curve with curvature of 0 everywhere)
  • Clothoid = spiral cirve of linearly increasing curvature)


Moore-Neighbor Tracing

see also:

chain code


( land on the root point of period 267 component : c267 = 0.250137369683480-0.000003221184145 i with angled internal adress :

( land on the root point of period 268 component c268 = 0.250137369683480-0.000003221184145i period = 10000 i with angled internal adress :

mandelbrot set

the Mandelbrot set for the function 1/z - z∙(1 + 0.001∙z)/(1 - 0.002∙z + 0.001∙z2) = "1 -0.002 - 0.999 -0.001 0 1 -0.002 0.001":



gradient line of the 2D scalar field

Key words:

  • "gradient line" 2d "scalar field"

flow :

  • level curves and gradient vector
  • flow across continuously-spaced level curves
  • The flow’s derivative is the gradient – the flow will follow the gradient vectors
  • gradient is the direction of steepest ascent in the zz-direction, the reverse of the flow is the path of an object as it rolls on the surface, starting from a high place and rolling down to a lower place (in the exact opposite direction as the gradient vectors point).
  • def from Streamline Tracing on Irregular Grids by H˚akon Hægland
    • "The instantaneous curves that are at every point tangent to the direction of the velocity at that point are called streamlines of the flow"
    • "A pathline of a fluid particle is the locus of its position in space as time passes. It is thus the trajectory of a particle of fixed identity"


the gradient points in the direction which increases the value of f most quickly. There are two ways to think about this direction:

  • Choose a fixed step size, and find the direction such that a step of that size increases fff the most. Given steps of a constant size away from a particular point, the gradient is the one which increases f the most.
  • Choose a fixed increase in fff, and find the direction such that it takes the shortest step to increase fff by that amount. Given steps which increase f by a given size, the gradient direction is the shortest among these.

Either way, you're trying to :

  • maximize the rise over run,
  • either by maximizing the rise, or minimizing the run.


Numerical Gradient The numerical gradient of a function is a way to estimate the values of the partial derivatives in each dimension using the known values of the function at certain points.

For a function of two variables, F(x,y), the gradient is

∇F=∂F/ ∂x ˆi + ∂F ∂y ˆ j  .

The gradient can be thought of as a collection of vectors pointing in the direction of increasing values of F. In MATLAB®, you can compute numerical gradients for functions with any number of variables.

Tips Use diff or a custom algorithm to compute multiple numerical derivatives, rather than calling gradient multiple times.

Algorithms gradient calculates the central difference for interior data points. For example, consider a matrix with unit-spaced data, A, that has horizontal gradient G = gradient(A). The interior gradient values, G(:,j), are

G(:,j) = 0.5*(A(:,j+1) - A(:,j-1)); The subscript j varies between 2 and N-1, with N = size(A,2).

gradient calculates values along the edges of the matrix with single-sided differences:

G(:,1) = A(:,2) - A(:,1); G(:,N) = A(:,N) - A(:,N-1); If you specify the point spacing, then gradient scales the differences appropriately. If you specify two or more outputs, then the function also calculates differences along other dimensions in a similar manner. Unlike the diff function, gradient returns an array with the same number of elements as the input.


The gradient is a mathematical operator that may help you.

If you can turn your interpolation into a differentiable function, the gradient of the height will always point in the direction of steepest ascent. All curves of equal height are perpendicular to the gradient of height evaluated at that point.

Your idea about starting from the highest point is sensible, but might miss features if there is more than one local maximum.

I'd suggest

1. pick height values at which you will draw lines 2. create a bunch of points on a fine, regularly spaced grid, then walk each point in small steps in the gradient direction towards the nearest height at which you want to draw a line 3. create curves by stepping each point perpendicular to the gradient; eliminate excess points by killing a point when another curve comes too close to it-- but to avoid destroying the center of hourglass like figures, you might need to check the angle between the oriented vector perpendicular to the gradient for both of the points. (When I say oriented, I mean make sure that the angle between the gradient and the perpendicular value you calculate is always 90 degrees in the same direction.)

In response to your comment to @erickson and to answer the point about calculating the gradient of your function. Instead of calculating the derivatives of your 300 term function you could do a numeric differentiation as follows.

Given a point [x,y] in your image you could calculate the gradient (direction of steepest decent)

   g={  ( f(x+dx,y)-f(x-dx,y) )/(2*dx),   ( f(x,y+dy)-f(x,y-dy) )/(2*dy) }

where dx and dy could be the spacing in your grid.

The contour line will run perpendicular to the gradient. So, to get the contour direction, c, we can multiply g=[v,w] by matrix, A=[0 -1, 1 0] giving

   c = [-w,v]

numeric differentiation (aka finite differences)

def numerical_derivative_2d(func, epsilon):
    def grad_func(x):
        return (func(x + np.array([epsilon, 0])) - func(x)) / epsilon, (func(x + np.array([0, epsilon])) - func(x)) / epsilon
    return grad_func

potential flow

Construction of a potential flow.svg


The Golden Ratio and the Golden Angle

In disc phyllotaxis, as in the sunflower and daisy, the mesh of spirals occurs in Fibonacci numbers because divergence (angle of succession in a single spiral arrangement) approaches the golden ratio. The shape of the spirals depends on the growth of the elements generated sequentially. In mature-disc phyllotaxis, when all the elements are the same size, the shape of the spirals is that of Fermat spirals—ideally. That is because Fermat's spiral traverses equal annuli in equal turns. The full model proposed by H Vogel in 1979[7] is

where θ is the angle, r is the radius or distance from the center, and n is the index number of the floret and c is a constant scaling factor. The angle 137.508° is the golden angle which is approximated by ratios of Fibonacci numbers.[8]

Illustration of Vogel's formula of the pattern of sunflower florets (see article) for n from 1 to 500, using the polar coordinates equations and . Can be produced using the following MATLAB code:



" Is it possible to find a pattern in the prime numbers? If you arrange them in what is called the Ulam spiral, you can see some clear patterns emerging. There are other spiral shapes which give nice patterns, such as stacking them into a triangle.... Is it possible to find a pattern in the prime numbers?  If you arrange them in what is called the Ulam spiral, you can see some clear patterns emerging. There are other spiral shapes which give nice patterns, such as stacking them into a triangle.  Here I have tried wrapping them into a Fibonacci spiral, where each dot is slightly further out than the last- and is rotated by a Golden ratio of a full turn (about 0.618034 * 360 = 222.49224 degrees). The red dots are the primes, the blacks the non-primes (composites). Unfortunately, there doesn’t seem to be any pattern. Does there? [code]" matthen
" This spiral is rotated by the golden angle every frame. Though it looks like the circles are growing and changing colour, they are actually unchanging and the whole image is just rotating. [inspired by these amazing sculptures] [code] [related]" matthen

Vogel's mode

A model for the pattern of florets in the head of a sunflower was proposed by Helmut Vogel in 1979.[9] This has the form



  • n is the index number of the floret
  • c is a constant scaling factor

The florets thus lie on Fermat's spiral. The divergence angle, approximately 137.51°, is the golden angle, dividing the circle in the golden ratio. Because this ratio is irrational, no floret has a neighbor at exactly the same angle from the center, so the florets pack efficiently. Because the rational approximations to the golden ratio are of the form F(j):F(j + 1), the nearest neighbors of floret number n are those at n ± F(j) for some index j, which depends on r, the distance from the center. Sunflowers and similar flowers most commonly have spirals of florets in clockwise and counter-clockwise directions in the amount of adjacent Fibonacci numbers,[10] typically counted by the outermost range of radii.[11]



R code


#example 2b phyllotaxis spiral
t <- 1:500
p <- (1 + sqrt(5))*pi
plot(sqrt(t)*cos(p*t), sqrt(t)*sin(p*t), type="p", axes=FALSE)

Maple code

# code from :
# by Ron Knott

> with(plots):

#Growpts shows a single picture (plot) of n seeds (points) distributed at 
#TurnperSeed (a numberbetween 0 and 1) which is the fraction of 1 turn between 
#one seed and the next,

growpts1:=proc(n,TurnperSeed,symb) local i,a,r,s,phi2pi;

#Here is a seed-head with Pi turns between each seed.  
#Since Pi=3.14159>1, it is the same as 0.14159 turns per seed.  
#Note how there are 7 radial arms (corresponding to 22/7 for Pi) near the centre 
#and the next set of radial arms are 113 arms with seeds placed 16 arms apart 
#(since the next best approximation to Pi is 3+16/113=355/113).

> growpts(1000,Pi);

#Here we take a single Turns-per-seed value and keep adding a new seed 
#(at the centre) showing the seed head growing up to n seeds finally.  
#The plots are animated to show the growing process:

seedplot := proc(n, ratio)
  display([seq(growpts1(i, ratio, CIRCLE), i = (1 .. n))], insequence = true, 
  style = point, scaling = constrained, axes = NONE)
end proc;

#Here is 100 seeds at Phi =1.618.. turns per seed (which is the same as 
#Phi-1=0.618..=phi turns per seed):

> seedplot(100,(sqrt(5)-1)/2);

intersection of polar curves




numerical conformal mapping=


Ancillary figure for van Roomen's solution to the problem of Apollonius.

tangent to circle in the polar form

 z= r(t)

is line :

 y = x*tan(t)

Tangent to cardioid in polar form :

 z = 2a( 1 - cos(t))

is line :

 // y = (x*(-1+2*cos(t))*sin(t)+(-3+3*cos(t))*sin(t))/(-1+2*cos(t)^2-cos(t))
 y = (x*(-1+2*cos(t))*sin(t)+(-2a+2a*cos(t))*sin(t))/(-1-cos(t)+2*cos(t)^2)

where t is changing from 0 to 2*pi

Compare :


slope m

The equation of the tangent at point has the form


  • function
  • implicit differentiation = differentiation of the implicit function

sqare root




Marius-F. Danca


"An attracting petal, P + , for a map M at zero is an open simply connected forward invariant region with 0 ∈ ∂P + , that shrinks down to the origin under iteration of M . More precisely, P + is an attracting petal if M (P + ) ⊂ P + ∪ {0} and n≥0 M n (P + ) = {0}. "[12]

example "An example is f(z)=z+1−1/zf(z)=z+1−1/z. There is one petal for the neutral point at infinity. Let AA be the dmain of attraction of ∞∞. Critical points are ±i±i. Everything is symmetric with respect to the real line, because the function is real. One critical point is in AA, so by symmetry the other one is also in AA. The map f:A→Af:A→A is 2-to-1 (because ff is of degree 22), so Riemann and Hurwitz tell us that AA is infinitely connected."

shareciteeditflag answered Aug 12 '12 at 13:38

Alexandre Eremenko


What is the difference between the cylinder and cylinder  ?


  • Topology is a branch of mathematics that deals with qualitative geometric information. This includes the classification of loops and higher-dimensional surfaces.
  • Topological data analysis and computational topology deal with the study of topology using a computer.
  • Persistent homology is an algebraic method for discerning topological features of data.
  • Connected component (or connected cluster of points) is a 0-dimensional feature and cycle (or loop) is a 1-dimensional feature.
  • Simplicial complex is a set composed of points, line segments, triangles, and their n-dimensional counterparts.
  • Filtration is the sequence of simplicial complexes, with an inclusion map from each simplicial complex to the next.
  • Barcode is a visual representation of the persistence of the topological features. Longer bars represent significant features of the data. Shorter bars are due to irregularities or noise.

"A topologist is someone who doesn't know the difference between a cup of coffee and a donut."

computational topology


  • dense set a subset A of a topological space X is said to be dense in X if every point of X either belongs to A or else is arbitrarily "close" to a member of A
  • countable set: a set is countable if either it is finite or it can be made in one to one correspondence with the set of natural numbers.


El método de Mandelbrot : este método para desarrollar "objetos fractales" fue creado por Benoît Mandelbrot en la década de los años 70, mientras trabajaba en IBM. Consiste en construir, para cada punto c del plano complejo, una sucesión de números complejos zn. Partiendo del punto z0 = 0, se calcula la sucesión de forma iterativa mediante la fórmula zn+1=F(zn)+c, donde F es una función arbitraria previamente elegida. Cuando la sucesión iterativa está acotada, se asigna al punto c del plano complejo un color sólido (por ejemplo, el color negro). Si la sucesión diverge entonces se asigna al punto c un color progresivamente distinto, dependiendo de cuántas iteraciones hayan sido necesarias para detectar la divergencia de la sucesión.

El fractal derivado por este método cuando se toma la función F(z)=z2 se llama conjunto de Mandelbrot.

En lo que sigue, en lugar de zn+1=F(zn)+c se utilizará la notación Z=F(Z)+C, como si se tratara de una asignación en algún lenguaje de programación.

Z = Zm + C

A continuación se muestra una serie de fractales iterando las diferentes potencias de Z = Zm + C, según el método de Mandelbrot.

Ejemplos de fractales del tipo Mandelbrot: Z = Zm + C

Tal y como se puede ver en los ejemplos representados, el número de lóbulos es L = m - 1

Un breve viaje a las profundidades del fractal de Mandelbrot Z = Z2 + C

A continuación vamos a adentrarnos en el fractal clásico de Mandelbrot, utilizando el microscopio de altísima resolución que nos proporciona el cálculo iterativo. Todas las ampliaciones vienen precedidas de una imagen del fractal a escala 1:1 en donde podemos apreciar la zona ampliada.[13]

Ampliación zona 1

Centro de coordenadas : Cx = 0.291811 , Cy = 0.0144686

Ampliación zona 2

Centro de coordenadas : Cx = -0.165643411 , Cy = 0.656685704

Ampliación zona 3

Centro de coordenadas : Cx = -0.755625 , Cy = 0.06328125

Ampliación zona 4

Centro de coordenadas : Cx = -0,1758752481899, Cy = 1,075392007
A continuación bajaremos a gran profundidad, con una ampliación de más de 2 millones y con un número máximo de 6000 iteraciones por pixel !

Ampliación zona XX

Centro de coordenadas : Cx = 0,02816835288421, Cy = 0,63790834667330
Ahora nos adentraremos en un sitio con extrañas formas y colores, pero donde pueden apreciarse perfectamente las formas del fractal de Mandelbrot...

Z = Z-m + C

Ejemplos de fractales del tipo Mandelbrot, con potencias negativas de Z.

Z = Zp / (1 + Zq) + C

Z = Zm + Cp

Pero, ¿ qué pasa cuando hacemos Z = Zm + Cp ?. Tal y como se puede ver en los siguientes ejemplos, el número de lóbulos es L = (m - 1) * p

Z = Zm + Z + C

A continuación se muestra una serie de fractales iterando las diferentes potencias de Z = Zm + Z + C, según el método de Mandelbrot.

Z = Zm - Z + C

A continuación se muestra una serie de fractales iterando las diferentes potencias de Z = Zm - Z + C, según el método de Mandelbrot.

Z = Zm + 1 / Cp

También se puede transformar cada punto del plano complejo, de acuerdo a una función arbitraria, antes de ser sumado a la función iterativa, según la siguiente ecuación Z = Zm + F(C) . Veamos que pasa cuando la transformación es del tipo:F(C) = 1 / C

Ejemplos de fractales del tipo Mandelbrot: Z = Zm + 1/C, donde cada punto C del plano complejo se transforma en 1 / C, antes de entrar en la iteración de la potencia de Z.
Zo = (0,0i). El número de vértices es V = (m - 1)

Pero, qué pasa cuándo Z = Zm + (1 / C2) ?. Pues algo muy parecido a lo que veíamos antes, ahora el número de vértices es V = (m - 1) * p

Integrando en el mismo fractal una función de C y su inversa Z = Zm + C i Z = Zm + 1/C

La zona en color BLANCO intenso es el área de la intersección de los 2 sets.

Z = ( Zm / Cm ) + C

Z = Zm + C + Cp + 1/ C + 1/ Cq

También podemos añadir más sumandos a la función Zm, combinando C, Cp, 1/C y 1/Cq en grupos de 2, 3 o 4, veamos que sucede si agrupamos C2, 1/C y 1/C2 de 2,3 o 4 formas ..:

A continuación más combinaciones con otros exponentes:

Z = Zm + polinomios de C

Podemos combinar diferentes potencias de C y/o Z sumándolas a Zm , veamos qué sucede:

El caso de la función: Z=Z2 + 1 /(Cm-1)

Z = Zm + polinomios mixtos de C i Z

Podemos sumar a Zm polinomios mixtos de C i Z , veamos qué sucede:

Z = Z2 + C/ (Z2 + k)

Z = Zm + Cp/Zq + C

Z= [(Zm+C-1) / (m*Zm-1+C- m)]2

Z= [(Z + Cm-1) / Cm]2

Z= [(Z + Cm-1) / Cm]3

Z= [(Z + Cm+1) / (Cm - 1)]2

Z= [(Z + Cm-1) / (Cm + 1)]2

Otras combinaciones de Z y C

Más funciones de variable compleja

Pero existe una amplia variedad de funciones, en el dominio de los números complejos, que pueden ser iteradas según el método de Mandelbrot.
Voy a citar aquí algunos ejemplos, explicitando la parte real y la imaginaria:

Exp(Z) = [ Exp(x) * Cos(x), Exp(x) * Sin(y)i ]
Sin(Z) = [ Sin(x) * ((Exp(y) + Exp(-y)) / 2), Cos(x) * ((Exp(y) - Exp(-y)) / 2)i ]
Cos(Z) = [ Cos(x) * ((Exp(y) + Exp(-y)) / 2) , -Sin(x) * ((Exp(y) - Exp(-y)) / 2)i ]
SinH(Z) = [ Cos(y) * ((Exp(x) - Exp(-x)) / 2) , Sin(Y) * ((Exp(x) + Exp(-x)) / 2)i ]
CosH(Z) = [ Cos(y) * ((Exp(x) + Exp(-x)) / 2) , Sin(y) * ((Exp(x) - Exp(-x)) / 2)i ]
LN(Z) = [ 0.5 * Log(x * x + y * y) , Atn(y / x)i ]
SQR(Z) = [ (x * x + y * y)^0.25 * Cos(0.5 * Atn(y/x)) , (x * x + y * y)^0.25 * Sin(0.5 * Atn(y/x)) i ]
ATN(Z) = [PI / 4 - (1 / 2) * Atn((1 - x^2 - y^2) / (2 * x)), -(1 / 4) * Log((1 - x^2 - y^2) ^2 + 4 * x^2) + (1 / 2) * Log((1 + y) ^2 + x^2) i]

Z = Zm + F(C)

A continuación algunos ejemplos de fractales por iteración de Z2, pero transformando C según las funciones descritas anteriormente:

Fractales por iteración de Exp(Z)

Esta función se descompone en una parte real y otra imaginaria: Exp(Z) = [ Exp(x) * Cos(y), Exp(x) * Sin(y)i ]
Puede ser utilizada como función iterativa o como función transformadora de C = (Cx,Cyi), o simultáneamente:

Como función iterativa

Como función transformadora de C

Como función iterativa i transformadora de C, simultáneamente

El caso de la función Z = Exp[(Z2 + k * Z) / F(Cm)]

Esta función es muy sensible a Zo, y también al coeficiente (k) que multiplica a Z. Veamos algunos ejemplos interesantes:

El caso de la función Zn+1 = Exp(Zn / C m)

El caso de la función Zn+1 = Exp(Zn / C m) + C p

El caso de la función Zn+1 = Exp(Znp / C p)

El caso de la función Zn+1 = Znq * Exp(Zn / C p) + C

El caso de la función Zn+1 = Exp[ Zn2 / (C m + C p) ]

Aparece un número de lóbulos centrales = m, y un número de aristas exteriores = p, siendo m<p.

El caso de la función Zn+1 = Znm * Exp[ Cos(Zn)] + 1/C

Aparecen un número de aristas = m.

Fractales per iteración de Sin(Z)

Esta función se descompone en una parte real y otra imaginaria: Sin(Z) = [ Sin(x) * ((Exp(y) + Exp(-y)) / 2), Cos(x) * ((Exp(y) - Exp(-y)) / 2)i ]
Puede ser utilizada como función iterativa o como función transformadora de los puntos C = (Cx,Cyi), simultáneamente:

Como función iterativa

Como función transformadora de C

Como función iterativa y transformadora de C, simultáneamente

El caso de la función Zn+1 = Sin(Zn * C m)

El caso de la función Zn+1 = Sin(Zn / C m)

Fractales por iteración de Cos(Z)

Esta función se descompone en una parte real y otra imaginaria: ' Cos(Z) = [ Cos(x)*((Exp(y)+Exp(-y)) / 2), -Sin(x)*((Exp(y)-Exp(-y))/2)i ]
Puede ser utilizada como función iterativa o como función transformadora de C = (Cx,Cyi), o simultáneamente

Como función iterativa

Como función transformadora de C

Como función iterativa y transformadora de C, simultáneamente

El caso de la función Zn+1 = Cos(Zn * C m)

El caso de la función Zn+1 = Cos(Zn/C m)

Fractales por iteración de SinH(Z)

Esta función se descompone en una parte real y otra imaginaria: SinH(Z) = [ Cos(y) * ((Exp(x) - Exp(-x)) / 2) , Sin(Y) * ((Exp(x) + Exp(-x)) / 2)i ]
Puede ser utilizada como función iterativa o como función transformadora de C = (Cx,Cyi), o simultáneamente:

Como función iterativa

Como función transformadora de C

Como función iterativa i transformadora de C, simultáneamente

Fractales por iteración de CosH(Z)

Esta función se descompone en una parte real y otra imaginaria: CosH(Z) = [ Cos(y) * ((Exp(x) + Exp(-x)) / 2) , Sin(y) * ((Exp(x) - Exp(-x)) / 2)i ]
Puede ser utilizada como función iterativa o como función transformadora de C = (Cx,Cyi), o simultáneamente:

Como función iterativa

Fractales por iteración de combinaciones de diferentes funciones de Z

Más fractales según el método de Mandelbrot

Aquí se muestra un ejemplo de iteración de dos funciones F(X) y F(Y), por adición de cada uno de los puntos del plano C(X,Y), y la introducción de una tercera función F(Z) que desequilibra el punto de convergencia.
Xn+1 = Xn - Sin(Yn) + C(X) .. Yn+1 = Yn - Sin( Xn) + C(Y) .. Zn+1 = Zn - Cos( Xn + Yn)


  • Computer Methods and Borel Summability Applied to Feigenbaum's Equation By Jean Pierre Eckmann

Format Hardback | 297 pages, Publication date 01 May 1985, Publisher Springer , Publication City/Country United States , ISBN10 0387152156, ISBN13 9780387152158

  • T. M. CHERRY, A singular case of iteration of analytic functions: A contribution to the small divisor problem. In: Nonlinear Problems of Engineering, W. F. AMES (Ed.), New York, 1964, 29–50.
  • Cherry, T. M., "A Singular Case of Iteration of Analytic Functions: A Contribution to the Small-Divisor Problem," in Nonlinear Problems of Engineering (edited by W. F. Ames), Academic Press, New York, 1964, 29-50.
  • MR178125 30.40 (57.48) Cherry, T. M. A singular case of iteration of analytic functions: A contribution to the small-divisor problem. 1964 Nonlinear Problems of Engineering pp. 29–50 Academic Press, New York
pl-N Polski jest językiem ojczystym tego użytkownika.
en-2 This user can read and write intermediate English.


  1. stackoverflow question : count-the-number-of-set-bits-in-a-32-bit-integer
  2. math SE question: is-the-basin-of-attraction-of-a-p-starshaped-wrt-to-p
  3. Why Category Theory Matters by Robb Seaton
  4. : line-segments-intersecting-msets-how-often
  5. The Informed Illustrator: Digital Spot Color Systems
  6. quora : Where-is-the-best-summary-on-the-meaning-of-the-terms-elliptic-hyperbolic-parabolic-as-used-in-different-disciplines-in-mathematics
  7. Vogel, H (1979). "A better way to construct the sunflower head". Mathematical Biosciences. 44 (44): 179–189. doi:10.1016/0025-5564(79)90080-4.
  8. Prusinkiewicz, Przemyslaw; Lindenmayer, Aristid (1990). The Algorithmic Beauty of Plants. Springer-Verlag. pp. 101–107. ISBN 978-0-387-97297-8.
  9. Vogel, Helmut (1979), "A better way to construct the sunflower head", Mathematical Biosciences, 44 (3–4): 179–89, doi:10.1016/0025-5564(79)90080-4
  10. Livio 2003, p. 112.
  11. Prusinkiewicz, Przemyslaw; Lindenmayer, Aristid (1990), "4", The Algorithmic Beauty of Plants, Springer-Verlag, pp. 101–107, ISBN 978-0-387-97297-8
  13. Barnsley, M. Fractals everywhere.Academic Press Inc, 1988. ISBN 0-12-079062-9. (Cap 5)