Coder Social home page Coder Social logo

flam3's People

Contributors

ereckase avatar mossop avatar scottdraves avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flam3's Issues

Unsafe autotools symlinks in repository

While updating the Debian package I saw that there are some (absolute) symlinks in the repository.
This is bad for several reasons:

autotools can be instructed to copy the files instead of symlinking it. See autoreconf(1), but it would even better if you completly drop the generated files and let the user regenerate it using autoreconf. (usually projects provide a autogen.sh to do that). Autoreconf should be preferred anyway, as it is nice to distributions and porting to other architectures.

Thanks for considering!

New release?

Would it be possible to push an updated release on the releases/ subdirectory on github too? I know git clone works fine, but I am quite oldschool - I love stable releases.

Where are Windows binaries?

They're not included in the GitHub releases, they're not on the website, and there is no compile guide. The code layout looks pretty standard for Linux, but it's not clear how that applies to a Windows environment, if at all.

apt repository

Tracker/reminder for apt repository update which I believe is needed.

Tried installing qosmic and it depends on flam3_xform's mobius fields like mobius_re_d which apparently aren't available in the apt install flam3 but is obviously in the source code here.

Here's an example snippet from the failed build of qosmic:

src/flam3util.cpp: In member function ‘virtual double Util::xform_variable_accessor_mobius_im_d::get_var(flam3_xform*)’:
src/flam3util.cpp:255:33: error: ‘flam3_xform {aka struct xform}’ has no member named ‘mobius_im_d’
  create_xform_variable_accessor(mobius_im_d)
                                 ^
src/flam3util.cpp:103:54: note: in definition of macro ‘create_xform_variable_accessor’
   double get_var(flam3_xform* xform) { return xform->name; } \
                                                      ^

I'm a noob so please let me know if I'm missing something obvious here. I haven't traversed any svn for the project yet to see when mobius stuff was added. That type of source control is before my professional time. Also, is just flam3 as a standalone enough to use to produce some decent videos? I'm using qosmic because it looks like something that's clean and should work.

Trying to compile with MS Visual Studio 2017

Has anyone been able to compile flam3 with MS Visual Studio 2017? It seems the format of the project files used by VS has changed. When I tried to open the project, VS attempted to upgrade the format, but it didn't seem to work, saying one or more of the files were corrupted.

Maybe it would be easier to compile with Cygwin or MINGW, using the Linux makefile. Is there a recommended way to compile for Windows?

Thanks.

Compiling for Windows using Msys2

I'm trying to compile for Windows (Windows 7, SP1, 64-bit AMD processor) using Msys2, and I actually succeeded, but I had to make a manual change to the generated "Makefile". After installing a few libraries that were missing from Msys2 (png, xml, etc.), I was getting the following error:

C:/Apps/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ./.libs/libflam3.a(png.o): in function 'write_png': C:\Dropbox\C++\flam3-master/png.c:108: undefined reference to '__imp_htons'

After doing some research using Google, I discovered that I needed to add a switch (-lws2_32) to this line in the generated makefile:

LIBS = -ljpeg -lpthread -lxml2 -lpng -lz -lws2_32

After doing that, all four targets compiled and linked without any errors, but I'm trying to figure out what I need to change in "Makefile.am" to avoid having to manually edit the makefile. I tried adding the same switch to this line in "Makefile.am", but it didn't seem to help, even after going through all the steps in README.txt (libtoolize, aclocal, automake, autoconf, ./configure, and make):

libflam3_la_LDFLAGS = -no-undefined -ljpeg -lpng -lz -lpthread -lws2_32

I'm not very familiar with the GNU compile tools, so any advice would be appreciated. If I can get this working, I could upload a fix so others wouldn't have this issue.

Thanks.

hsv_circular forced?

test.flam3 has palette_interpolation="hsv", and it's not in frame.template, so why is the result circular?

sheep@localhost:~$ env template=frame.template rotate=test.flam3 flam3-genome | head
<pick version="FLAM3-LNX-v3.1.1">
<flame version="FLAM3-LNX-v3.1.1" time="-1" name="-1.000000" size="1280 720" center="-0.706636 -1.2852" scale="101.404" rotate="-1485.93" supersample="4" filter="1" filter_shape="gaussian" temporal_filter_type="box" temporal_filter_width="1.2" quality="2000" passes="1" temporal_samples="1000" background="0 0 0" brightness="40" gamma="4" highlight_power="1" vibrancy="1" estimator_radius="11" estimator_minimum="0" estimator_curve="0.6" gamma_threshold="0.01" palette_mode="linear" interpolation_type="linear" palette_interpolation="hsv_circular">
   <xform weight="0.951" color="0" color_speed="0.1" animate="0" linear="1" coefs="-0.156987 1.03957 -1.03283 -0.155969 0.546344 0.915205" opacity="1"/>
   <xform weight="0.102" color="1" color_speed="0.935" animate="1" disc="0.6" fisheye="0.5" coefs="54.5313 866.75 -866.75 54.5313 -4655.53 -2409.45" post="-2.47373 -0.257652 1.67525 -0.960895 -3.1701 -0.145936" opacity="1"/>
   <xform weight="1" color="0" color_speed="0.5" animate="1" julia="1" coefs="-0.661312 0.750111 -0.750111 -0.661312 0 0" opacity="1"/>
   <xform weight="0.5" color="1" color_speed="0.5" animate="1" linear="0.001" julian="0.552028" julian_power="200" julian_dist="5" coefs="0.073158 0.494622 -0.494622 0.073158 -0.386931 -0.548076" post="1 0 0 1 0.319327 0.119299" opacity="1"/>
   <xform weight="0.5" color="0" color_speed="0.5" animate="1" linear="1" coefs="1.91116 -0.12024 0.12024 1.91116 1.4977 -1.73891" post="0.054203 0 0 0.054203 -0.041426 -0.011715" opacity="1"/>
   <xform weight="0.5" color="1" color_speed="0.5" animate="1" spherical="1" coefs="2.09902 -0.132059 -0.132059 -2.09902 0.851611 -2.80615" post="0.054203 0 0 0.054203 -0.041426 -0.011715" opacity="1"/>
   <xform weight="0.5" color="0" color_speed="0.5" animate="1" linear="1" coefs="-1.94927 0.122637 -0.122637 -1.94927 -1.43956 -0.186071" post="0.054203 0 0 0.054203 -0.041426 -0.011715" opacity="1"/>
   <finalxform color="1" color_speed="0" linear="-0.632" spherical="1" coefs="1.25 0 0 1.25 0.068807 -0.104416" opacity="1"/>
sheep@localhost:~$ cat frame.template 
<flame interpolation_space="linear"/>
sheep@localhost:~$ head test.flam3 
<flame version="FLAM3-LNX-v3.1.1" time="0" name="electricsheep.247.02246" size="1280 720" center="-0.706636 -1.2852" scale="101.404" rotate="-1485.93" supersample="4" filter="1" filter_shape="gaussian" temporal_filter_type="box" temporal_filter_width="1.2" quality="2000" passes="1" temporal_samples="1000" background="0 0 0" brightness="40" gamma="4" highlight_power="1" vibrancy="1" estimator_radius="11" estimator_minimum="0" estimator_curve="0.6" gamma_threshold="0.01" palette_mode="linear" interpolation_type="log" palette_interpolation="hsv">
   <xform weight="0.951" color="0" color_speed="0.1" animate="0" linear="1" coefs="-0.156987 1.03957 -1.03283 -0.155969 0.546344 0.915205" opacity="1"/>
   <xform weight="0.102" color="1" color_speed="0.935" animate="1" disc="0.6" fisheye="0.5" coefs="0 868.464 -868.464 0 -4655.53 -2409.45" post="-2.47373 -0.257652 1.67525 -0.960895 -3.1701 -0.145936" opacity="1"/>
   <xform weight="1" color="0" color_speed="0.5" animate="1" julia="1" coefs="-0.707107 0.707107 -0.707107 -0.707107 0 0" opacity="1"/>
   <xform weight="0.5" color="1" color_speed="0.5" animate="1" linear="0.001" julian="0.552028" julian_power="200" julian_dist="5" coefs="0.041956 0.49824 -0.49824 0.041956 -0.386931 -0.548076" post="1 0 0 1 0.319327 0.119299" opacity="1"/>
   <xform weight="0.5" color="0" color_speed="0.5" animate="1" linear="1" coefs="1.91494 0 0 1.91494 1.4977 -1.73891" post="0.054203 0 0 0.054203 -0.041426 -0.011715" opacity="1"/>
   <xform weight="0.5" color="1" color_speed="0.5" animate="1" spherical="1" coefs="2.10317 0 0 -2.10317 0.851611 -2.80615" post="0.054203 0 0 0.054203 -0.041426 -0.011715" opacity="1"/>
   <xform weight="0.5" color="0" color_speed="0.5" animate="1" linear="1" coefs="-1.95312 0 0 -1.95312 -1.43956 -0.186071" post="0.054203 0 0 0.054203 -0.041426 -0.011715" opacity="1"/>
   <finalxform color="1" color_speed="0" linear="-0.632" spherical="1" coefs="1.25 0 0 1.25 0.068807 -0.104416" opacity="1"/>
   <color index="0" rgb="172 64 84"/>


Add more sample xml flames with images to distro

If you could add some additional sample flam3 files plus the image and video files they will produce - it would be helpful to compare whether the newly compiled generator is creating proper fractals.

Blatant ulterior motive is that for fun I'm working on an web version of the flame generator which uses SVG's to create the fractals client side and I would dearly like to be able to compare the output of my code with yours. The biggest issue I see is getting the random number generator to mesh with yours.

Since SVG is a specialized type of XML, I want to embed the flam3 file inside the SVG and then implement the logic using javascript[since SVG image files can include executable javascript].

Possible bug in flam3-genome

When you create an parameter file for an animation using flam3-genome with the following command line

env sequence=sheep-in.flam3 nframes=320 loops=0 flam3-genome > sheep-out.flam3

and sheep-in.flam3 contains just 2 flames to interpolate between and one or both contain a tag then the output for the first and/or last flame flame in the generated sequence in sheep-out.flam3 will contain the xforms that were added to provide the symmetry requested and also the symmetry tag again.

When you then try to render the animation you get rubbish because flam3-animate adds the xforms for the symmetry yet again for the first frame and will try to interpolate it away on the way to the 2nd image resulting in big smears in the first 2 image. Only from the the 3rd image on the results will be right.

Have I used flam3-genome in the wrong way? Or is there a bug in the program?

Possible bug in flam3_interpolate() when using smooth interpolation

This code in flam3_interpolate() appears to be buggy for two reasons:

       if (0 == i1) {
          fprintf(stderr, "error: cannot use smooth interpolation on first segment.\n");
          fprintf(stderr, "reverting to linear interpolation.\n");
          flam3_align(&cpi[0], &cps[i1], 2);
          smoothflag = 0;
       }

       if (ncps-1 == i2) {
          fprintf(stderr, "error: cannot use smooth interpolation on last segment.\n");
          fprintf(stderr, "reverting to linear interpolation.\n");
          flam3_align(&cpi[0], &cps[i1], 2);
          smoothflag = 0;
       }

       flam3_align(&cpi[0], &cps[i1-1], 4);
       smoothflag = 1;

If the code preceding the block shown has set i1 to 0, then it will call flam3_align() twice. Once in the first conditional, and again at the end. This could cause a crash on the second call because:

cps[i1-1]

Will be using an index of -1.

Worse, if ncps is 2 then this will call flam3_align() three times because the second block will be true, and then crash.

This will be the case when flam3_interpolate() is called from sheep_edge() since the spun array passed to it has two elements, and from flam3_cross() since the parents array also has two elements.

I believe the fix is to do the following:

if (0 == i1) 
{
          //...
}
else if (ncps-1 == i2)
{
         //...
}
else
{
       //...
}

Flaw in fusing of flame iteration

This code in flam3.c looks strange to me... what does it do?

  if (apply_xform(cp, fn, p, q, rc)>0) {
     consec ++;
     badvals ++;
     if (consec<5) {
        p[0] = q[0];
        p[1] = q[1];
        p[2] = q[2];
        p[3] = q[3];
        i -= 4;
        continue;
     } else
        consec = 0;
  } else
     consec = 0;

if you instead use something like this

if (apply_xform(cp, fn, p, q, rc)>0) {
consec = 0;
badvals ++;
p[0] = q[0];
p[1] = q[1];
p[2] = q[2];
p[3] = q[3];
i -= 4;
continue;
else if (consec < fuse)
consec++;
p[0] = q[0];
p[1] = q[1];
p[2] = q[2];
p[3] = q[3];
i -= 4; continue
}

this restarts the fuse process whenever a badvalue happened and we got back a random value... if we don't we get shadows of the square around the origin in the fractal. Compare the two images in

https://imgur.com/a/4WAxU

this is mostly invisible in normal flames... but it shows up quite often in very simple ones. I've appended the flame that was used to create those images

test91_cosh.flam3.txt

Unable to 'make' flam3

./configure runs successfully
I get this error upon running 'make':
CDPATH="${ZSH_VERSION+.}:" && cd . && aclocal-1.14 -I m4 /bin/bash: aclocal-1.14: command not found Makefile:424: recipe for target 'aclocal.m4' failed make: *** [aclocal.m4] Error 127

I'm running Ubuntu 17.10

Crashing on Ubuntu 14.04, 'filter' address wiped out after pthread joins

Compiling from source on Xubuntu 14.04, if -O3 is specified, code crashes with a segfault. Checking the address of the spatial filter storage before and after the pthread_join calls indicate that that address is changed from a valid location to 0x0. If all -O3 optimizations are used except -ftree-vectorize, code executes properly. -O2 works fine.

Inconsistent number of tries

Documentation states that the default for tries is 50.
tries 50 number of tries to make to find a good genome. (genome only)

But the default is coded as 10.
int ntries = argi("tries", 10);

make fails with aclocal-1.15

Running ./configure works, but then make fails with the following error:

ezio@Cantabury ~/Downloads/elsheep/flam3 $ make
CDPATH="${ZSH_VERSION+.}:" && cd . && aclocal-1.14 -I m4
/bin/bash: aclocal-1.14: command not found
Makefile:424: recipe for target 'aclocal.m4' failed
make: *** [aclocal.m4] Error 127

Changing am__api_version='1.15' in the configure script does not affect this.
I found this issue on Linux Mint 18.2.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.