Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Latest commit

 

History

History
64 lines (40 loc) · 1.25 KB

README.rst

File metadata and controls

64 lines (40 loc) · 1.25 KB

Fractals example

Functionality

  • Draw fractals using affine transformation
  • Animate interations (1 big image to meny pixel size images)
  • Random based (chaos game) fractal painting
  • Different colors for each transformation

Usage

  • [Enter] - swith between random/transformation based drawing.
  • [Space] - iterate affine transformations

Transformations

Transormation vector:

T = Scale (x,y) Rotate (x, y) Translate (x, y)

Contractions (by output):

T1 T2 T3 T4

Contractions (attributes):

T1 = (-0.25,0.25, 180, 180, 0.25, 1) T2 = (-0.5, 0.5, 90, 90, 0.5, 0.5) T3 = ( 0.5, 0.5, 180, 180, 1, 1) T4 = (0.5, 0.5, 0, 0, 0.5, 0)

P_(k+1) = T1(P_k) U .. U T4(P_k)

Compilation

Libraries
  • OpenGl
  • Free GLUT
  • Math

To compile program:

gcc src/main.c -lGL -lGLU -lglut -lm -o U2Aurelijus

References