xine-lib 1.2.11
Data Structures | Macros | Typedefs | Functions
ifs.c File Reference
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include "goom_config.h"
#include "goom_graphic.h"
#include "ifs.h"
#include "goom_tools.h"

Data Structures

struct  _ifsPoint
 
struct  Similitude_Struct
 
struct  Fractal_Struct
 
struct  _IFS_DATA
 

Macros

#define MODE_ifs
 
#define PROGCLASS   "IFS"
 
#define HACK_INIT   init_ifs
 
#define HACK_DRAW   draw_ifs
 
#define ifs_opts   xlockmore_opts
 
#define DEFAULTS
 
#define SMOOTH_COLORS
 
#define LRAND()   ((long) (goom_random(goomInfo->gRandom) & 0x7fffffff))
 
#define NRAND(n)   ((int) (LRAND() % (n)))
 
#define MAXRAND   (((float)(RAND_MAX<16)+((float)RAND_MAX)+1.0f)/127.0f)
 
#define FIX   12
 
#define UNIT   ( 1<<FIX )
 
#define MAX_SIMI   6
 
#define MAX_DEPTH_2   10
 
#define MAX_DEPTH_3   6
 
#define MAX_DEPTH_4   4
 
#define MAX_DEPTH_5   2
 
#define DBL_To_F_PT(x)   (F_PT)( (DBL)(UNIT)*(x) )
 
#define RAND()   goom_random(goomInfo->gRandom)
 
#define MOD_MER   0
 
#define MOD_FEU   1
 
#define MOD_MERVER   2
 

Typedefs

typedef struct _ifsPoint IFSPoint
 
typedef float DBL
 
typedef int F_PT
 
typedef struct Similitude_Struct SIMI
 
typedef struct Fractal_Struct FRACTAL
 
typedef struct _IFS_DATA IfsData
 

Functions

static DBL Gauss_Rand (PluginInfo *goomInfo, DBL c, DBL A, DBL S)
 
static DBL Half_Gauss_Rand (PluginInfo *goomInfo, DBL c, DBL A, DBL S)
 
static void Random_Simis (PluginInfo *goomInfo, FRACTAL *F, SIMI *Cur, int i)
 
static void free_ifs_buffers (FRACTAL *Fractal)
 
static void free_ifs (FRACTAL *Fractal)
 
static void init_ifs (PluginInfo *goomInfo, IfsData *data)
 
static void Transform (SIMI *Simi, F_PT xo, F_PT yo, F_PT *x, F_PT *y)
 
static void Trace (FRACTAL *F, F_PT xo, F_PT yo, IfsData *data)
 
static void Draw_Fractal (IfsData *data)
 
static IFSPointdraw_ifs (PluginInfo *goomInfo, int *nbpt, IfsData *data)
 
static void release_ifs (IfsData *data)
 
static void ifs_update (PluginInfo *goomInfo, Pixel *data, Pixel *back, int increment, IfsData *fx_data)
 
static void ifs_vfx_apply (VisualFX *_this, Pixel *src, Pixel *dest, PluginInfo *goomInfo)
 
static void ifs_vfx_init (VisualFX *_this, PluginInfo *info)
 
static void ifs_vfx_free (VisualFX *_this)
 
VisualFX ifs_visualfx_create (void)
 

Macro Definition Documentation

◆ DBL_To_F_PT

#define DBL_To_F_PT (   x)    (F_PT)( (DBL)(UNIT)*(x) )

◆ DEFAULTS

#define DEFAULTS
Value:
"*delay: 20000 \n" \
"*ncolours: 100 \n"

◆ FIX

#define FIX   12

◆ HACK_DRAW

#define HACK_DRAW   draw_ifs

◆ HACK_INIT

#define HACK_INIT   init_ifs

◆ ifs_opts

#define ifs_opts   xlockmore_opts

◆ LRAND

#define LRAND ( )    ((long) (goom_random(goomInfo->gRandom) & 0x7fffffff))

◆ MAX_DEPTH_2

#define MAX_DEPTH_2   10

◆ MAX_DEPTH_3

#define MAX_DEPTH_3   6

◆ MAX_DEPTH_4

#define MAX_DEPTH_4   4

◆ MAX_DEPTH_5

#define MAX_DEPTH_5   2

◆ MAX_SIMI

#define MAX_SIMI   6

◆ MAXRAND

#define MAXRAND   (((float)(RAND_MAX<16)+((float)RAND_MAX)+1.0f)/127.0f)

◆ MOD_FEU

#define MOD_FEU   1

◆ MOD_MER

#define MOD_MER   0

◆ MOD_MERVER

#define MOD_MERVER   2

◆ MODE_ifs

#define MODE_ifs

◆ NRAND

#define NRAND (   n)    ((int) (LRAND() % (n)))

◆ PROGCLASS

#define PROGCLASS   "IFS"

◆ RAND

#define RAND ( )    goom_random(goomInfo->gRandom)

◆ SMOOTH_COLORS

#define SMOOTH_COLORS

◆ UNIT

#define UNIT   ( 1<<FIX )

Typedef Documentation

◆ DBL

typedef float DBL

◆ F_PT

typedef int F_PT

◆ FRACTAL

typedef struct Fractal_Struct FRACTAL

◆ IfsData

typedef struct _IFS_DATA IfsData

◆ IFSPoint

typedef struct _ifsPoint IFSPoint

◆ SIMI

typedef struct Similitude_Struct SIMI

Function Documentation

◆ Draw_Fractal()

static void Draw_Fractal ( IfsData data)
static

◆ draw_ifs()

static IFSPoint * draw_ifs ( PluginInfo goomInfo,
int *  nbpt,
IfsData data 
)
static

◆ free_ifs()

static void free_ifs ( FRACTAL Fractal)
static

References free_ifs_buffers().

Referenced by init_ifs(), and release_ifs().

◆ free_ifs_buffers()

static void free_ifs_buffers ( FRACTAL Fractal)
static

◆ Gauss_Rand()

static DBL Gauss_Rand ( PluginInfo goomInfo,
DBL  c,
DBL  A,
DBL  S 
)
static

References LRAND, MAXRAND, and NRAND.

Referenced by Random_Simis().

◆ Half_Gauss_Rand()

static DBL Half_Gauss_Rand ( PluginInfo goomInfo,
DBL  c,
DBL  A,
DBL  S 
)
static

References LRAND, and MAXRAND.

Referenced by Random_Simis().

◆ ifs_update()

static void ifs_update ( PluginInfo goomInfo,
Pixel data,
Pixel back,
int  increment,
IfsData fx_data 
)
static

◆ ifs_vfx_apply()

static void ifs_vfx_apply ( VisualFX _this,
Pixel src,
Pixel dest,
PluginInfo goomInfo 
)
static

◆ ifs_vfx_free()

static void ifs_vfx_free ( VisualFX _this)
static

References _VISUAL_FX::fx_data, and release_ifs().

Referenced by ifs_visualfx_create().

◆ ifs_vfx_init()

static void ifs_vfx_init ( VisualFX _this,
PluginInfo info 
)
static

◆ ifs_visualfx_create()

VisualFX ifs_visualfx_create ( void  )

◆ init_ifs()

static void init_ifs ( PluginInfo goomInfo,
IfsData data 
)
static

◆ Random_Simis()

static void Random_Simis ( PluginInfo goomInfo,
FRACTAL F,
SIMI Cur,
int  i 
)
static

◆ release_ifs()

static void release_ifs ( IfsData data)
static

References free_ifs(), NULL, and _IFS_DATA::Root.

Referenced by ifs_vfx_free().

◆ Trace()

static void Trace ( FRACTAL F,
F_PT  xo,
F_PT  yo,
IfsData data 
)
static

◆ Transform()

static void Transform ( SIMI Simi,
F_PT  xo,
F_PT  yo,
F_PT x,
F_PT y 
)
inlinestatic