evolvotron-0.8.1/ 0000755 0001750 0001750 00000000000 14376735121 012412 5 ustar karl karl evolvotron-0.8.1/tools/ 0000755 0001750 0001750 00000000000 14376735121 013552 5 ustar karl karl evolvotron-0.8.1/tools/license/ 0000755 0001750 0001750 00000000000 14376735121 015174 5 ustar karl karl evolvotron-0.8.1/tools/license/stripheader 0000755 0001750 0001750 00000000434 14376735121 017435 0 ustar karl karl #!/bin/bash
# Used this to remove old header style before using headache
for f in `find ../.. -name '*.cpp' -o -name '*.h'` ; do cat $f | awk '{if (go) print $0;if ($0=="*********************************************************************/") go=1;}' > $f.tmp ; mv $f.tmp $f ; done
evolvotron-0.8.1/tools/license/config 0000644 0001750 0001750 00000000174 14376735121 016366 0 ustar karl karl # C/CPP source
".*\\.[ch]" -> frame open:"/*" line:"*" close:"*/"
| ".*\\.cpp" -> frame open:"/*" line:"*" close:"*/"
evolvotron-0.8.1/tools/license/boilerplate 0000644 0001750 0001750 00000001227 14376735121 017423 0 ustar karl karl Copyright 2012 Tim Day
This file is part of Evolvotron
Evolvotron is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Evolvotron is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Evolvotron. If not, see .
evolvotron-0.8.1/tools/license/apply 0000755 0001750 0001750 00000000210 14376735121 016240 0 ustar karl karl #!/bin/bash
# Run this here to update license on all files
headache -c config -h boilerplate `find ../.. -name '*.cpp' -o -name '*.h'`
evolvotron-0.8.1/text_to_markup.py 0000755 0001750 0001750 00000014642 14376735121 016043 0 ustar karl karl #!/usr/bin/env python2
# Convert Tim-style text to html or qml
#
# The Rules:
# - Lines with all upper case words to h2 or h3 capwords depending on next line underlining (first to h1/title though)
# (must be 3 chars or more)
# (todo: relax to not all upper case... no need to capwords if not)
# - Other text to p, blank lines break a p
# - Lines beginning with "- " (NB space) to ul/li (bulleted)
# - Lines beginning with "-?" (no space) to ul/li (?) with
at end of first line
# - Words delim to xxx
# "$ " at start of line indicates one line of code (add
too)
import sys
import string
import re
def line_of_dashes(n):
r=""
for i in xrange(n):
r+="-"
return r
def line_of_equals(n):
r=""
for i in xrange(n):
r+="="
return r
class TextToMarkup:
def __init__(self,m,s):
self.startup=1 # True
self.scope_p=0 # False
self.scope_ul=0 # False
self.scope_li=0 # False
self.done_title=0 # False
self.skipnextline=0 # False
self.mode=m
self.stringify=s
def dispose(self,l):
if self.stringify:
self.output.write("\"") # Actually, they should all have been "-ed anyway
for c in l:
if c=="\"":
self.output.write("\\\"")
else:
self.output.write(c)
self.output.write("\\n\"\n")
else:
self.output.write(l+"\n")
def process_word(self,w):
r=""
if len(w)<3: # Special case allows "<" or "<>" without turning italic
for i in xrange(len(w)):
if w[i]=="<":
r+="<"
elif w[i]==">":
r+=">"
else:
r+=w[i]
else:
for i in xrange(len(w)):
if w[i]=="<":
r+=""
elif w[i]==">":
r+=""
elif w[i]=='"':
r+="""
elif w[i]=="&":
r+="&"
else:
r+=w[i]
return r
def process_paragraph_text(self,txt):
is_code=0 # False
specialbreak=0 # False
r=" "
if txt[0]=="-":
if txt[1]==" ":
txt=txt[2:]
else:
specialbreak=1 # True
if self.scope_ul and self.scope_li:
r+=""
self.scope_li=0 # False
if not self.scope_ul:
r+=""
self.scope_ul=1 # True
if not self.scope_li:
r+="- "
self.scope_li=1 # True
elif txt[0]=="$":
is_code=1 # True
r+="
"
txt=txt[2:]
for w in txt.split():
r+=self.process_word(w)
r+=" "
if is_code:
r+="
"
if specialbreak:
r+="
"
return r
def process(self,in_stream,out_stream):
self.output=out_stream
self.input=in_stream
if self.mode=="html":
self.dispose("")
while 1: # True
if self.startup:
self.currline_raw=in_stream.readline()
self.nextline_raw=in_stream.readline()
self.startup=0 # False
else:
self.currline_raw=self.nextline_raw
self.nextline_raw=in_stream.readline()
if not self.currline_raw:
break
if self.skipnextline:
self.skipnextline=0 # False
continue
# Should track last line too
self.currline=self.currline_raw.strip()
self.nextline=self.nextline_raw.strip()
if len(self.currline)>2 and self.nextline==line_of_equals(len(self.currline)):
if self.done_title:
self.dispose(""+string.capwords(self.currline)+"
")
self.skipnextline=1 # True
continue
else:
if (self.mode=="html"):
self.dispose("")
self.dispose("")
self.dispose(""+string.capwords(self.currline)+"")
self.dispose("")
self.dispose("")
elif (self.mode=="qml"):
self.dispose("")
self.dispose(""+string.capwords(self.currline)+"
")
self.done_title=1 # True
self.skipnextline=1 # True
continue
elif len(self.currline)>2 and self.nextline==line_of_dashes(len(self.currline)):
self.dispose(""+string.capwords(self.currline)+"
")
self.skipnextline=1 # True
continue
elif self.scope_p:
if (len(self.currline)):
self.dispose(self.process_paragraph_text(self.currline))
else:
if self.scope_li:
self.dispose(" ")
self.scope_li=0 # False
if self.scope_ul:
self.dispose("
")
self.scope_ul=0 # False
self.dispose("
")
self.scope_p=0 # False
elif len(self.currline):
self.dispose("")
self.dispose(self.process_paragraph_text(self.currline))
self.scope_p=1 # True
else:
self.dispose("")
if self.mode=="html":
self.dispose("")
self.dispose("")
#########################################
if __name__=='__main__':
mode=None
stringify=0 # False
for i in xrange(1,len(sys.argv)):
if sys.argv[i]=="-qml":
mode="qml"
if sys.argv[i]=="-html":
mode="html"
elif sys.argv[i]=="-s":
stringify=1 # True
t2m=TextToMarkup(mode,stringify) # "html" and "qml" are alternatives. Should be stringify option.
t2m.process(sys.stdin,sys.stdout)
evolvotron-0.8.1/text_to_markup.b 0000755 0001750 0001750 00000011074 14376735121 015630 0 ustar karl karl #!/usr/bin/boron
/*
Convert Tim-style text to html or qml
The Rules:
- Lines with all upper case words to h2 or h3 capwords depending on next
line underlining (first to h1/title though)
(must be 3 chars or more)
(todo: relax to not all upper case... no need to capwords if not)
- Other text to p, blank lines break a p
- Lines beginning with "- " (NB space) to ul/li (bulleted)
- Lines beginning with "-?" (no space) to ul/li (?) with
at end of
first line
- Words delim to xxx
"$ " at start of line indicates one line of code (add
too)
*/
line_of_dashes: func [n] [
slice "----------------------------------------" n
]
line_of_equals: func [n] [
slice "========================================" n
]
emit: :print
emit-stringify: func [text] [
prin '"' ; Actually, they should all have been quoted anyway.
prin construct text ['"' {\"}]
print {\n"}
]
process_word: func [w] [
either lt? size? w 3 [
; Special case allows "<" or "<>" without turning italic
construct w ['<' "<" '>' ">"]
][
construct w ['<' "" '>' "" '"' """ '&' "&"]
]
]
scope_p:
scope_ul:
scope_li: none
process_paragraph_text: func [txt /extern scope_ul scope_li] [
is_code: specialbreak: false
r: copy " "
switch first txt [
'-' [
either eq? ' ' second txt [
txt: skip txt 2
][
specialbreak: true
]
if all [scope_ul scope_li] [
append r ""
scope_li: false
]
ifn scope_ul [
append r ""
scope_ul: true
]
ifn scope_li [
append r "- "
scope_li: true
]
]
'$' [
is_code: true
append r "
"
txt: skip txt 2
]
]
append r process_word txt
;foreach w txt.split() [appair r process_word w ' ']
if is_code [append r "
"]
if specialbreak [append r "
"]
r
]
capwords: func [text] [
text: lowercase text
poke text 1 uppercase first text
parse text [some[
thru ' ' tok: (poke tok 1 uppercase first tok)
]]
text
]
;----------------------------------------
input: none
mode: 'html
forall args [
switch first args [
"-qml" [mode: 'qml]
"-html" [mode: 'html]
"-s" [emit: :emit-stringify]
[input: first args]
]
]
ifn input [error "No document specified."]
input: read/text input
read-line: does [
either eol: find input '^/' [
++ eol
input0: slice input eol
input: eol
trim input0
] none
]
if eq? mode 'html [
emit ""
]
currline: read-line
nextline: read-line
done_title: none
skipnextline: false
while [currline] [
line-len: size? currline
case [
all [gt? line-len 2 eq? nextline line_of_equals line-len] [
either done_title [
emit rejoin ["" capwords currline "
"]
skipnextline: true
][
switch mode [
'html [
emit ""
emit ""
emit rejoin [
"" capwords currline ""
]
emit ""
emit ""
]
'qml [
emit rejoin [""]
]
]
emit rejoin ["" capwords currline "
"]
done_title: true
skipnextline: true
]
]
all [gt? line-len 2 eq? nextline line_of_dashes line-len] [
emit rejoin ["" capwords currline "
"]
skipnextline: true
]
scope_p [
either not empty? currline [
emit process_paragraph_text currline
][
if scope_li [
emit " "
scope_li: false
]
if scope_ul [
emit "
"
scope_ul: false
]
emit "
"
scope_p: false
]
]
not empty? currline [
emit ""
emit process_paragraph_text currline
scope_p: true
]
true [
emit ""
]
]
if skipnextline [
skipnextline: false
nextline: read-line
]
currline: nextline
nextline: read-line
]
if eq? mode 'html [
emit ""
emit ""
]
evolvotron-0.8.1/sourceforge/ 0000755 0001750 0001750 00000000000 14376735121 014735 5 ustar karl karl evolvotron-0.8.1/sourceforge/README.md 0000644 0001750 0001750 00000001576 14376735121 016225 0 ustar karl karl Notes
=====
Source tarball
--------------
Source releases are in .tar.gz files and unpack to
an unversioned evolvotron/ directory.
- Note that the configure file provided is *not* autotools
based, but is a script invoking qmake.
- See the evolvotron/README file build re build dependencies and
setup of QTDIR environment
Debian-world packages
---------------------
For some (not all) releases, prebuilt .deb packages for a variety
of systems are created to sanity-check packaging feasibility
(currently using the "yada" tool). If a release folder on SourceForge's
file hosting doesn't include .debs, look back through the immediately
preceeding releases for one.
These .debs provided as they may be useful to some, but most users
should prefer their distributions' "offical" packaging where one
exists.
[See also.](http://www.bottlenose.demon.co.uk/share/evolvotron/download.htm)
evolvotron-0.8.1/project.b 0000644 0001750 0001750 00000001551 14376735121 014225 0 ustar karl karl sources_cpp: func [path /local it] [
files: read path
remove-each it files [ne? %.cpp skip tail it -4]
sources_from path files
]
application: does [
include_from [%libfunction %libevolvotron]
libs_from %. [%evolvotron %function]
unix [libs %boost_program_options]
win32 [libs %boost_program_options-x64]
qt [widgets]
]
default [
cxxflags "-std=c++11"
]
lib %function [
include_from %libfunction
sources_cpp %libfunction
]
lib %evolvotron [
qt/no-link [widgets]
include_from [%libfunction %libevolvotron]
sources_cpp %libevolvotron
]
exe %evolv [
application
sources [%evolvotron/icons.qrc]
sources_cpp %evolvotron
win32 [sources [%dist/app.rc]]
]
exe %evolv_mutate [
application
sources_cpp %evolvotron_mutate
]
exe %evolv_render [
application
sources_cpp %evolvotron_render
]
evolvotron-0.8.1/mktgz 0000755 0001750 0001750 00000000405 14376735121 013473 0 ustar karl karl #!/bin/bash
# Execute this to package up evolvotron as a .tar.gz
VER=`./VERSION`
APP_DIR=$PWD
# Clone into a temporary directory to get a clean project.
cd /tmp
git clone $APP_DIR evolvotron-$VER
tar czf evolvotron-$VER.tar.gz --exclude .git evolvotron-$VER
evolvotron-0.8.1/mkdoc 0000755 0001750 0001750 00000000061 14376735121 013432 0 ustar karl karl #!/bin/sh -v
mkdir -p doc
doxygen doxygen.cfg
evolvotron-0.8.1/mkdeb 0000755 0001750 0001750 00000006773 14376735121 013437 0 ustar karl karl #!/bin/bash
# Before using this you probably need to install
# sudo pbuilder yada devscripts lintian cdebootstrap
# and maybe dpkg-sig. Also:
# set up for sudo
# set up pbuilder's /etc/pbuilderrc (maybe no attention needed these days)
# sudo pbuilder create --distribution squeeze
# and/or update with
# sudo pbuilder update
# Expect a lot of warnings re LOGNAME - see Debian bug Bug#275118
# TODO: DEBEMAIL
VER=`./VERSION`
TARBALL=evolvotron-${VER}.tar.gz
if [ ! -s ${TARBALL} ] ; then
echo "Could't find ${TARBALL}" ;
exit ;
fi
export DISTRIBUTION=`lsb_release -s -c`
echo "*** Will package ${TARBALL} for distribution \"${DISTRIBUTION}\""
echo -n "*** Starting in 5 seconds..."
for t in 5 4 3 2 1 ; do sleep 1 ; echo -n "." ; done
PROJECT=`echo $TARBALL | sed 's/-.*//'`
TARBALLORIG="${PROJECT}_${VER}.orig.tar.gz"
REV="1${DISTRIBUTION}1"
WORKDIR=pkg_${VER}-${REV}
rm -r -f ${WORKDIR}
mkdir ${WORKDIR}
cd ${WORKDIR}
cp ../${TARBALL} ${TARBALLORIG}
tar xvfz ${TARBALLORIG}
mv ${PROJECT} ${PROJECT}-${VER}
cd ${PROJECT}-${VER}
sed -i "s/${VER}/${VER}-${REV}/g" VERSION
mkdir debian
dch --create --package evolvotron --distribution stable --newversion ${VER}-${REV} "Created by mkdeb script"
cat << EOF > debian/packages
Source: evolvotron
Section: graphics
Priority: extra
Maintainer: Tim Day
Standards-Version: 3.6.1
Upstream-Source:
Home-Page:
Description: Interactive evolutionary texture generator
Copyright: GPL
Copyright 2009 Tim Day
Build-Depends: qt4-qmake,qt4-dev-tools,libqt4-dev,libqt4-xml,libboost-dev,libboost-program-options-dev,yada
Build: sh
export QTDIR=/usr/share/qt4
# Note: yada install deals with DEB_BUILD_OPTIONS 'nostrip'
if [ "${DEB_BUILD_OPTIONS#*noopt}" != "$DEB_BUILD_OPTIONS" ]; then
./configure "CONFIG -= release" "CONFIG += debug"
else
./configure # No noticeable advantage in overriding qt optimisation options
fi
make
Clean: sh
make distclean || make clean || true
Package: evolvotron
Architecture: any
Depends: []
Suggests: gimp
Description: Interactive evolutionary texture generator
A "generative art" application to evolve images/textures/patterns through an
iterative process of random mutation and user-selection driven evolution.
If you like lava lamps, and never got bored with the Mandelbrot Set,
this could be the software for you.
Install: sh
yada install -bin evolvotron/evolvotron
yada install -bin evolvotron_mutate/evolvotron_mutate
yada install -bin evolvotron_render/evolvotron_render
yada install -bin evolvotron/evolvotron
yada install -doc evolvotron.html
yada install -doc BUGS TODO NEWS USAGE
yada install -man man/man1/evolvotron.1
yada install -man man/man1/evolvotron_mutate.1
yada install -man man/man1/evolvotron_render.1
Menu: ?package(evolvotron): needs="X11" section="Applications/Graphics" title="Evolvotron" hints="Bitmap" command="/usr/bin/evolvotron" longtitle="Evolutionary art program"
EOF
yada rebuild
cd ..
dpkg-source -b ${PROJECT}-${VER} ${TARBALLORIG}
# Alternative but inferior approach is apparently to do
# dpkg-buildpackage -rfakeroot
mkdir result
echo "Building package"
sudo pbuilder build --allow-untrusted --buildresult ./result ${PROJECT}_${VER}-${REV}.dsc
sudo chown ${USER}:${USER} result/*
RESULT=`(cd .. ; find ${WORKDIR} -name '*.deb')`
echo "Results: ${RESULT}"
echo "Don't forget to lintian ${RESULT}"
echo 'Also dpkg-sig --sign builder -k $DPKGSIG_KEYID any .deb files'
evolvotron-0.8.1/man/ 0000755 0001750 0001750 00000000000 14376735121 013165 5 ustar karl karl evolvotron-0.8.1/man/man1/ 0000755 0001750 0001750 00000000000 14376735121 014021 5 ustar karl karl evolvotron-0.8.1/man/man1/evolvotron_render.1 0000644 0001750 0001750 00000004177 14376735121 017670 0 ustar karl karl .TH EVOLVOTRON_RENDER 1 "16 Oct 2009" "www.timday.com" "Evolvotron"
.SH NAME
evolvotron_render \- Render an evolvotron function tree to an image.
.SH SYNOPSIS
evolvotron_render
[options]
.I imagefile.[png|ppm]
.SH DESCRIPTION
.B evolvotron_render
reads an evolvotron image function from its
standard input and renders it to an image in the file specified
(suffix determines type, defaults to ppm if not recognised).
Image functions can be obtained by saving them from the
evolvotron application, or using evolvotron_mutate.
See the evolvotron manual (accessible from the evolvotron
application's Help menu) for more information on image functions.
.SH COMMAND-LINE OPTIONS
.TP 0.5i
.B \-f, \-\-frames
.I frames
Generates multi-frame animations. .fnnnnnn is inserted into
the specified filename (before the filetype suffix, if any).
You can use this on functions which weren't evolved in animation mode,
but there's no guarantee they have any interesting time/z variation.
.TP 0.5i
.B \-h, \-\-help
Display a summary of command-line options and exit.
.TP 0.5i
.B \-j, \-\-jitter
Enable sample jittering.
.TP 0.5i
.B \-m, \-\-multisample
.I multisample
Enables antialiased rendering.
This specifies the size of the sub-pixel sampling grid,
so 1 provides the default one-sample-per-pixel behaviour,
while 4 provides 16 samples per pixel on a 4x4 grid.
Unlike the main evolvotron application, there is no upper limit,
but of course rendering time increases as the square of this number.
.TP 0.5i
.B \-o, \-\-output
.I imagefile.[ppm|png]
This option is an alternative to specifying the output filename as a positional argument.
.TP 0.5i
.B \-s, \-\-size
.I widthxheight
Specify resolution of output image.
Defaults to 512x512.
.TP 0.5i
.B \-v, \-\-verbose
Verbose mode; useful for monitoring progress of large renders.
.SH EXAMPLES
evolvotron_mutate \-g | evolvotron_render \-s 1024x1024 function.ppm
.SH AUTHOR
.B evolvotron_render
was written by Tim Day (www.timday.com) and is released
under the conditions of the GNU General Public License.
See the file LICENSE supplied with the source code for details.
.SH SEE ALSO
evolvotron(1), evolvotron_mutate(1)
evolvotron-0.8.1/man/man1/evolvotron_mutate.1 0000644 0001750 0001750 00000003221 14376735121 017675 0 ustar karl karl .TH EVOLVOTRON_MUTATE 1 "16 Oct 2009" "www.timday.com" "Evolvotron"
.SH NAME
evolvotron_mutate \- Render an evolvotron function tree to an image.
.SH SYNOPSIS
evolvotron_mutate
< function_in.xml
> function_out.xml
evolvotron_mutate
\-g
> function_out.xml
.SH DESCRIPTION
.B evolvotron_mutate
either mutates an existing image function read from standard input,
or (with the \-g option) creates a new image function.
In either case the output image function is written to standard output.
The mutation parameters and function weightings are the same as used
by
.B evolvotron
in its default reset state.
See the evolvotron user manual (accessible from the evolvotron
application's Help menu) for more information on image functions.
.SH COMMANDLINE OPTIONS
.TP 0.5i
.B \-g, \-\-genesis
Specifies that no function should be read from standard input.
The output function is created at random.
.TP 0.5i
.B \-h, \-\-help
Display information on command line arguments and exit.
.TP 0.5i
.B \-l, \-\-linear
Created functions (if they are rendered as animations) will sweep z linearly (rather than sinusoidally).
.TP 0.5i
.B \-p, \-\-spheremap
Created functions will be tagged as spheremaps.
.TP 0.5i
.B \-v, \-\-verbose
Enables some additional logging to standard error.
.SH EXAMPLES
evolvotron_mutate \-g | tee function0.xml | evolvotron_render function0.ppm
evolvtron_mutate < function0.xml > function1.xml
.SH AUTHOR
.B evolvotron_mutate
was written by Tim Day (www.timday.com) and is released
under the conditions of the GNU General Public License.
See the file LICENSE supplied with the source code for details.
.SH SEE ALSO
evolvotron(1), evolvotron_render(1)
evolvotron-0.8.1/man/man1/evolvotron.1 0000644 0001750 0001750 00000012771 14376735121 016330 0 ustar karl karl .TH EVOLVOTRON 1 "16 Oct 2009" "www.timday.com" "Evolvotron"
.SH NAME
evolvotron \- Creates generative art by an interactive evolutionary process.
.SH SYNOPSIS
evolvotron
[Qt options]
[options]
.SH DESCRIPTION
.B evolvotron
is interactive "generative art" software to evolve
images/textures/patterns through an iterative process of random
mutation and user-selection driven evolution.
Basically it displays a grid of random images; you click
on one you like and the rest of the grid is refilled with
variants of the one you picked.
This man page describes only the command line options.
A more complete manual fully describing usage via the application's GUI
is accessible from the application's "Help" menu once it is running.
.SH GENERAL OPTIONS
.TP 0.5i
.B \-a, \-\-autocool
Enable autocooling by default.
.TP 0.5i
.B \-F, \-\-fullscreen
Start in "fullscreen" mode (window manager permitting).
[Press "Esc" key to revert to normal windowed mode].
.TP 0.5i
.B \-g, \-\-grid
.I colsxrows
Number of columns in image display grid (defaults to 5x6).
.TP 0.5i
.B \-h, \-\-help
Display a summary of command-line options and exit.
.TP 0.5i
.B \-j, \-\-jitter
Enable sample jittering.
.TP 0.5i
.B \-m, \-\-multisample
.I multisample
Enables antialiased rendering.
Valid values are 1,2,3,4.
This specifies the size of the sub-pixel sampling grid,
so 1 provides the default one-sample-per-pixel behaviour,
while 4 provides 16 samples per pixel on a 4x4 grid.
.TP
.B \-M, \-\-menuhide
Start with menu and status bars suppressed.
[Press "Esc" key to display them].
.TP 0.5i
.B \-p, \-spheremap
Create spheremaps instead of planar textures.
NB The middle-mouse adjustments will not behave as expected in this mode.
.TP 0.5i
.B \-S, \-\-startup
.I filename
Specify a function file to be loaded on startup.
This option can be used multiple times, and any positional arguments will also be interpreted as such.
Loaded functions are placed on the grid from left to right, top to bottom;
if multiple functions in excess of what is needed to fill the grid cells are provided, the extras will be ignored.
If the grid is not fully filled with startup functions, the remaining cells are filled at random normally.
Note that resetting the application will reload the specified function files again.
Also note that using this option multiple times has the potential to generate a lot of
loading error dialogs if e.g the path to all the files is wrong.
.TP 0.5i
.B \-U, \-\-shuffle
Use in conjunction with \-S / \-\-startup options, randomly shuffles the order the specified startup images are displayed in.
A fresh shuffle will be also be used when the application is reset.
.SH ANIMATION OPTIONS
.TP 0.5i
.B \-f, \-\-frames
.I frames
Number of frames to animate (defaults to 1 i.e no animaton)
.TP 0.5i
.B \-l, \-\-linear
Vary z linearly with time rather than sinusoidally over animation period.
.TP 0.5i
.B \-s, \-\-fps
.I framerate
Specify rate at which animations are displayed
(as an integer number of frames per second).
Defaults to 8.
.SH POWER-USER / DEBUG OPTIONS
.TP 0.5i
.B \-D, \-\-debug
Debug mode.
Currently simply sets function weightings so virtually all function nodes are FunctionNoiseOneChannel.
This is really only useful to developers in conjunction with the \-F/\-u options.
.TP 0.5i
.B \-E, \-\-enlarement-threadpool
Use a separate thread pool for computing enlargements.
Using this option ensures computation of enlargements continue to make
some progress even while the main grid is being actively worked on.
However, this will be at the expense of main grid rendering performance.
Without this option, enlargements' final high-resolution renderings are
invariably lower priority than computation for images in the main grid.
See also the \-N option to control the priority of threads in this pool.
.TP 0.5i
.B \-n, \-\-nice
.I niceness
Niceness of compute threads relative to the main application thread (defaults to 4).
.TP 0.5i
.B \-N, \-\-Nice
.I niceness
Niceness (relative to the main application thread)
of compute threads dealing with enlargements (defaults to 8).
Only effective in conjunction with a separate enlargement threadool (\-\-E option).
.TP 0.5i
.I QtOptions
The Qt GUI system recognizes an number of additional options
(for example, standard X11 things like \-geometry x;
consult the Qt documentation for more information).
Note that these don't use the Gnu "double minus" option style
used for evolvotron options.
.TP 0.5i
.B \-t, \-\-threads
.I threads
Number of compute threads in a thread pool (defaults to number of CPUs)
.TP 0.5i
.B \-u, \-\-unwrapped
Use with the \-F option to stop the specified function from being wrapped by a random colouring and spatial transform node.
.TP 0.5i
.B \-v, \-\-verbose
Verbose mode.
Probably most useful for getting a list of supported
function names for use with the \-\-F option.
.TP 0.5i
.B \-x, \-\-favourite
.I functionname
Force a specific function type to be used at the top level of
all new image function trees (wrapped by random colour and
spatial transforms, unless the \-\-unwrapped option is also specified).
This can also be controlled from the "Favourite" dialog.
.SH EXAMPLES
evolvotron \-F FunctionSpiralLinear
evolvotron \-F FunctionKaleidoscope \-u
.SH AUTHOR
.B evolvotron
was written by Tim Day (www.timday.com) and is released
under the conditions of the GNU General Public License.
For further details see the application's "About" dialog
(accessible from the "Help" menu),
or the file LICENSE supplied with the source code.
.SH SEE ALSO
evolvotron_mutate(1), evolvotron_render(1)
evolvotron-0.8.1/main.pro 0000644 0001750 0001750 00000000307 14376735121 014060 0 ustar karl karl TEMPLATE = subdirs
# See https://wiki.qt.io/SUBDIRS_-_handling_dependencies re parallelisation.
CONFIG += ordered
SUBDIRS = libfunction libevolvotron evolvotron evolvotron_render evolvotron_mutate
evolvotron-0.8.1/libfunction/ 0000755 0001750 0001750 00000000000 14376735121 014726 5 ustar karl karl evolvotron-0.8.1/libfunction/xyz.h 0000644 0001750 0001750 00000016043 14376735121 015735 0 ustar karl karl /**************************************************************************/
/* Copyright 2012 Tim Day */
/* */
/* This file is part of Evolvotron */
/* */
/* Evolvotron is free software: you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation, either version 3 of the License, or */
/* (at your option) any later version. */
/* */
/* Evolvotron is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with Evolvotron. If not, see . */
/**************************************************************************/
/*! \file
\brief Interface for class XYZ.
*/
#ifndef _xyz_h_
#define _xyz_h_
#include "useful.h"
#include "xy.h"
class Random01;
//! Class to hold vectors in 3D cartesian co-ordinates.
/*! Direct access to the x,y,z members is not permitted.
*/
class XYZ
{
protected:
real _rep[3];
public:
//@{
//! Accessor.
real x() const
{
return _rep[0];
}
real y() const
{
return _rep[1];
}
real z() const
{
return _rep[2];
}
const XY xy() const
{
return XY(x(),y());
}
void x(real v)
{
_rep[0]=v;
}
void y(real v)
{
_rep[1]=v;
}
void z(real v)
{
_rep[2]=v;
}
//@}
//! Null constructor.
/*! NB The components are not cleared to zero.
*/
XYZ()
{}
//! Initialise from an XY and a z component.
XYZ(const XY& p,real vz)
{
_rep[0]=p.x();
_rep[1]=p.y();
_rep[2]=vz;
}
//! Initialise from separate components.
XYZ(real vx,real vy,real vz)
{
_rep[0]=vx;
_rep[1]=vy;
_rep[2]=vz;
}
//! Trivial destructor.
~XYZ()
{}
//! Subtract a vector
void operator-=(const XYZ& v)
{
_rep[0]-=v._rep[0];
_rep[1]-=v._rep[1];
_rep[2]-=v._rep[2];
}
//! Add a vector
void operator+=(const XYZ& v)
{
_rep[0]+=v._rep[0];
_rep[1]+=v._rep[1];
_rep[2]+=v._rep[2];
}
//! Multiply by scalar
void operator*=(real k)
{
_rep[0]*=k;
_rep[1]*=k;
_rep[2]*=k;
}
//! Divide by scalar.
/*! Implemented assuming one divide and three multiplies is faster than three divides.
*/
void operator/=(real k)
{
const real ik(1.0/k);
(*this)*=ik;
}
//! Assignment.
void assign(const XYZ& v)
{
x(v.x());
y(v.y());
z(v.z());
}
//! Negation.
const XYZ operator-() const
{
return XYZ(-x(),-y(),-z());
}
//! Return the square of the magnitude.
real magnitude2() const
{
return x()*x()+y()*y()+z()*z();
}
//! Return the magnitude.
real magnitude() const
{
return sqrt(magnitude2());
}
//! Returns sum of x, y and z components.
real sum_of_components() const
{
return x()+y()+z();
}
//! Return the vector normalised.
const XYZ normalised() const;
//! Normalise this vector.
void normalise();
//! Returns true if an origin centred cuboid with this vectors semi-axes contains the argument.
bool origin_centred_rect_contains(const XYZ& p) const
{
return (-x()<=p.x() && p.x()<=x() && -y()<=p.y() && p.y()<=y() && -z()<=p.z() && p.z()<=z());
}
//! Write the vector.
std::ostream& write(std::ostream&) const;
//! Helper for common case of creating an instance filled with a common value.
static const XYZ fill(real v)
{
return XYZ(v,v,v);
}
};
//! Cross product.
inline const XYZ operator*(const XYZ& a,const XYZ& b)
{
return XYZ(
a.y()*b.z()-a.z()*b.y(),
a.z()*b.x()-a.x()*b.z(),
a.x()*b.y()-a.y()*b.x()
);
}
//! Dot product.
/*! Perhaps a curious choice of operator but it works for me.
*/
inline real operator%(const XYZ& a,const XYZ& b)
{
return a.x()*b.x()+a.y()*b.y()+a.z()*b.z();
}
//! Vector addition.
inline const XYZ operator+(const XYZ& a,const XYZ& b)
{
return XYZ(a.x()+b.x(),a.y()+b.y(),a.z()+b.z());
}
//! Vector subtraction.
inline const XYZ operator-(const XYZ& a,const XYZ& b)
{
return XYZ(a.x()-b.x(),a.y()-b.y(),a.z()-b.z());
}
//! Multiplication by scalar.
inline const XYZ operator*(real k,const XYZ& v)
{
XYZ ret(v);
ret*=k;
return ret;
}
//! Multiplication by scalar.
inline const XYZ operator*(const XYZ& v,real k)
{
XYZ ret(v);
ret*=k;
return ret;
}
//! Division by scalar.
inline const XYZ operator/(const XYZ& v,real k)
{
return v*(1.0/k);
}
//! Modulus all components by 1.0
inline const XYZ modulusf(const XYZ& p)
{
return XYZ
(
modulusf(p.x(),1.0),
modulusf(p.y(),1.0),
modulusf(p.z(),1.0)
);
}
//! Componentwise modulus
inline const XYZ modulusf(const XYZ& p,const XYZ& q)
{
return XYZ
(
modulusf(p.x(),q.x()),
modulusf(p.y(),q.y()),
modulusf(p.z(),q.z())
);
}
/*! If magnitude is zero we return zero vector.
*/
inline const XYZ XYZ::normalised() const
{
const real m=magnitude();
return (m==0.0 ? XYZ(0.0,0.0,0.0) : (*this)/m);
}
inline void XYZ::normalise()
{
(*this)=normalised();
}
//! Stream output operator.
/*! Calls write().
*/
inline std::ostream& operator<<(std::ostream& out,const XYZ& v)
{
return v.write(out);
}
//! Generates a random point in the cube bounded by (0,0,0) and (1.0,1.0,1.0)
class RandomXYZInUnitCube : public XYZ
{
public:
//! Constructor.
RandomXYZInUnitCube(Random01&);
};
//! Generates random points in a recnangular box centred on the origin
class RandomXYZInBox : public XYZ
{
public:
//! Constructor.
RandomXYZInBox(Random01& rng,const XYZ& bounds);
};
//! Generates a random point in or on a unit-radius sphere centred on the origin.
class RandomXYZInSphere : public XYZ
{
public:
//! Constructor.
RandomXYZInSphere(Random01& rng,real radius);
};
//! Generates a random point on the surface of a unit-radius sphere
class RandomXYZSphereNormal : public XYZ
{
public:
//! Constructor.
RandomXYZSphereNormal(Random01& rng);
};
//! Generates a random point in or on an origin-centred ellipsoid with semi-axes of the specified size.
class RandomXYZInEllipsoid : public XYZ
{
public:
//! Constructor.
RandomXYZInEllipsoid(Random01& rng,const XYZ& axes);
};
//! Generates a random point in or on a disc in the XY plane of the specified radius.
class RandomXYZInXYDisc : public XYZ
{
public:
//! Constructor.
RandomXYZInXYDisc(Random01& rng,real radius);
};
#endif
evolvotron-0.8.1/libfunction/xyz.cpp 0000644 0001750 0001750 00000005702 14376735121 016270 0 ustar karl karl /**************************************************************************/
/* Copyright 2012 Tim Day */
/* */
/* This file is part of Evolvotron */
/* */
/* Evolvotron is free software: you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation, either version 3 of the License, or */
/* (at your option) any later version. */
/* */
/* Evolvotron is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with Evolvotron. If not, see . */
/**************************************************************************/
/*! \file
\brief Implementation for class XYZ.
*/
#include "xyz.h"
#include "random.h"
#include "xy.h"
/*! Outputs whitespace-separated co-ordinates.
*/
std::ostream& XYZ::write(std::ostream& out) const
{
return out << x() << " " << y() << " " << z();
}
RandomXYZInUnitCube::RandomXYZInUnitCube(Random01& rng)
:XYZ()
{
x(rng());
y(rng());
z(rng());
}
RandomXYZInBox::RandomXYZInBox(Random01& rng,const XYZ& bounds)
:XYZ()
{
x(-bounds.x()+2.0*bounds.x()*rng());
y(-bounds.y()+2.0*bounds.y()*rng());
z(-bounds.z()+2.0*bounds.z()*rng());
}
RandomXYZInSphere::RandomXYZInSphere(Random01& rng,real radius)
:XYZ(0.0,0.0,0.0)
{
if (radius!=0.0)
{
do
{
x(2.0*rng()-1.0);
y(2.0*rng()-1.0);
z(2.0*rng()-1.0);
}
while (magnitude2()>1.0);
(*this)*=radius;
}
}
RandomXYZSphereNormal::RandomXYZSphereNormal(Random01& rng)
:XYZ(0.0,0.0,0.0)
{
real m2;
do
{
assign(RandomXYZInSphere(rng,1.0));
m2=magnitude2();
}
while (m2==0.0);
(*this)/=sqrt(m2);
}
/*! Must handle case of individual axes being zero.
*/
RandomXYZInEllipsoid::RandomXYZInEllipsoid(Random01& rng,const XYZ& axes)
:XYZ()
{
do
{
assign(RandomXYZInBox(rng,axes));
}
while (
(axes.x()==0.0 ? 0.0 : sqr(x()/axes.x()))
+(axes.y()==0.0 ? 0.0 : sqr(y()/axes.y()))
+(axes.z()==0.0 ? 0.0 : sqr(z()/axes.z()))
>1.0
);
}
RandomXYZInXYDisc::RandomXYZInXYDisc(Random01& rng,real radius)
:XYZ(0.0,0.0,0.0)
{
if (radius!=0.0)
{
do
{
x(2.0*rng()-1.0);
y(2.0*rng()-1.0);
}
while (magnitude2()>1.0);
(*this)*=radius;
}
}
evolvotron-0.8.1/libfunction/xy.h 0000644 0001750 0001750 00000011364 14376735121 015544 0 ustar karl karl /**************************************************************************/
/* Copyright 2012 Tim Day */
/* */
/* This file is part of Evolvotron */
/* */
/* Evolvotron is free software: you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation, either version 3 of the License, or */
/* (at your option) any later version. */
/* */
/* Evolvotron is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with Evolvotron. If not, see . */
/**************************************************************************/
/*! \file
\brief Interface for class XY.
*/
#ifndef _xy_h_
#define _xy_h_
#include "useful.h"
//! Class to hold vectors in 2D cartesian co-ordinates.
/*! Direct access to the x,y members is not permitted.
*/
class XY
{
protected:
real _rep[2];
public:
//@{
//! Accessor.
real x() const
{
return _rep[0];
}
real y() const
{
return _rep[1];
}
void x(real v)
{
_rep[0]=v;
}
void y(real v)
{
_rep[1]=v;
}
//@}
//! Null constructor.
/*! NB The components are not cleared to zero.
*/
XY()
{}
//! Initialise from separate components.
XY(real vx,real vy)
{
_rep[0]=vx;
_rep[1]=vy;
}
//! Trivial destructor.
~XY()
{}
//! Subtract a vector
void operator-=(const XY& v)
{
_rep[0]-=v._rep[0];
_rep[1]-=v._rep[1];
}
//! Add a vector
void operator+=(const XY& v)
{
_rep[0]+=v._rep[0];
_rep[1]+=v._rep[1];
}
//! Multiply by scalar
void operator*=(real k)
{
_rep[0]*=k;
_rep[1]*=k;
}
//! Divide by scalar.
/*! Implemented assuming one divide and two multiplies is faster than two divides.
*/
void operator/=(real k)
{
const real ik(1.0/k);
(*this)*=ik;
}
//! Assignment.
void assign(const XY& v)
{
x(v.x());
y(v.y());
}
//! Negation.
const XY operator-() const
{
return XY(-x(),-y());
}
//! Return the square of the magnitude.
real magnitude2() const
{
return x()*x()+y()*y();
}
//! Return the magnitude.
real magnitude() const
{
return sqrt(magnitude2());
}
//! Returns sum of x and y components.
real sum_of_components() const
{
return x()+y();
}
//! Return the vector normalised.
const XY normalised() const;
//! Normalise this vector.
void normalise();
//! Returns true if an origin centred rectangle with this vectors' semi-axes contains the argument.
bool origin_centred_rect_contains(const XY& p) const
{
return (-x()<=p.x() && p.x()<=x() && -y()<=p.y() && p.y()<=y());
}
//! Write the vector.
std::ostream& write(std::ostream&) const;
//! Helper for common case of creating an instance filled with a common value.
static const XY fill(real v)
{
return XY(v,v);
}
};
//! Dot product.
/*! Perhaps a curious choice of operator but it works for me.
*/
inline real operator%(const XY& a,const XY& b)
{
return a.x()*b.x()+a.y()*b.y();
}
//! Vector addition.
inline const XY operator+(const XY& a,const XY& b)
{
return XY(a.x()+b.x(),a.y()+b.y());
}
//! Vector subtraction.
inline const XY operator-(const XY& a,const XY& b)
{
return XY(a.x()-b.x(),a.y()-b.y());
}
//! Multiplication by scalar.
inline const XY operator*(real k,const XY& v)
{
XY ret(v);
ret*=k;
return ret;
}
//! Multiplication by scalar.
inline const XY operator*(const XY& v,real k)
{
XY ret(v);
ret*=k;
return ret;
}
//! Division by scalar.
inline const XY operator/(const XY& v,real k)
{
return v*(1.0/k);
}
/*! If magnitude is zero we return zero vector.
*/
inline const XY XY::normalised() const
{
const real m=magnitude();
return (m==0.0 ? XY(0.0,0.0) : (*this)/m);
}
inline void XY::normalise()
{
(*this)=normalised();
}
//! Stream output operator.
/*! Calls write().
*/
inline std::ostream& operator<<(std::ostream& out,const XY& v)
{
return v.write(out);
}
#endif
evolvotron-0.8.1/libfunction/xy.cpp 0000644 0001750 0001750 00000003073 14376735121 016075 0 ustar karl karl /**************************************************************************/
/* Copyright 2012 Tim Day */
/* */
/* This file is part of Evolvotron */
/* */
/* Evolvotron is free software: you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation, either version 3 of the License, or */
/* (at your option) any later version. */
/* */
/* Evolvotron is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with Evolvotron. If not, see . */
/**************************************************************************/
/*! \file
\brief Implementation for class XY.
*/
#include "xy.h"
/*! Outputs whitespace-separated co-ordinates.
*/
std::ostream& XY::write(std::ostream& out) const
{
return out << x() << " " << y();
}
evolvotron-0.8.1/libfunction/useful.h 0000644 0001750 0001750 00000011706 14376735121 016407 0 ustar karl karl /**************************************************************************/
/* Copyright 2012 Tim Day */
/* */
/* This file is part of Evolvotron */
/* */
/* Evolvotron is free software: you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation, either version 3 of the License, or */
/* (at your option) any later version. */
/* */
/* Evolvotron is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with Evolvotron. If not, see . */
/**************************************************************************/
/*! \file
\brief File containing all the author's favourite little helpers.
*/
#ifndef _useful_h_
#define _useful_h_
#include
#include
#include
#define _USE_MATH_DEFINES
#include
#include
#include
#include
#include
#include
#include