16 Commits

Author SHA1 Message Date
Scott Draves ba790dfc3e to sync with tag 2015-06-12 02:44:16 +00:00
Scott Draves cf992d1f25 correct version 2015-06-12 02:34:35 +00:00
Scott Draves 3b9b792e02 version to 3.1.0 2015-06-12 02:31:12 +00:00
Scott Draves 1876a2a266 Update README.txt 2015-05-17 14:10:38 -04:00
Scott Draves f67447a609 Update README.txt 2015-05-17 12:53:02 -04:00
Scott Draves 1252833105 increase version to 3.0.2, eliminate duplicated version string, rerun autoconf stuff 2015-05-16 14:27:59 -04:00
Scott Draves 035ab3d4e9 Merge pull request #8 from scottdraves/erik_dev
hsv_rgb_palette_blend implementation
2015-04-28 21:53:38 -04:00
EReckase cbc41cd4aa new parameter, hsv_rgb_palette_blend, which applies to hsv_circular palette interpolation only. 0 -> hsv, 1 -> rgb. 2015-04-27 20:48:50 -06:00
EReckase 7f69d64ebf still need to parse "hsv" mode from the input genome 2015-04-26 11:21:17 -06:00
Scott Draves 01f29fe20c Merge pull request #7 from scottdraves/erik_dev
switched to git version rather than subversion
2015-04-26 11:34:50 -04:00
EReckase 8d34fd4c01 added --dirty to indicate the compiled directory has changes that are not checked in 2015-04-12 09:25:34 -06:00
EReckase d52cd965e7 switched to git version rather than subversion 2015-04-12 09:19:17 -06:00
Scott Draves facfbd6292 fix typo and update constant with new name 2015-04-12 09:23:32 -04:00
Scott Draves 0eb68c545d Merge pull request #5 from EReckase/master
Short-way hue interpolation tweaks
2015-04-12 09:18:56 -04:00
EReckase 4242535339 changed to hsv_circular, now the default 2015-04-11 17:50:27 -06:00
EReckase d8fbddac62 still need to change interp mode to hsv_circular 2015-04-11 17:44:36 -06:00
13 changed files with 124 additions and 106 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
AUTOMAKE_OPTIONS = foreign no-dependencies AUTOMAKE_OPTIONS = foreign no-dependencies
SVN_DEF = -D'SVN_REV="$(shell svnversion -n .)"' GIT_DEF = -D'GIT_REV="$(shell git describe --tags --dirty)"'
AM_CFLAGS = -g -O3 -std=gnu99 -ffast-math -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" $(SVN_DEF) AM_CFLAGS = -g -O3 -std=gnu99 -ffast-math -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" $(GIT_DEF)
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
+2 -2
View File
@@ -359,8 +359,8 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign no-dependencies AUTOMAKE_OPTIONS = foreign no-dependencies
SVN_DEF = -D'SVN_REV="$(shell svnversion -n .)"' GIT_DEF = -D'GIT_REV="$(shell git describe --tags --dirty)"'
AM_CFLAGS = -g -O3 -std=gnu99 -ffast-math -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" $(SVN_DEF) AM_CFLAGS = -g -O3 -std=gnu99 -ffast-math -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" $(GIT_DEF)
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
man1_MANS = flam3-animate.man flam3-genome.man flam3-render.man flam3-convert.man man1_MANS = flam3-animate.man flam3-genome.man flam3-render.man flam3-convert.man
lib_LTLIBRARIES = libflam3.la lib_LTLIBRARIES = libflam3.la
+4
View File
@@ -315,6 +315,10 @@ todo: eliminate all static storage.
changelog: changelog:
5/17/15 Added hsv_circular and hsv_rgb_palette_blend. Improved
edit history of genetic algorithm (keep track of generation).
Add find_parents operator to flam3-genome. Release as 3.1.1.
12/29/10 Added --version option to flam3-genome. fixed bug in 16 bpc 12/29/10 Added --version option to flam3-genome. fixed bug in 16 bpc
png image writing when using strips. xform opacity now affects png image writing when using strips. xform opacity now affects
calculated width of density estimation filters. Release as 3.0.1. calculated width of density estimation filters. Release as 3.0.1.
Vendored
+1 -2
View File
@@ -573,8 +573,7 @@ to "yes", and re-run configure.
END END
AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
fi fi
fi fi])
])
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+1 -1
View File
@@ -84,7 +84,7 @@
#define TIME_WITH_SYS_TIME 1 #define TIME_WITH_SYS_TIME 1
/* Version number of package */ /* Version number of package */
#define VERSION "3.0.1" #define VERSION "3.1.1"
/* Define to empty if `const' does not conform to ANSI C. */ /* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */ /* #undef const */
Vendored
+15 -16
View File
@@ -2827,7 +2827,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE=flam3 PACKAGE=flam3
VERSION="3.0.1" VERSION="3.1.1"
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
@@ -2922,7 +2922,6 @@ fi
# Save CFLAGS from the environment # Save CFLAGS from the environment
save_CFLAGS=$CFLAGS save_CFLAGS=$CFLAGS
@@ -4711,13 +4710,13 @@ if ${lt_cv_nm_interface+:} false; then :
else else
lt_cv_nm_interface="BSD nm" lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext echo "int some_variable = 0;" > conftest.$ac_ext
(eval echo "\"\$as_me:4714: $ac_compile\"" >&5) (eval echo "\"\$as_me:4713: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err) (eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5 cat conftest.err >&5
(eval echo "\"\$as_me:4717: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval echo "\"\$as_me:4716: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5 cat conftest.err >&5
(eval echo "\"\$as_me:4720: output\"" >&5) (eval echo "\"\$as_me:4719: output\"" >&5)
cat conftest.out >&5 cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin" lt_cv_nm_interface="MS dumpbin"
@@ -5923,7 +5922,7 @@ ia64-*-hpux*)
;; ;;
*-*-irix6*) *-*-irix6*)
# Find out which ABI we are using. # Find out which ABI we are using.
echo '#line 5926 "configure"' > conftest.$ac_ext echo '#line 5925 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5 (eval $ac_compile) 2>&5
ac_status=$? ac_status=$?
@@ -7422,11 +7421,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7425: $lt_compile\"" >&5) (eval echo "\"\$as_me:7424: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:7429: \$? = $ac_status" >&5 echo "$as_me:7428: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output. # So say no if there are warnings other than the usual output.
@@ -7761,11 +7760,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7764: $lt_compile\"" >&5) (eval echo "\"\$as_me:7763: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:7768: \$? = $ac_status" >&5 echo "$as_me:7767: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output. # So say no if there are warnings other than the usual output.
@@ -7866,11 +7865,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7869: $lt_compile\"" >&5) (eval echo "\"\$as_me:7868: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err) (eval "$lt_compile" 2>out/conftest.err)
ac_status=$? ac_status=$?
cat out/conftest.err >&5 cat out/conftest.err >&5
echo "$as_me:7873: \$? = $ac_status" >&5 echo "$as_me:7872: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext if (exit $ac_status) && test -s out/conftest2.$ac_objext
then then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
@@ -7921,11 +7920,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7924: $lt_compile\"" >&5) (eval echo "\"\$as_me:7923: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err) (eval "$lt_compile" 2>out/conftest.err)
ac_status=$? ac_status=$?
cat out/conftest.err >&5 cat out/conftest.err >&5
echo "$as_me:7928: \$? = $ac_status" >&5 echo "$as_me:7927: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext if (exit $ac_status) && test -s out/conftest2.$ac_objext
then then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
@@ -10305,7 +10304,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 10308 "configure" #line 10307 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@@ -10401,7 +10400,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 10404 "configure" #line 10403 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
+1 -1
View File
@@ -5,7 +5,7 @@ AC_INIT(flam3-animate.c)
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(config.h)
AC_ARG_ENABLE(pthread, [ --enable-pthread compile FLAM3 with threads enabled (default=yes)]) AC_ARG_ENABLE(pthread, [ --enable-pthread compile FLAM3 with threads enabled (default=yes)])
AC_ARG_ENABLE(atomic_ops, [ --enable-atomic-ops compile FLAM3 with atom ops enabled (default=yes, independently checks for 32 and 64 bit sizes)]) AC_ARG_ENABLE(atomic_ops, [ --enable-atomic-ops compile FLAM3 with atom ops enabled (default=yes, independently checks for 32 and 64 bit sizes)])
AM_INIT_AUTOMAKE(flam3,"3.0.1") AM_INIT_AUTOMAKE(flam3,"3.1.1")
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
+3 -1
View File
@@ -39,6 +39,7 @@ void test_cp(flam3_genome *cp) {
cp->time = 0.0; cp->time = 0.0;
cp->interpolation = flam3_interpolation_linear; cp->interpolation = flam3_interpolation_linear;
cp->palette_interpolation = flam3_palette_interpolation_hsv; cp->palette_interpolation = flam3_palette_interpolation_hsv;
cp->hsv_rgb_palette_blend = 0.0;
cp->background[0] = 0.0; cp->background[0] = 0.0;
cp->background[1] = 0.0; cp->background[1] = 0.0;
cp->background[2] = 0.0; cp->background[2] = 0.0;
@@ -248,7 +249,8 @@ void spin(int frame, double blend, flam3_genome *parent, flam3_genome *templ)
/* Set genome parameters accordingly */ /* Set genome parameters accordingly */
result->time = (double)frame; result->time = (double)frame;
result->interpolation = flam3_interpolation_linear; result->interpolation = flam3_interpolation_linear;
result->palette_interpolation = flam3_palette_interpolation_hsv; result->palette_interpolation = flam3_palette_interpolation_hsv_circular;
result->hsv_rgb_palette_blend = 0.0;
/* Force linear interpolation - unsure if this is still necessary */ /* Force linear interpolation - unsure if this is still necessary */
/* I believe we put this in so that older clients could render frames */ /* I believe we put this in so that older clients could render frames */
+18 -8
View File
@@ -61,8 +61,8 @@
char *flam3_version() { char *flam3_version() {
if (strcmp(SVN_REV, "exported")) if (strcmp(GIT_REV, ""))
return flam3_os "-" VERSION "." SVN_REV; return flam3_os "-" GIT_REV;
return flam3_os "-" VERSION; return flam3_os "-" VERSION;
} }
@@ -480,7 +480,7 @@ flam3_genome *sheep_edge(flam3_genome *cp, double blend, int seqflag, double sta
flam3_rotate(&spun[0], blend*360.0, spun[0].interpolation_type); flam3_rotate(&spun[0], blend*360.0, spun[0].interpolation_type);
flam3_rotate(&spun[1], blend*360.0, spun[0].interpolation_type); flam3_rotate(&spun[1], blend*360.0, spun[0].interpolation_type);
fprintf(stderr, "xyzzy %d %d\n", spun[0].palette_interpolation, spun[1].palette_interpolation); //fprintf(stderr, "xyzzy %d %d\n", spun[0].palette_interpolation, spun[1].palette_interpolation);
/* Now call the interpolation */ /* Now call the interpolation */
if (argi("unsmoother",0) == 0) if (argi("unsmoother",0) == 0)
@@ -785,7 +785,8 @@ void flam3_interpolate(flam3_genome cps[], int ncps,
result->time = time; result->time = time;
result->interpolation = flam3_interpolation_linear; result->interpolation = flam3_interpolation_linear;
result->interpolation_type = cpi[0].interpolation_type; result->interpolation_type = cpi[0].interpolation_type;
result->palette_interpolation = flam3_palette_interpolation_hsv; result->palette_interpolation = flam3_palette_interpolation_hsv_circular;
result->hsv_rgb_palette_blend = 0.0;
if (!smoothflag) { if (!smoothflag) {
flam3_interpolate_n(result, 2, cpi, c, stagger); flam3_interpolate_n(result, 2, cpi, c, stagger);
@@ -1281,7 +1282,8 @@ void clear_cp(flam3_genome *cp, int default_flag) {
cp->rotate = 0.0; cp->rotate = 0.0;
cp->pixels_per_unit = 50; cp->pixels_per_unit = 50;
cp->interpolation = flam3_interpolation_linear; cp->interpolation = flam3_interpolation_linear;
cp->palette_interpolation = flam3_palette_interpolation_hsv; cp->palette_interpolation = flam3_palette_interpolation_hsv_circular;
cp->hsv_rgb_palette_blend = 0.0;
cp->genome_index = 0; cp->genome_index = 0;
memset(cp->parent_fname,0,flam3_parent_fn_len); memset(cp->parent_fname,0,flam3_parent_fn_len);
@@ -1618,6 +1620,8 @@ void flam3_apply_template(flam3_genome *cp, flam3_genome *templ) {
cp->palette_mode = templ->palette_mode; cp->palette_mode = templ->palette_mode;
if (templ->palette_interpolation >= 0) if (templ->palette_interpolation >= 0)
cp->palette_interpolation = templ->palette_interpolation; cp->palette_interpolation = templ->palette_interpolation;
if (templ->hsv_rgb_palette_blend >= 0)
cp->hsv_rgb_palette_blend = templ->hsv_rgb_palette_blend;
} }
@@ -1785,8 +1789,13 @@ void flam3_print(FILE *f, flam3_genome *cp, char *extra_attributes, int print_ed
fprintf(f, " palette_interpolation=\"sweep\""); fprintf(f, " palette_interpolation=\"sweep\"");
else if (flam3_palette_interpolation_rgb == cp->palette_interpolation) else if (flam3_palette_interpolation_rgb == cp->palette_interpolation)
fprintf(f, " palette_interpolation=\"rgb\""); fprintf(f, " palette_interpolation=\"rgb\"");
else if (flam3_palette_interpolation_hsv2 == cp->palette_interpolation) else if (flam3_palette_interpolation_hsv == cp->palette_interpolation)
fprintf(f, " palette_interpolation=\"hsv2\""); fprintf(f, " palette_interpolation=\"hsv\"");
else if (flam3_palette_interpolation_hsv_circular == cp->palette_interpolation) {
fprintf(f, " palette_interpolation=\"hsv_circular\"");
if (cp->hsv_rgb_palette_blend > 0.0)
fprintf(f, " hsv_rgb_palette_blend=\"%g\"", cp->hsv_rgb_palette_blend);
}
if (extra_attributes) if (extra_attributes)
fprintf(f, " %s", extra_attributes); fprintf(f, " %s", extra_attributes);
@@ -3087,7 +3096,8 @@ void flam3_random(flam3_genome *cp, int *ivars, int ivars_n, int sym, int spec_x
fprintf(stderr,"error getting palette from xml file, setting to all white\n"); fprintf(stderr,"error getting palette from xml file, setting to all white\n");
cp->time = 0.0; cp->time = 0.0;
cp->interpolation = flam3_interpolation_linear; cp->interpolation = flam3_interpolation_linear;
cp->palette_interpolation = flam3_palette_interpolation_hsv; cp->palette_interpolation = flam3_palette_interpolation_hsv_circular;
cp->hsv_rgb_palette_blend = 0.0;
/* Choose the number of xforms */ /* Choose the number of xforms */
if (spec_xforms>0) { if (spec_xforms>0) {
+2 -1
View File
@@ -75,7 +75,7 @@ extern char *flam3_variation_names[];
#define flam3_palette_interpolation_hsv 0 #define flam3_palette_interpolation_hsv 0
#define flam3_palette_interpolation_sweep 1 #define flam3_palette_interpolation_sweep 1
#define flam3_palette_interpolation_rgb 2 #define flam3_palette_interpolation_rgb 2
#define flam3_palette_interpolation_hsv2 3 #define flam3_palette_interpolation_hsv_circular 3
#define flam3_max_action_length 10000 #define flam3_max_action_length 10000
@@ -453,6 +453,7 @@ typedef struct {
int interpolation; int interpolation;
int interpolation_type; int interpolation_type;
int palette_interpolation; int palette_interpolation;
double hsv_rgb_palette_blend;
int num_xforms; int num_xforms;
int final_xform_index; int final_xform_index;
int final_xform_enable; int final_xform_enable;
+63 -62
View File
@@ -172,13 +172,15 @@ void interpolate_cmap(flam3_palette cmap, double blend,
t[4] = p1[i].index; t[4] = p1[i].index;
/* take the shorter way around the hue circle */ /* take the shorter way around the hue circle */
if (0 == i) { // if (0 == i) {
fprintf(stderr, "xxx interpolating between hues, %g %g\n", s[0], t[0]); // fprintf(stderr, "xxx interpolating between hues, %g %g\n", s[0], t[0]);
} // }
if ((s[0] - t[0]) > 3.0)
/* Correct the first hue to go the short way around */
if ((s[0] - t[0]) > 3.0) /* first hue much bigger than second hue */
s[0] -= 6.0;
if ((s[0] - t[0]) < -3.0) /* first hue much smaller than second hue */
s[0] += 6.0; s[0] += 6.0;
if ((t[0] - s[0]) > 3.0)
t[0] += 6.0;
for (j = 0; j < 5; j++) for (j = 0; j < 5; j++)
t[j] = ((1.0-blend) * s[j]) + (blend * t[j]); t[j] = ((1.0-blend) * s[j]) + (blend * t[j]);
@@ -370,77 +372,75 @@ double get_stagger_coef(double t, double stagger_prc, int num_xforms, int this_x
and have final xform in the same slot) */ and have final xform in the same slot) */
void flam3_interpolate_n(flam3_genome *result, int ncp, void flam3_interpolate_n(flam3_genome *result, int ncp,
flam3_genome *cpi, double *c, double stagger) { flam3_genome *cpi, double *c, double stagger) {
int i, j, k, numstd; int i, j, k, l, numstd;
fprintf(stderr, "xxx pi=%d\n", cpi[0].palette_interpolation);
if (flam3_palette_interpolation_sweep != cpi[0].palette_interpolation) { if (flam3_palette_interpolation_sweep != cpi[0].palette_interpolation) {
/* rgb, hsv or hsv_circular modes. */
double rgb_fraction = 0.0; /* Assume that we are in plain hsv mode */
if (flam3_palette_interpolation_rgb == cpi[0].palette_interpolation)
rgb_fraction = 1.0; /* All RGB output */
else if (flam3_palette_interpolation_hsv_circular == cpi[0].palette_interpolation)
rgb_fraction = cpi[0].hsv_rgb_palette_blend;
for (i = 0; i < 256; i++) { for (i = 0; i < 256; i++) {
double t[3], s[5]; double col_rgb[3], col_hsv[3];
double new_rgb[3] = {0, 0, 0};
double new_hsv[3] = {0, 0, 0};
double new_count = 0, new_index = 0;
int alpha1 = 1; int alpha1 = 1;
s[0] = s[1] = s[2] = s[3] = s[4] = 0.0; /* Loop over each control point's color at this index */
for (k = 0; k < ncp; k++) { for (k = 0; k < ncp; k++) {
if (i == 0) {
fprintf(stderr, "ncp=%d, k=%d\n", ncp, k); /* Convert to hsv */
fprintf(stderr, "rgb=%g %g %g\n", cpi[k].palette[i].color[0], cpi[k].palette[i].color[1], cpi[k].palette[i].color[2]); rgb2hsv(cpi[k].palette[i].color, col_hsv);
}
if (flam3_palette_interpolation_rgb != cpi[0].palette_interpolation) /* Store the rgb */
rgb2hsv(cpi[k].palette[i].color, t); for (l = 0; l < 3; l++)
else { col_rgb[l] = cpi[k].palette[i].color[l];
int l;
for (l = 0; l < 3; l++) if (2 == ncp && k == 0 && cpi[0].palette_interpolation == flam3_palette_interpolation_hsv_circular) {
t[l] = cpi[k].palette[i].color[l]; /* only adjust the first coordinate based on the other control point's hue */
} double second_color[3];
if (i == 0) { rgb2hsv(cpi[1].palette[i].color, second_color);
fprintf(stderr, "hsv=%g %g %g\n", t[0], t[1], t[2]);
/* Adjust the hue so that we go the shorter direction around the circle */
if ((second_color[0] - col_hsv[0]) > 3.0) {
col_hsv[0] += 6.0;
} else if ((second_color[0] - col_hsv[0]) < -3.0) {
col_hsv[0] -= 6.0;
}
} }
if (2 == ncp && cpi[0].palette_interpolation == flam3_palette_interpolation_hsv2) { for (j = 0; j < 3; j++) {
/* should also support blending between rgb and hsv, new_rgb[j] += c[k] * col_rgb[j];
and change the color of the cut, so we can keep new_hsv[j] += c[k] * col_hsv[j];
a dominant color but control what it is. */ }
double z[3];
rgb2hsv(cpi[1-k].palette[i].color, z); /* Compute the other two components of the color (count and index) */
if ((z[0] - t[0]) > 3.0) t[0] += 6.0; new_count += c[k] * cpi[k].palette[i].color[3];
if (i == 0)
fprintf(stderr, "adjusted %g %g\n", z[0], t[0]);
}
for (j = 0; j < 3; j++)
s[j] += c[k] * t[j];
s[3] += c[k] * cpi[k].palette[i].color[3];
if (cpi[k].palette[i].color[3] != 1.0) if (cpi[k].palette[i].color[3] != 1.0)
alpha1 = 0; alpha1 = 0;
s[4] += c[k] * cpi[k].palette[i].index; new_index += c[k] * cpi[k].palette[i].index;
} }
if (alpha1 == 1) if (alpha1 == 1)
s[3] = 1.0; new_count = 1.0;
if (i == 0) /* Convert the new hsv coord to back rgb */
fprintf(stderr, "s0=%g\n", s[0]); double new_hsv_rgb[3];
hsv2rgb(new_hsv, new_hsv_rgb);
if (flam3_palette_interpolation_rgb != cpi[0].palette_interpolation)
hsv2rgb(s, result->palette[i].color);
else {
int l;
for (l = 0; l < 3; l++)
result->palette[i].color[l] = s[l];
}
result->palette[i].color[3] = s[3];
result->palette[i].index = s[4];
if (i == 0) /* Store the interpolated color in the new palette */
fprintf(stderr, "result rgb=%g %g %g\n", for (l = 0; l < 3; l++)
result->palette[0].color[0], result->palette[i].color[l] = rgb_fraction * new_rgb[l] + (1.0-rgb_fraction) * new_hsv_rgb[l];
result->palette[0].color[1],
result->palette[0].color[2]); result->palette[i].color[3] = new_count;
result->palette[i].index = new_index;
/* Clip the new color appropriately */
for (j = 0; j < 4; j++) { for (j = 0; j < 4; j++) {
if (result->palette[i].color[j] < 0.0) if (result->palette[i].color[j] < 0.0)
result->palette[i].color[j] = 0.0; result->palette[i].color[j] = 0.0;
@@ -469,6 +469,7 @@ void flam3_interpolate_n(flam3_genome *result, int ncp,
result->interpolation_type = cpi[0].interpolation_type; result->interpolation_type = cpi[0].interpolation_type;
result->palette_interpolation = cpi[0].palette_interpolation; result->palette_interpolation = cpi[0].palette_interpolation;
result->hsv_rgb_palette_blend = cpi[0].hsv_rgb_palette_blend;
INTERP(brightness); INTERP(brightness);
INTERP(contrast); INTERP(contrast);
INTERP(highlight_power); INTERP(highlight_power);
+8 -8
View File
@@ -1,8 +1,8 @@
#! /bin/bash #! /bin/bash
# libtool - Provide generalized library-building support services. # libtool - Provide generalized library-building support services.
# Generated automatically by config.status (flam3) 3.0.1 # Generated automatically by config.status (flam3) 3.1.1
# Libtool was configured on host prometheus: # Libtool was configured on host localhost:
# NOTE: Changes made to this file will be lost: look at ltmain.sh. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
# #
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -56,12 +56,12 @@ fast_install=needless
# The host system. # The host system.
host_alias= host_alias=
host=x86_64-unknown-linux-gnu host=i686-pc-linux-gnu
host_os=linux-gnu host_os=linux-gnu
# The build system. # The build system.
build_alias= build_alias=
build=x86_64-unknown-linux-gnu build=i686-pc-linux-gnu
build_os=linux-gnu build_os=linux-gnu
# A sed program that does not truncate output. # A sed program that does not truncate output.
@@ -86,7 +86,7 @@ NM="/usr/bin/nm -B"
LN_S="ln -s" LN_S="ln -s"
# What is the maximum length of a command? # What is the maximum length of a command?
max_cmd_len=1572864 max_cmd_len=805306365
# Object file suffix (normally "o"). # Object file suffix (normally "o").
objext=o objext=o
@@ -234,10 +234,10 @@ finish_eval=""
hardcode_into_libs=yes hardcode_into_libs=yes
# Compile-time system search path for libraries. # Compile-time system search path for libraries.
sys_lib_search_path_spec="/usr/lib/gcc/x86_64-linux-gnu/4.9 /usr/lib/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib" sys_lib_search_path_spec="/usr/lib/gcc/i686-linux-gnu/4.8 /usr/lib/i386-linux-gnu /usr/lib /lib/i386-linux-gnu /lib"
# Run-time system search path for libraries. # Run-time system search path for libraries.
sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/x86_64-linux-gnu/libfakeroot /lib/i386-linux-gnu /usr/lib/i386-linux-gnu /lib/i686-linux-gnu /usr/lib/i686-linux-gnu /usr/lib/i386-linux-gnu/mesa /usr/local/lib /lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/mesa-egl /usr/lib/x86_64-linux-gnu/mesa /usr/lib/x86_64-linux-gnu/mir/client8driver/mesa /lib32 /usr/lib32 " sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/i386-linux-gnu/libfakeroot /usr/lib/i386-linux-gnu/mesa /lib/i386-linux-gnu /usr/lib/i386-linux-gnu /lib/i686-linux-gnu /usr/lib/i686-linux-gnu /usr/local/lib "
# Whether dlopen is supported. # Whether dlopen is supported.
dlopen_support=unknown dlopen_support=unknown
@@ -254,7 +254,7 @@ striplib="strip --strip-unneeded"
# The linker used to build libraries. # The linker used to build libraries.
LD="/usr/bin/ld -m elf_x86_64" LD="/usr/bin/ld"
# Commands used to build an old-style archive. # Commands used to build an old-style archive.
old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib" old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
+4 -2
View File
@@ -332,6 +332,8 @@ int parse_flame_element(xmlNode *flame_node, flam3_genome *loc_current_cp) {
/* Compare attribute names */ /* Compare attribute names */
if (!xmlStrcmp(cur_att->name, (const xmlChar *)"time")) { if (!xmlStrcmp(cur_att->name, (const xmlChar *)"time")) {
cp->time = flam3_atof(att_str); cp->time = flam3_atof(att_str);
} else if (!xmlStrcmp(cur_att->name, (const xmlChar *)"hsv_rgb_palette_blend")) {
cp->hsv_rgb_palette_blend = flam3_atof(att_str);
} else if (!xmlStrcmp(cur_att->name, (const xmlChar *)"interpolation")) { } else if (!xmlStrcmp(cur_att->name, (const xmlChar *)"interpolation")) {
if (!strcmp("linear", att_str)) { if (!strcmp("linear", att_str)) {
cp->interpolation = flam3_interpolation_linear; cp->interpolation = flam3_interpolation_linear;
@@ -345,8 +347,8 @@ int parse_flame_element(xmlNode *flame_node, flam3_genome *loc_current_cp) {
cp->palette_interpolation = flam3_palette_interpolation_hsv; cp->palette_interpolation = flam3_palette_interpolation_hsv;
} else if (!strcmp("sweep", att_str)) { } else if (!strcmp("sweep", att_str)) {
cp->palette_interpolation = flam3_palette_interpolation_sweep; cp->palette_interpolation = flam3_palette_interpolation_sweep;
} else if (!strcmp("hsv2", att_str)) { } else if (!strcmp("hsv_circular", att_str)) {
cp->palette_interpolation = flam3_palette_interpolation_hsv2; cp->palette_interpolation = flam3_palette_interpolation_hsv_circular;
} else if (!strcmp("rgb", att_str)) { } else if (!strcmp("rgb", att_str)) {
cp->palette_interpolation = flam3_palette_interpolation_rgb; cp->palette_interpolation = flam3_palette_interpolation_rgb;
} else { } else {