mirror of
https://github.com/scottdraves/flam3.git
synced 2025-01-21 05:20:05 -05:00
Initial commit of early-clip branch of flam3 into google code.
git-svn-id: https://flam3.googlecode.com/svn/trunk@3 77852712-ef1d-11de-8684-7d64432d61a3
This commit is contained in:
parent
238395d551
commit
0b31b96c55
674
src/COPYING
Normal file
674
src/COPYING
Normal file
@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
674
src/COPYING.txt
Normal file
674
src/COPYING.txt
Normal file
@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
37
src/Makefile.am
Normal file
37
src/Makefile.am
Normal file
@ -0,0 +1,37 @@
|
||||
AUTOMAKE_OPTIONS = foreign no-dependencies
|
||||
|
||||
SVN_DEF = -D'SVN_REV="$(shell svnversion -n .)"'
|
||||
AM_CFLAGS = -g -O3 -std=gnu99 -ffast-math -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" $(SVN_DEF)
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
man1_MANS = flam3-animate.man flam3-genome.man flam3-render.man flam3-convert.man
|
||||
bin_PROGRAMS = flam3-animate flam3-genome flam3-render flam3-convert
|
||||
lib_LTLIBRARIES = libflam3.la
|
||||
include_HEADERS = flam3.h isaac.h isaacs.h
|
||||
|
||||
libflam3_la_SOURCES = flam3.c filters.c parser.c variations.c interpolation.c palettes.c jpeg.c png.c isaac.c
|
||||
libflam3_la_LDFLAGS = -no-undefined -ljpeg -lpng -lz -lpthread
|
||||
|
||||
flam3_genome_SOURCES = flam3-genome.c docstring.c
|
||||
flam3_genome_LDADD = libflam3.la -lm
|
||||
|
||||
flam3_animate_SOURCES = flam3-animate.c docstring.c
|
||||
flam3_animate_LDADD = libflam3.la -lm
|
||||
|
||||
flam3_render_SOURCES = flam3-render.c docstring.c
|
||||
flam3_render_LDADD = libflam3.la -lm
|
||||
|
||||
flam3_convert_SOURCES = flam3-convert.c docstring.c
|
||||
flam3_convert_LDADD = libflam3.la -lm
|
||||
|
||||
pkgdata_DATA = flam3-palettes.xml
|
||||
|
||||
EXTRA_DIST = rect.c flam3.h palettes.h variations.h interpolation.h parser.h \
|
||||
private.h isaac.h isaacs.h img.h test.flam3 vidres.flam3 \
|
||||
flam3.dsw render.dsp animate.dsp genome.dsp convert.dsp \
|
||||
mkinstalldirs README.txt COPYING.txt flam3-palettes.xml \
|
||||
flam3-animate.man flam3-render.man flam3-genome.man flam3-convert.man
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = flam3.pc
|
816
src/Makefile.in
Normal file
816
src/Makefile.in
Normal file
@ -0,0 +1,816 @@
|
||||
# Makefile.in generated by automake 1.10.2 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
|
||||
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
bin_PROGRAMS = flam3-animate$(EXEEXT) flam3-genome$(EXEEXT) \
|
||||
flam3-render$(EXEEXT) flam3-convert$(EXEEXT)
|
||||
subdir = .
|
||||
DIST_COMMON = $(am__configure_deps) $(include_HEADERS) \
|
||||
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(srcdir)/config.h.in $(srcdir)/flam3.pc.in \
|
||||
$(top_srcdir)/configure COPYING config.guess config.sub \
|
||||
install-sh ltmain.sh missing mkinstalldirs
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES = flam3.pc
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
|
||||
"$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgconfigdir)" \
|
||||
"$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(includedir)"
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
libflam3_la_LIBADD =
|
||||
am_libflam3_la_OBJECTS = flam3.lo filters.lo parser.lo variations.lo \
|
||||
interpolation.lo palettes.lo jpeg.lo png.lo isaac.lo
|
||||
libflam3_la_OBJECTS = $(am_libflam3_la_OBJECTS)
|
||||
libflam3_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(libflam3_la_LDFLAGS) $(LDFLAGS) -o $@
|
||||
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am_flam3_animate_OBJECTS = flam3-animate.$(OBJEXT) docstring.$(OBJEXT)
|
||||
flam3_animate_OBJECTS = $(am_flam3_animate_OBJECTS)
|
||||
flam3_animate_DEPENDENCIES = libflam3.la
|
||||
am_flam3_convert_OBJECTS = flam3-convert.$(OBJEXT) docstring.$(OBJEXT)
|
||||
flam3_convert_OBJECTS = $(am_flam3_convert_OBJECTS)
|
||||
flam3_convert_DEPENDENCIES = libflam3.la
|
||||
am_flam3_genome_OBJECTS = flam3-genome.$(OBJEXT) docstring.$(OBJEXT)
|
||||
flam3_genome_OBJECTS = $(am_flam3_genome_OBJECTS)
|
||||
flam3_genome_DEPENDENCIES = libflam3.la
|
||||
am_flam3_render_OBJECTS = flam3-render.$(OBJEXT) docstring.$(OBJEXT)
|
||||
flam3_render_OBJECTS = $(am_flam3_render_OBJECTS)
|
||||
flam3_render_DEPENDENCIES = libflam3.la
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@
|
||||
depcomp =
|
||||
am__depfiles_maybe =
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
SOURCES = $(libflam3_la_SOURCES) $(flam3_animate_SOURCES) \
|
||||
$(flam3_convert_SOURCES) $(flam3_genome_SOURCES) \
|
||||
$(flam3_render_SOURCES)
|
||||
DIST_SOURCES = $(libflam3_la_SOURCES) $(flam3_animate_SOURCES) \
|
||||
$(flam3_convert_SOURCES) $(flam3_genome_SOURCES) \
|
||||
$(flam3_render_SOURCES)
|
||||
man1dir = $(mandir)/man1
|
||||
NROFF = nroff
|
||||
MANS = $(man1_MANS)
|
||||
pkgconfigDATA_INSTALL = $(INSTALL_DATA)
|
||||
pkgdataDATA_INSTALL = $(INSTALL_DATA)
|
||||
DATA = $(pkgconfig_DATA) $(pkgdata_DATA)
|
||||
includeHEADERS_INSTALL = $(INSTALL_HEADER)
|
||||
HEADERS = $(include_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
XML2_CONFIG = @XML2_CONFIG@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
lt_ECHO = @lt_ECHO@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
AUTOMAKE_OPTIONS = foreign no-dependencies
|
||||
SVN_DEF = -D'SVN_REV="$(shell svnversion -n .)"'
|
||||
AM_CFLAGS = -g -O3 -std=gnu99 -ffast-math -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" $(SVN_DEF)
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
man1_MANS = flam3-animate.man flam3-genome.man flam3-render.man flam3-convert.man
|
||||
lib_LTLIBRARIES = libflam3.la
|
||||
include_HEADERS = flam3.h isaac.h isaacs.h
|
||||
libflam3_la_SOURCES = flam3.c filters.c parser.c variations.c interpolation.c palettes.c jpeg.c png.c isaac.c
|
||||
libflam3_la_LDFLAGS = -no-undefined -ljpeg -lpng -lz -lpthread
|
||||
flam3_genome_SOURCES = flam3-genome.c docstring.c
|
||||
flam3_genome_LDADD = libflam3.la -lm
|
||||
flam3_animate_SOURCES = flam3-animate.c docstring.c
|
||||
flam3_animate_LDADD = libflam3.la -lm
|
||||
flam3_render_SOURCES = flam3-render.c docstring.c
|
||||
flam3_render_LDADD = libflam3.la -lm
|
||||
flam3_convert_SOURCES = flam3-convert.c docstring.c
|
||||
flam3_convert_LDADD = libflam3.la -lm
|
||||
pkgdata_DATA = flam3-palettes.xml
|
||||
EXTRA_DIST = rect.c flam3.h palettes.h variations.h interpolation.h parser.h \
|
||||
private.h isaac.h isaacs.h img.h test.flam3 vidres.flam3 \
|
||||
flam3.dsw render.dsp animate.dsp genome.dsp convert.dsp \
|
||||
mkinstalldirs README.txt COPYING.txt flam3-palettes.xml \
|
||||
flam3-animate.man flam3-render.man flam3-genome.man flam3-convert.man
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = flam3.pc
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --foreign \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
|
||||
config.h: stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h1; \
|
||||
$(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
|
||||
else :; fi
|
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
$(srcdir)/config.h.in: $(am__configure_deps)
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
flam3.pc: $(top_builddir)/config.status $(srcdir)/flam3.pc.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
p=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
|
||||
done
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||
test "$$dir" != "$$p" || dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
libflam3.la: $(libflam3_la_OBJECTS) $(libflam3_la_DEPENDENCIES)
|
||||
$(libflam3_la_LINK) -rpath $(libdir) $(libflam3_la_OBJECTS) $(libflam3_la_LIBADD) $(LIBS)
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then \
|
||||
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(bindir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-binPROGRAMS:
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f $$p $$f"; \
|
||||
rm -f $$p $$f ; \
|
||||
done
|
||||
flam3-animate$(EXEEXT): $(flam3_animate_OBJECTS) $(flam3_animate_DEPENDENCIES)
|
||||
@rm -f flam3-animate$(EXEEXT)
|
||||
$(LINK) $(flam3_animate_OBJECTS) $(flam3_animate_LDADD) $(LIBS)
|
||||
flam3-convert$(EXEEXT): $(flam3_convert_OBJECTS) $(flam3_convert_DEPENDENCIES)
|
||||
@rm -f flam3-convert$(EXEEXT)
|
||||
$(LINK) $(flam3_convert_OBJECTS) $(flam3_convert_LDADD) $(LIBS)
|
||||
flam3-genome$(EXEEXT): $(flam3_genome_OBJECTS) $(flam3_genome_DEPENDENCIES)
|
||||
@rm -f flam3-genome$(EXEEXT)
|
||||
$(LINK) $(flam3_genome_OBJECTS) $(flam3_genome_LDADD) $(LIBS)
|
||||
flam3-render$(EXEEXT): $(flam3_render_OBJECTS) $(flam3_render_DEPENDENCIES)
|
||||
@rm -f flam3-render$(EXEEXT)
|
||||
$(LINK) $(flam3_render_OBJECTS) $(flam3_render_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
$(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool config.lt
|
||||
install-man1: $(man1_MANS) $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
|
||||
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
if test -f $$i; then file=$$i; \
|
||||
else file=$(srcdir)/$$i; fi; \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
case "$$ext" in \
|
||||
1*) ;; \
|
||||
*) ext='1' ;; \
|
||||
esac; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
|
||||
done
|
||||
uninstall-man1:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
case "$$ext" in \
|
||||
1*) ;; \
|
||||
*) ext='1' ;; \
|
||||
esac; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
|
||||
rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
|
||||
done
|
||||
install-pkgconfigDATA: $(pkgconfig_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
|
||||
@list='$(pkgconfig_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
|
||||
$(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-pkgconfigDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(pkgconfig_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
|
||||
done
|
||||
install-pkgdataDATA: $(pkgdata_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
|
||||
@list='$(pkgdata_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \
|
||||
$(pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-pkgdataDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(pkgdata_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
|
||||
done
|
||||
install-includeHEADERS: $(include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
|
||||
$(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-includeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(includedir)/$$f"; \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
test -d $(distdir) || mkdir $(distdir)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-lzma: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lzma*) \
|
||||
unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
distuninstallcheck:
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) $(DATA) $(HEADERS) \
|
||||
config.h
|
||||
install-binPROGRAMS: install-libLTLIBRARIES
|
||||
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(includedir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \
|
||||
clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-hdr distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-includeHEADERS install-man \
|
||||
install-pkgconfigDATA install-pkgdataDATA
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-exec-am: install-binPROGRAMS install-libLTLIBRARIES
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man: install-man1
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \
|
||||
uninstall-libLTLIBRARIES uninstall-man uninstall-pkgconfigDATA \
|
||||
uninstall-pkgdataDATA
|
||||
|
||||
uninstall-man: uninstall-man1
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
|
||||
clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \
|
||||
clean-libtool ctags dist dist-all dist-bzip2 dist-gzip \
|
||||
dist-lzma dist-shar dist-tarZ dist-zip distcheck distclean \
|
||||
distclean-compile distclean-generic distclean-hdr \
|
||||
distclean-libtool distclean-tags distcleancheck distdir \
|
||||
distuninstallcheck dvi dvi-am html html-am info info-am \
|
||||
install install-am install-binPROGRAMS install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am \
|
||||
install-includeHEADERS install-info install-info-am \
|
||||
install-libLTLIBRARIES install-man install-man1 install-pdf \
|
||||
install-pdf-am install-pkgconfigDATA install-pkgdataDATA \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am uninstall-binPROGRAMS \
|
||||
uninstall-includeHEADERS uninstall-libLTLIBRARIES \
|
||||
uninstall-man uninstall-man1 uninstall-pkgconfigDATA \
|
||||
uninstall-pkgdataDATA
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
820
src/README.txt
Normal file
820
src/README.txt
Normal file
@ -0,0 +1,820 @@
|
||||
FLAM3 - cosmic recursive fractal flames
|
||||
see the file COPYING for the license covering this software.
|
||||
|
||||
This is free software to render fractal flames as described on
|
||||
http://flam3.com. Flam3-animate makes animations, and flam3-render
|
||||
makes still images. Flam3-genome creates and manipulates genomes
|
||||
(parameter sets). A C library is also installed.
|
||||
|
||||
Note: the following instructions are written for Linux users. Windows
|
||||
users may install the cygwin package to get the "env" command or set
|
||||
the envars in your windows command prompt manually. That means
|
||||
instead of a command like
|
||||
|
||||
env dtime=5 prefix=foo. in=test.flame flam3-animate
|
||||
|
||||
say
|
||||
|
||||
set dtime=5
|
||||
set prefix=foo.
|
||||
set in=test.flame
|
||||
flam3-animate
|
||||
|
||||
As usual, to configure, build, and install:
|
||||
|
||||
./configure
|
||||
make
|
||||
sudo make install
|
||||
|
||||
This package depends on development packages for libz, libpng,
|
||||
libjpeg, and libxml2.
|
||||
|
||||
To test it, run
|
||||
|
||||
flam3-render < test.flam3
|
||||
|
||||
and it should produce 00000.jpg and 00001.jpg, one image for each
|
||||
<flame> element in the parameter file. To make an animation run
|
||||
|
||||
flam3-animate < test.flam3
|
||||
|
||||
and it should produce 100 files named 00000.jpg through 00099.jpg that
|
||||
interpolate between the two <flame> elements.
|
||||
|
||||
|
||||
envar default meaning
|
||||
===== ======= =======
|
||||
prefix (empty) prefix names of output files with this string.
|
||||
begin j time of first frame to render (j=first time in input file) (animate only)
|
||||
end n-1 time of last frame to render (n=last time specified in the input file) (animate only)
|
||||
time NA time of first and last frame (ie do one frame) (animate only)
|
||||
frame NA synonym for "time" (animate only)
|
||||
in stdin name of input file
|
||||
out NA name of output file (bad idea if rending more than one, use prefix instead)
|
||||
template NA apply defaults based on this genome (genome only)
|
||||
dtime 1 time between frames (animate only)
|
||||
fields 0 if 1 then render fields, ie odd scanlines at time+0.5
|
||||
nstrips 1 number of strips, ie render fractions of a frame at once (render only)
|
||||
qs 1 quality scale, multiply quality of all frames by this
|
||||
ss 1 size scale, multiply size (in pixels) of all frames by this
|
||||
jpeg NA jpeg quality for compression, default is native jpeg default
|
||||
format png "jpg" or "ppm" or "png"
|
||||
pixel_aspect 1.0 aspect ratio of pixels (width over height), eg 0.90909 for NTSC
|
||||
isaac_seed random string to be used in generating random seed. defaults to time(0)
|
||||
seed random integer seed for random numbers, defaults to time+pid. deprecated.
|
||||
nthreads auto number of threads to use (render and animate)
|
||||
verbose 0 if non-zero then print progress meter on stderr
|
||||
bits 33 also 32 or 64: sets bit-width of internal buffers (33 means 32-bit floating-point)
|
||||
bpc 8 bits per channel of color: only png supports 16 (render/animate)
|
||||
image filename replace palette with png, jpg, or ppm image
|
||||
use_vars -1 comma sep list of variation #'s to use when generating a random flame (genome only)
|
||||
dont_use_vars unset comma sep list of variation #'s to NOT use when generating a random flame. (genome only)
|
||||
cross0 NA randomly select one genome from this file to genetically cross (genome only)
|
||||
cross1 NA with one genome from this file (genome only)
|
||||
method NA method for genetic cross: alternate, interpolate, or union. (genome only)
|
||||
mutate NA randomly mutate a random genome from this file (genome only)
|
||||
symmetry NA set symmetry of result. (genome only)
|
||||
clone NA clone random flame in input (genome only)
|
||||
clone_all NA clones all flames in file. useful for applying template to all flames (genome only)
|
||||
animate NA interpolates between all flames in a file, using times specified in file (genome only)
|
||||
sequence NA 360 degree rotation 'loops' times of each control point plus rotating transitions (genome only)
|
||||
loops NA number of times to rotate each control point in sequence (genome only)
|
||||
tries 50 number of tries to make to find a good genome. (genome only)
|
||||
strip NA strip input, frame and nframes control which one. (genome only)
|
||||
transparency 0 make bknd transparent, if format supports it (render/animate)
|
||||
name_enable 0 use 'name' attr in <flame> to name image output if present (render only)
|
||||
nick "" nickname to use in <edit> tags / img comments
|
||||
url "" url to use in <edit> tags / img comments
|
||||
id "" ID to use in <edit> tags / img comments
|
||||
comment "" comment string for <edit> tags (genome only)
|
||||
use_mem auto floating point number of bytes of memory to use (render only)
|
||||
noedits unset omit edit tags from output (genome only)
|
||||
write_genome 0 write out genome associated with center of motion blur window (animate only)
|
||||
print_edit_depth 0 depth to truncate <edit> tag structure. 0 prints all <edit> tags (genome only)
|
||||
intpalette unset round palette entries for importing into older Apophysis versions (genome only)
|
||||
insert_palette unset insert the palette into the image.
|
||||
enable_jpeg_comments 1 enables comments in the jpeg header (render and animate)
|
||||
enable_png_comments 1 enables comments in the png header (render and animate)
|
||||
|
||||
New in 2.8:
|
||||
|
||||
earlyclip 0 enables the early clipping of rgb values for better antialiasing and resizing
|
||||
defaults to 0 for backwards compatibility
|
||||
flam27 0 flam3 2.7 compatibility mode; ensures generated genomes can be used by flam3 2.7.18
|
||||
stagger 0 affects simultaneity of xform interpolation during genome interpolation.
|
||||
represents how 'separate' the xforms are interpolated. set to 1 for each
|
||||
xform to be interpolated individually, fractions control interp overlap.
|
||||
|
||||
for example:
|
||||
|
||||
env dtime=5 prefix=foo. in=test.flam3 flam3-animate
|
||||
|
||||
means to render every 5th frame of parameter file foo.flam3, and store
|
||||
the results in files named foo.XXXX.jpg.
|
||||
|
||||
the flam3-convert program reads from stdin the old format created by
|
||||
the GIMP and writes to stdout the new xml format.
|
||||
|
||||
the flam3-genome program creates random parameter files. it also mutates,
|
||||
rotates, and interpolates existing parameter files. for example to
|
||||
create 10 wholly new control points and render them at normal quality:
|
||||
|
||||
env template=vidres.flam3 repeat=10 flam3-genome > new.flam3
|
||||
flam3-render < new.flam3
|
||||
|
||||
if you left out the "template=vidres.flam3" part then the size,
|
||||
quality, etc parameters would be their default (small) values. you
|
||||
can set the symmetry group:
|
||||
|
||||
env template=vidres.flam3 symmetry=3 flam3-genome > new3.flam3
|
||||
env template=vidres.flam3 symmetry=-2 flam3-genome > new-2.flam3
|
||||
flam3-render < new3.flam3
|
||||
flam3-render < new-2.flam3
|
||||
|
||||
Mutation is done by giving an input flame file to alter:
|
||||
|
||||
env template=vidres.flam3 flam3-genome > parent.flam3
|
||||
env prefix=parent. flam3-render < parent.flam3
|
||||
env template=vidres.flam3 mutate=parent.flam3 repeat=10 flam3-genome > mutation.flam3
|
||||
flam3-render < mutation.flam3
|
||||
|
||||
Normally one wouldn't use the same file for the template and the file
|
||||
to mutate. Crossover is handled similarly:
|
||||
|
||||
env template=vidres.flam3 flam3-genome > parent0.flam3
|
||||
env prefix=parent0. flam3-render < parent0.flam3
|
||||
env template=vidres.flam3 flam3-genome > parent1.flam3
|
||||
env prefix=parent1. flam3-render < parent1.flam3
|
||||
env template=vidres.flam3 cross0=parent0.flam3 cross1=parent1.flam3 flam3-genome > crossover.flam3
|
||||
flam3-render < crossover.flam3
|
||||
|
||||
flam3-genome has 3 ways to produce parameter files for animation in
|
||||
the style of electric sheep. the highest level and most useful from
|
||||
the command line is the sequence method. it takes a collection of
|
||||
control points and makes an animation that has each flame do fractal
|
||||
rotation for 360 degrees, then make a smooth transition to the next.
|
||||
for example:
|
||||
|
||||
env sequence=test.flam3 nframes=20 flam3-genome > seq.flam3
|
||||
flam3-animate < seq.flam3
|
||||
|
||||
creates and renders a 60 frame animation. there are two flames in
|
||||
test.flam3, so the animation consists three stages: the first one
|
||||
rotating, then a transition, then the second one rotating. each stage
|
||||
has 20 frames as specified on the command line. if you want to
|
||||
render only some fraction of a whole animation file, specify the begin
|
||||
and end times:
|
||||
|
||||
env begin=20 end=40 flam3-animate < seq.flam3
|
||||
|
||||
the other two methods are harder to use because they produce files that
|
||||
are only good for one frame of animation. the output consists of 3
|
||||
control points, one for the time requested, one before and one after.
|
||||
that allows proper motion blur. for example:
|
||||
|
||||
env template=vidres.flam3 flam3-genome > rotme.flam3
|
||||
env rotate=rotme.flam3 frame=10 nframes=20 flam3-genome > rot10.flam3
|
||||
env frame=10 flam3-animate < rot10.flam3
|
||||
|
||||
the file rot10.flam3 specifies the animation for just one frame, in
|
||||
this case 10 out of 20 frames in the complete animation. C1
|
||||
continuous electric sheep genetic crossfades are created like this:
|
||||
|
||||
env inter=test.flam3 frame=10 nframes=20 flam3-genome > inter10.flam3
|
||||
env frame=10 flam3-animate < inter10.flam3
|
||||
|
||||
see http://flam3.com/flame.pdf for descriptions & formulas, and
|
||||
see http://electricsheep.wikispaces.com/Variations for updates.
|
||||
|
||||
The complete list of variations:
|
||||
|
||||
0. linear
|
||||
1. sinusoidal
|
||||
2. spherical
|
||||
3. swirl
|
||||
4. horseshoe
|
||||
5. polar
|
||||
6. handkerchief
|
||||
7. heart
|
||||
8. disc
|
||||
9. spiral
|
||||
10. hyperbolic
|
||||
11. diamond
|
||||
12. ex
|
||||
13. julia
|
||||
14. bent
|
||||
15. waves
|
||||
16. fisheye
|
||||
17. popcorn
|
||||
18. exponential
|
||||
19. power
|
||||
20. cosine
|
||||
21. rings
|
||||
22. fan
|
||||
23. blob
|
||||
24. pdj
|
||||
25. fan2
|
||||
26. rings2
|
||||
27. eyefish
|
||||
28. bubble
|
||||
29. cylinder
|
||||
30. perspective
|
||||
31. noise
|
||||
32. julian
|
||||
33. juliascope
|
||||
34. blur
|
||||
35. gaussian_blur
|
||||
36. radial_blur
|
||||
37. pie
|
||||
38. ngon
|
||||
39. curl
|
||||
40. rectangles
|
||||
41. arch
|
||||
42. tangent
|
||||
43. square
|
||||
44. rays
|
||||
45. blade
|
||||
46. secant2
|
||||
47. twintrian
|
||||
48. cross
|
||||
49. disc2
|
||||
50. super_shape
|
||||
51. flower
|
||||
52. conic
|
||||
53. parabola
|
||||
54. bent2
|
||||
55. bipolar
|
||||
56. boarders
|
||||
57. butterfly
|
||||
58. cell
|
||||
59. cpow
|
||||
60. curve
|
||||
61. edisc
|
||||
62. elliptic
|
||||
63. escher
|
||||
64. foci
|
||||
65. lazysusan
|
||||
66. loonie
|
||||
67. pre_blur
|
||||
68. modulus
|
||||
69. oscilloscope
|
||||
70. polar2
|
||||
71. popcorn2
|
||||
72. scry
|
||||
73. separation
|
||||
74. split
|
||||
75. splits
|
||||
76. stripes
|
||||
77. wedge
|
||||
78. wedge_julia
|
||||
79. wedge_sph
|
||||
80. whorl
|
||||
81. waves2
|
||||
82. exp
|
||||
83. log
|
||||
84. sin
|
||||
85. cos
|
||||
86. tan
|
||||
87. sec
|
||||
88. csc
|
||||
89. cot
|
||||
90. sinh
|
||||
91. cosh
|
||||
92. tanh
|
||||
93. sech
|
||||
94. csch
|
||||
95. coth
|
||||
96. auger
|
||||
|
||||
see http://flam3.com/flame.pdf for descriptions & formulas for each of
|
||||
these. note that, by default, if a random flame is requested and neither
|
||||
'use_vars' or 'dont_use_vars' are specified, the following variations are
|
||||
not used: noise, blur, gaussian_blur, radial_blur, ngon, square, rays,
|
||||
and cross.
|
||||
|
||||
note: these variations do not use the variation weight to scale their
|
||||
contributions, and so will not be implemented in flam3:
|
||||
circlize
|
||||
|
||||
|
||||
======================================
|
||||
|
||||
todo: eliminate all static storage.
|
||||
|
||||
======================================
|
||||
|
||||
changelog:
|
||||
|
||||
12/20/09 Highlight power now interpolates smoothly from old behavior
|
||||
(-1) to new behavior. flam3-genome 'split' mode was broken, fixed
|
||||
(thanks Exper.) Die gracefully instead of segfault when very small
|
||||
estimator_curve values are specified. Version attribute added to
|
||||
flame tag. Number of iterations used to fuse attractor increased to
|
||||
100. Release as 2.8beta7.
|
||||
|
||||
11/24/09 Potential speedup of 5% over prior versions. Many threading
|
||||
issues identified and resolved when using flam3 shared library as
|
||||
back end for user interfaces. 14 complex plane variations added.
|
||||
auger variation added. new flam3_make_strip library function to
|
||||
generate stripped genomes for external ui strip renders. bug fix:
|
||||
when rendering strips, use the same random context for each strip
|
||||
to prevent edge effects where strips butt against each other. flam3
|
||||
will now linearly interpolate missing colors in the colormap.
|
||||
Release as 2.8beta6.
|
||||
|
||||
10/16/09 Non-threadsafe progress tracking code in main iteration thread
|
||||
replaced with per-render progress storage. Fixed bug where pausing
|
||||
render during density estimation stage terminated render. Waves2
|
||||
variation fixed (thx Joel F). Release as 2.8beta5.
|
||||
|
||||
10/07/09 Fixed bug affecting 'animate' mode with flam3-genome. Changed
|
||||
estimate_bounding_box to increase discarded iterations if numerous
|
||||
badvals were encountered during iterations. Exported a few more
|
||||
functions for Windows DLL. Release as 2.8beta4.
|
||||
|
||||
10/03/09 Changed color_speed range from 0 (no color change) to 1
|
||||
(use new xform color). Animate attribute is now 0 for no motion,
|
||||
1 for motion. Removed final xform from stagger algorithm. 'oscope'
|
||||
parameters are now called 'oscilloscope' to match the rest of the
|
||||
parametric variations (backwards compatible, so old genomes can be
|
||||
read.) Stagger now affects morphing as well as sheep rotation, but
|
||||
only using flam3-genome (not flam3-animate). Release as 2.8beta3.
|
||||
|
||||
03/18/09 Major upgrade :
|
||||
- 28 variations added, mostly from the sourceforge plugins pack
|
||||
- significant speed optimization of variations
|
||||
- setting earlyclip env var on commandline will enable an alternate
|
||||
calculation of color values, resulting in better antialiasing
|
||||
- 'highlight_power' flame element controls the white highlights in
|
||||
dense areas, eliminating the hue shift bug
|
||||
- Apophysis chaos and solo xform/plotmode features have been
|
||||
implemented. solo/plotmode are promoted to floating point
|
||||
'opacity'. opacity and chaos are both interpolatable.
|
||||
- <motion> tag now available for xforms...allows cyclic variation
|
||||
of any regular xform parameter/coef/post.
|
||||
- env var 'stagger' affects the simultaneity of xform interpolation
|
||||
when morphing from one flame to another. set to 0 for existing
|
||||
behaviour, set to 1 to make each xform interpolate individually
|
||||
- symmetry has been broken out into color_speed and animate tags
|
||||
with the same sense (which is confusing and will be fixed in a
|
||||
future release).
|
||||
- set the flam27 parameter to output backwards compatible genomes.
|
||||
- passes the consistency test where rendering an image at double
|
||||
size and filtering it down produces the same results as the
|
||||
original (modulo quality).
|
||||
|
||||
03/17/09 Added fuzz testing with zzuf to the regression tests. 'Strip'
|
||||
mode and genomes with the zoom parameter used now break into pieces
|
||||
properly. insert_palette fixed (broken a few versions ago.) fixed
|
||||
twintrian variation when small weights are used. various rare
|
||||
segfaults and memory leaks fixed. 'palette_mode' attribute added to
|
||||
flame element for smoother palette interpolation in slow animations;
|
||||
possible values are 'step' and 'linear' ('step' mode is default and
|
||||
matches previous behaviour.) Release as 2.7.18.
|
||||
|
||||
11/11/08 Add error checking on the numbers in the input genome. Do
|
||||
not exit on read errors, fail gracefully. Changed sin/cos = tan in
|
||||
the tangent variation. Added polar to list of variations that use
|
||||
the inverted linear identity. Bugfix: temporal_filter_exp was not
|
||||
set properly in template. Apply interpolation attribute in
|
||||
templates. Add/publish datarootdir with pkg-config so the palette
|
||||
file is easy to find (for qosmic). Copyright by Spotworks LLC
|
||||
instead of Spot and Erik. Add fuzz checks to the regression
|
||||
suite. include LNX/OSX/WIN in the version string. In
|
||||
flam3-genome animate command, added one to last flame time, so the
|
||||
end time is inclusive. Release as 2.7.17.
|
||||
|
||||
09/06/08 Added 'clone_all' to flam3_genome to allow application of
|
||||
template to all flames in a file at once, and 'animate' to write
|
||||
a full sequence of interpolations out. 'animate' is similar to
|
||||
'sequence' except that no control point rotation is performed.
|
||||
Fixed non-functional 'write_genome' env var for flam3_animate.
|
||||
Two bugs associated with interpolating from a log interpolation_type
|
||||
to a non-log interpolation_type fixed (rotate angle reduction and
|
||||
special inverted identity). when using flam3_rotate in 'spin_inter'
|
||||
the interp type of the first genome is now used rather than the
|
||||
current genome's interp type. Enforced upper and lower bounds for
|
||||
xform color and upper bound for interpolated colormap values
|
||||
as "smooth" interpolation led to values out of range. If "smooth"
|
||||
interpolation is specified for all flames in a file, the first and
|
||||
second-to-last genome is switched to "linear" with a warning.
|
||||
spatial filters with non-box-filter window functions fixed.
|
||||
Release as 2.7.16.
|
||||
|
||||
|
||||
08/25/08 Added new interpolation types 'old' and 'older', for use in
|
||||
recreating old animations. 'linear' mode now does not rotate padded
|
||||
xforms (results in prettier symmetric singularities). switched to
|
||||
using a 'padding' flag instead of a 'just initialized' flag; padding
|
||||
flag used for implementation of 'old' and 'older' types.
|
||||
interpolation_space now deprecated, instead use interpolation_type.
|
||||
flam3_align is now idempotent (multiple applications do not change
|
||||
the control points.) Default number of temporal samples bumped to
|
||||
1000. Removed CVS headers from source code (now using SVN).
|
||||
Default interpolation mode now log. Removed 'move' and 'split' vars.
|
||||
changes to flam3-genome: sequence mode now returns linear
|
||||
interpolation mode for all control points except first/last of edges
|
||||
- these cps will use the original interpolation mode; inter and
|
||||
rotate modes will now return padded genomes for all control points,
|
||||
all with linear interpolation specified. instead of centering
|
||||
sometimes reframe by golden mean plus noise. Release as 2.7.15.
|
||||
|
||||
07/21/08 Add configuration option for atomic-ops. bug fix: do not
|
||||
truncate floating point palettes. new motion blur features: add
|
||||
temporal_filter_type, can be "box" (default) or "gaussian" or
|
||||
"exp". Temporal_filter_width and temporal_filter_exp are parms to
|
||||
it. 'blur' env var no longer used. Small bug fix: iteration
|
||||
count depends only on the size of the output image, not the padded
|
||||
image (the gutter). When interpolating, only do -pi/pi adjustment
|
||||
for non-asymmetric cases. Julian/juliascope variations use the
|
||||
alternate inverted identity for interpolation (reduces wedge
|
||||
effect). Add python script for regression and consistency
|
||||
checking. Add svn revision number to version string (in the
|
||||
software not of the package). Release as 2.7.14.
|
||||
|
||||
05/28/08 Restored upper limit on particle coordinates. Release as
|
||||
2.7.13.
|
||||
|
||||
05/16/08 Added man pages. Removed upper limit on particle
|
||||
coordinates. fixed FSF address in comments. update to automake
|
||||
1.10.1. added eps to denom of perspective fraction to avoid
|
||||
infinities (thanks fred). Put contents of 'id' env var in png/jpg
|
||||
comment block. Release as 2.7.12.
|
||||
|
||||
04/05/08 Added 16 bit per channel support to PNG via bpc envar.
|
||||
isaac.h is now installed with the flam3 headers. Strip indexing
|
||||
now done with size_t's to fix bug in large images (thanks Paul).
|
||||
Progress callback now returns ETA, and per-thread verbose flag
|
||||
functionality fixed. Enumerated spatial filter types now used in
|
||||
flam3.h, taking the place of function pointers (simplifies the
|
||||
API). Fix bug by moving precalculation of variation variables to
|
||||
flam3_iterate (thanks david). Release as 2.7.11.
|
||||
|
||||
03/15/08 fixed interpolation bug when magnitude of rotation/scaling
|
||||
component of affine transform is 0. replaced secant variation
|
||||
with more flame-friendly secant2 (eliminates gap in y direction,
|
||||
scales y-coordinate by weight). warning message now printed when
|
||||
unrecognized variation is present in an xform. fixed bad
|
||||
inequality when checking for -pi/pi discontinuity during complex
|
||||
interpolation. release as 2.7.10.
|
||||
|
||||
02/08/08 non-zero weights for final xforms no longer allowed, and now
|
||||
have no effect. recompiled windows exes with mingw gcc 4.1 to
|
||||
take advantage of scalability improvements in flam3 2.7.8 (was
|
||||
compiling with mingw gcc 3.4 until now). for fedora package
|
||||
compliance, flam3.pc.in patched by ian weller and moved use of
|
||||
config.h to c files only. release as 2.7.9.
|
||||
|
||||
01/26/08 better scalability across multiple CPUs by using compare and
|
||||
swap (from Tim Hockin). fix bug in large images (>2GB). add
|
||||
flam3_srandom and flam3_malloc/free to better support wrapping
|
||||
with python on windows, which links with a different C
|
||||
runtime. add --enable-shared option to configure script (from
|
||||
Bobby R Ward). release as 2.7.8.
|
||||
|
||||
12/16/07 fixed bug (rare random crash) identified by david burnett.
|
||||
initialize new xforms with better defaults for parametric
|
||||
variations (based on interpolated-against xforms). add id envar,
|
||||
like nick/url. add clone_action envar. return to xform
|
||||
interpolation based on complex logs, but make consistent decisions
|
||||
about counter/clockwise rotation across the sheep edges.
|
||||
interpolation_space attribute to flame element can be set to
|
||||
"linear" to go back to the simpler method, or "log" to use this
|
||||
new (default) method. release as 2.7.7
|
||||
|
||||
10/20/07 fixed action string overflow when many xforms are present.
|
||||
added 'print_edit_depth' env var to control how many levels of
|
||||
<edit> tags are saved when using flam3-genome. Fixed wrong
|
||||
placement of random improve_colors code in flam3-genome. go to
|
||||
five digit filenames. fixed bug in supershape variation. API
|
||||
cleanup, thanks to david bitseff. release 2.7.6.
|
||||
|
||||
08/14/07 various code updates to assist with compiling under msvc++.
|
||||
now can specify --disable-pthread or --enable-pthread to configure
|
||||
to better control compilation. fixed bug preventing renders of
|
||||
flames with more than 128 xforms. release 2.7.5.
|
||||
|
||||
07/12/07 fixed bug in split variation, now compatible with both
|
||||
versions of Apo. added insert_palette option. switched density
|
||||
estimation kernel from Epanichnikov to Gaussian. genetic cross
|
||||
now crosses palettes rather than selecting one of the parent
|
||||
palettes. remove noisy variations from random generation if
|
||||
use_vars or dont_use_vars not specified. fixed metrics calculated
|
||||
on small test render for genetic operations. reduced memory
|
||||
requirements for density estimation filters. 64-bit linux distros
|
||||
now supported. release 2.7.4.
|
||||
|
||||
|
||||
06/21/07 flam3 version, rendered genome, some render statistics and
|
||||
optionally nick/url stored in jpeg/png headers. fixed two bugs
|
||||
in isaac rng code (strongly affected temporal blur). prevent
|
||||
final xform rotation for sheep animation. fixed interpolation
|
||||
when only one flame has final xform. added Supershape, Flower,
|
||||
Conic, Parabola, Move and Split variations. Shape combined with
|
||||
Supershape via 'rnd' parameter. flam3-genome now writes 'name'
|
||||
attribute for rotate and sequence modes. oversample attribute
|
||||
deprecated; supersample now preferred. new build process for
|
||||
windows exes using MinGW/MSYS. added 'intpalette' env var to
|
||||
round floating point palettes to allow older versions of Apophysis
|
||||
to read them. default image type is now PNG, transparency off.
|
||||
density estimation code revised to be more consistent between
|
||||
different supersample levels, which required change to default
|
||||
de params. limit number of de filters to conserve memory. fixed
|
||||
julia variation dependency on non-thread-safe random bit function.
|
||||
removed random number storage for radial blur variation.
|
||||
release 2.7.3.
|
||||
07/26/08: Note, incompat. change made to direction of cp->rotate
|
||||
(as of 2.7.3, rotates shortest distance instead of clockwise)
|
||||
|
||||
02/09/07 use isaac random number generator to avoid differences
|
||||
between mac/pc/linux. use multiple threads to take advantage
|
||||
of multiple CPUs or cores. new variations: disc2, Arch,
|
||||
Tangent, Square, Rays, Blade, Secant, Twintrian, Cross.
|
||||
fixed bug reading hex color format - must remove \n prior to
|
||||
start of colors if present. use EPS in spiral, hyperbolic
|
||||
and spherical to eliminate black spots. fix numbering of
|
||||
disc2, change parameter to estimate_bounding_box. made blur
|
||||
kernel type templatable. removed extraneous 'enabled="1"' in
|
||||
writing out final xform information (no longer needed).
|
||||
release 2.7.2.
|
||||
|
||||
12/31/06 fixed bug in waves precalculation code. curl and rectangles
|
||||
variations from joel faber. remove visibility of
|
||||
rotation_center attribute, fix strips operator to handle
|
||||
rotation without it. added motion exponent and gamma lin
|
||||
thresh to flam3_print. list of variations in the docstring
|
||||
automatically generated. flam3-genome: envar noedits
|
||||
suppresses output of edit history. release 2.7.1.
|
||||
|
||||
09/27/06 print out palette as floating point with up to 6 digits
|
||||
rather than integers (for very slow smooth transitions).
|
||||
Added optimization to only recalculate the xform distrib
|
||||
array when necessary (Thanks Joel Faber). Added settable
|
||||
kernel for downrez. Added XML reading code for new <palette>
|
||||
format for gradients. Functionalized hex gradient read.
|
||||
Removed color shift experimental feature. New
|
||||
'motion_exponent' attribute controls fade of temporal steps.
|
||||
added gaussian_blur and radial_blur vars from apo. added pie
|
||||
and ngon variations from joel faber. add rotation_center
|
||||
attribute. added but disabled image variation from joel.
|
||||
release as 2.7.
|
||||
|
||||
06/26/06 use new libpng api, handle libpng errors properly (from nix
|
||||
at esperi.org.uk). print out palette as floating point with
|
||||
6 digits rather than integers (for very slow smooth
|
||||
transitions).
|
||||
|
||||
06/11/06 disable density estimation for 16 and 32 bit buffers because
|
||||
it doesn't work. Apo team removed "enabled" from final xform
|
||||
specification, so now it defaults to on. make default
|
||||
temporal samples be 60 so that motion blur is the default,
|
||||
but explicitly ignore temporal samples when rendering still
|
||||
frames. add strip genetic operator to flam3-genome for
|
||||
breaking a flame into strips for parallel rendering. add
|
||||
subpixel offsets for antialiasing by averaging multiple
|
||||
images. release as 2.7b8.
|
||||
|
||||
05/25/06 change attribute name "batches" to "passes" because many old
|
||||
genomes have it set, and with density estimation it is
|
||||
harmful.
|
||||
|
||||
04/28/06 remove debugging code, release as 2.7b7.
|
||||
|
||||
04/28/06 add attribute interpolation="smooth" for catmull-rom
|
||||
interpolation. known bug: some frames come out dark.
|
||||
release as 2.7b6.
|
||||
|
||||
04/15/06 rename XML attribute "estimator" to "estimator_radius". fix
|
||||
the progress callback. add use_mem envar. move palette
|
||||
database to external file. cleanup namespace. add new
|
||||
variations blur, julian, and juliascope. fix flam3-convert.
|
||||
add experimental color shifting via "shift" envar. supports
|
||||
finalxform. can read hex palette format. avoids the "square"
|
||||
that appears from NaNs. release as 2.7b5.
|
||||
|
||||
01/11/06 unlimited number of xforms per flame. new variations
|
||||
cylinder and perspective. rename rename de_max_filter to
|
||||
estimator, de_min_filter to estimator_minimum, de_alpha
|
||||
to estimator_curve, and jitters to temporal_samples.
|
||||
release as 2.7b4.
|
||||
|
||||
11/28/05 performance optimization, fix symmetry singularities, added
|
||||
bubble variation, fixed handkerchief variation, templates
|
||||
apply to sequence and rotate flam3-genome commands, added
|
||||
envar "name_enable" to render filenames specified in the
|
||||
"name" attribute of the flame element, small bugfixes,
|
||||
release as 2.7b3.
|
||||
|
||||
11/04/05 verbose on by default. Added 'transparency' envar for png
|
||||
renders without transparency channel. Fixed non-black
|
||||
background jpeg renders. add improve_colors mutation,
|
||||
rewrite most of estimate_bounding_box. added new variations
|
||||
blob pdjd fan2 rings2 eyefish. added '33bit' method for
|
||||
32-bit floats. <edit> tags track history. alter the gamma
|
||||
curve to be linear near 0 to avoid singularity and reduce
|
||||
noise, set with gamma_threshold. release as v2.7b2.
|
||||
|
||||
09/24/05 new density estimator and temporal jitter code from Erik
|
||||
Reckase (note removal of todo items above :). allow gamma,
|
||||
vibrancy, contrast, pixels_per_unit, and brightness to vary
|
||||
as part of the genome rather than as part of the rendering
|
||||
parameters. flam3-genome does not retry when cloning. ditch
|
||||
2nd color coordinates. release as v2.7b1.
|
||||
|
||||
06/27/05 in flam3_dimension, give up and return NaN if 90% or more of
|
||||
the samples are being clipped. release v2.6.
|
||||
|
||||
06/22/05 add envar to control the number of tries.
|
||||
|
||||
06/06/05 add new form of mutation that introduces post xforms.
|
||||
|
||||
05/20/05 fix memory trashing bug resulting from xform overflow. put
|
||||
regular xforms before symmetry in printed genomes. enforce
|
||||
weights non-negative & at least one xform. remove
|
||||
nan-protection from popcorn variation. truncate xforms with
|
||||
very small weight.
|
||||
|
||||
05/13/05 fix bug reported by erik reckase where fan variation could
|
||||
blow up to NaN because the domain of atan2 was not protected.
|
||||
remove protection from all atan2 calls and instead detect NaN
|
||||
results and replace them with noise. count really large
|
||||
values as bad too to prevent blowing up to infinity. enforce
|
||||
0<=hue<1, release v2.6b1.
|
||||
|
||||
05/05/05 report choices made during genome generation in notes
|
||||
attribute. flam3_dimension no longer hangs when most of the
|
||||
attractor is outside the camera. limit number of variations
|
||||
produced by genetic operators to 5. reduce rate of
|
||||
interpolation method of crossover.
|
||||
|
||||
03/17/05 put cloning back in (found by James Rantanen).
|
||||
|
||||
03/08/05 change sawtooth variation (incompatible!). add fan
|
||||
variation. rename sawtooth to rings. release as v2.5.
|
||||
|
||||
03/01/05 fix rotation when nstrips > 1. add flam3_dimension(). minor
|
||||
bugfixes. release as v2.4.
|
||||
|
||||
01/25/05 release as v2.3.
|
||||
|
||||
01/18/05 support post xforms (idea from eric nguyen). support camera
|
||||
rotation.
|
||||
|
||||
12/28/04 release as v2.2.
|
||||
|
||||
12/27/04 preview implementation of image fractalization by adding a
|
||||
color coordinate. changed how random/default color
|
||||
coordinates are selected (they alternate 0 and 1 instead of
|
||||
being distributed between 0 and 1). WARNING: incompatible
|
||||
format change to samples argument of flam3_iterate.
|
||||
|
||||
12/20/04 allow mutation and crossover from files with multiple
|
||||
genomes. a random genome is selected for each repetition.
|
||||
|
||||
12/11/04 fix bug printing out interpolated non-built-in palettes.
|
||||
warn if any images sizes in animation do not match.
|
||||
|
||||
12/01/04 remove debugging code left in flam3-convert, thanks to Paul
|
||||
Fishwick for reporting this. add cosine variation. add
|
||||
sawtooth variation. handle nstrips that do not divide the
|
||||
height. write partial results as strips are computed. fix
|
||||
old bug where in 32 bit mode one of the terms appeared to be
|
||||
calculated at 16 bits. release as v2.1.
|
||||
|
||||
10/28/04 fix docstring bug. release as v2.0.1.
|
||||
|
||||
10/28/04 renaming, cleanup, and modularization. now exports
|
||||
libflam3.a and flam3.h, all names prefixed with flam3_.
|
||||
binaries named with flam3- prefix, genome files use flam3
|
||||
suffix. create and install a flam3.pc pkg-config file.
|
||||
release as v2.0.
|
||||
|
||||
09/21/04 fix bug where code for integer rounding was left in 64-bit
|
||||
floating point version. round remaining time up so we do not
|
||||
say ETA in 0 seconds. do not use static allocation to hold
|
||||
onto memory, just malloc and free what we need every frame.
|
||||
enforce positive oversampling. fix bug in hqi on sequences
|
||||
of images of different sizes. release as v1.15.
|
||||
|
||||
09/17/04 change name of envar to control jpeg compression quality from
|
||||
"quality" to "jpeg". check for bad nbatches values. release
|
||||
as v1.14.
|
||||
|
||||
08/23/04 add about 600 cmaps from Jackie, Pat Phillips, Classylady,
|
||||
and BTomchek. use 64-bit (double) sized buffers. remove
|
||||
white_level. add new variations: exponential & power. fix
|
||||
bug where hue_rotation was left uninitialized. add clone
|
||||
option to pick-flame which just applies template to the input
|
||||
without modifying genome. random_control_point can now put
|
||||
multiple variations in one xform. remove altivec code because
|
||||
it is incompatible with 64-bit buffers. verbose (progress bar
|
||||
on stderr) from Jon Morton. control random number seeds via
|
||||
seed envar. support buffer sizes 16, 32, or 64 bits with
|
||||
three versions of rect.c included into libifs.c.
|
||||
|
||||
03/28/04 fix bug interpolating between flames with different numbers
|
||||
of xforms introduced by the new de/parsing. add modified
|
||||
version of the popcorn variation from apophysis. fix small
|
||||
bug in waves variation. make distribution of variations
|
||||
even. add altivec code from R.J. Berry of warwick.ac.uk.
|
||||
release as v1.13.
|
||||
|
||||
03/26/04 add wave variation. allow negative variational coefs. do
|
||||
not truncate filter width to an integer. add fisheye
|
||||
variation. make variations print by name instead of using a
|
||||
vector, that is say spherical="1" instead of var="0 0 1" or
|
||||
var1="2". it should still read the old format.
|
||||
|
||||
03/07/04 fix bug printing out result of interpolating between
|
||||
symmetries. release as v1.11.
|
||||
|
||||
03/03/04 add new means of crossover: a random point between the
|
||||
parents as defined by linear interpolation. in all kinds of
|
||||
crossover, reset the color coordinates to make sure they are
|
||||
spread out well. somehow lost part of the extra_attributes
|
||||
patch, so put it in again. add pixel_aspect_ratio envar.
|
||||
decrease filter cutoff threshold. the edges of the filter
|
||||
were almost zeros, so making the filter smaller saves time
|
||||
with almost no effect on the results. do not print out the
|
||||
attributes of control points that have default values.
|
||||
release as v1.10.
|
||||
|
||||
02/26/04 remove prefix argument to print_control_point, and add
|
||||
extra_attributes. allow any value for vibrancy parameter.
|
||||
allow variation blending coefs to have any values. do not
|
||||
normalize them. on windows nstrips is computated
|
||||
automatically to fit within memory (leaves at least 20%
|
||||
unused). support png image format and if output is png then
|
||||
compute & output alpha channel. release as v1.9.
|
||||
|
||||
02/01/04 add julia variation, and put bent variation back in. change
|
||||
how colors are computed in presense of symmetry: xforms that
|
||||
come from a symmetry do not change the color index. this
|
||||
prevents the colors from washing out. since an xform may be
|
||||
interpolated between a symmetry and not, this this is a
|
||||
blending factor. add more documentation. add function to
|
||||
compute lyapunov coefs. allow control over symmetries
|
||||
produced by pick-flame. release as v1.8.
|
||||
|
||||
07/20/03 cleanup, update documentation, release as v1.7.
|
||||
|
||||
07/15/03 fix bug in interpolation where in last frame when going from
|
||||
non-symmetric to symmetric it left out some xforms. drop
|
||||
support for "cmap_inter". add var1 as a abbreviation to var
|
||||
in xml output, and do not print trailing 0s in var string.
|
||||
|
||||
07/09/03 change matrix interpolation to be linear rather than complex
|
||||
log to avoid the discontinuity at 180 degrees. this was
|
||||
causing jumpiness in the C1 continuous algorithm. this means
|
||||
that rotation has to be handled with pick-flame. put direct
|
||||
support for symmetries in the de/parser to make control
|
||||
points smaller and easier to understand. support
|
||||
combinations of bilateral & rotational symmetry.
|
||||
|
||||
06/22/03 bug in colormap interpolation. release as v1.6.
|
||||
|
||||
06/20/03 fix some bugs, in particular remove sorting of the xforms
|
||||
when control points are read. they are only sorted when they
|
||||
are generated. updated dates on copyright notices. added
|
||||
time parameter to anim, shorthand for begin & end being the
|
||||
same. added a fairly terrible hack to allow palettes to be
|
||||
specified as blending of two basic palettes. this requires
|
||||
much less bandwidth than sending 256 rgb triples. in
|
||||
pick-flame change default to be enclosed xml output.
|
||||
|
||||
06/09/03 add C1 continuous interpolation to pick-flame (suggested by
|
||||
Cassidy Curtis). added new variations from Ultra Fractal
|
||||
version by Mark Townsend. added symmetry xforms.
|
||||
|
||||
06/02/03 add convert-flame which reads the old file format and writes
|
||||
the new one. release as v1.5.
|
||||
|
||||
03/22/03 fix bug in hqi & anim. somewhere along the way (prolly jpeg)
|
||||
nstrips was broken. add qs and ss params to hqi.
|
||||
discontinue strips for anim because the implementation is a
|
||||
bit problematic (animating zoom??). bump version to 1.4.
|
||||
|
||||
03/05/03 add pick-flame.c to the project, and extend it with mutation
|
||||
and crossover capability. add parse_control_points_from_file
|
||||
(and use it). rename non-xml variants of de/parsers to *_old
|
||||
and rename xml variants to remove _xml. add
|
||||
rotate_control_point. bump version to 1.3.
|
||||
|
||||
02/10/03 increase CHOOSE_XFORM_GRAIN by 10x and use chars instead of
|
||||
ints. remove extra -ljpeg from Makefile. lose hack that
|
||||
ignored density xforms after interpolation. what was that
|
||||
for?? it makes a difference, and just makes interpolation
|
||||
less smooth as far as i can tell. bump version to 1.2.
|
||||
|
||||
01/17/03 release as v1.1.
|
||||
|
||||
01/16/03 support output in jpeg format; this is the default. support
|
||||
win32.
|
||||
|
||||
01/08/03 by default don't render the last frame so that animations
|
||||
dove-tail and loop
|
||||
|
||||
01/06/03 fix how too many xforms are detected so that one more xform
|
||||
is allowed.
|
||||
|
||||
12/22/02 first release as independent package. release as v1.0.
|
896
src/aclocal.m4
vendored
Normal file
896
src/aclocal.m4
vendored
Normal file
@ -0,0 +1,896 @@
|
||||
# generated automatically by aclocal 1.10.2 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
# 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
|
||||
[m4_warning([this file was generated for autoconf 2.63.
|
||||
You have another version of autoconf. It may work, but is not guaranteed to.
|
||||
If you have problems, you may need to regenerate the build system entirely.
|
||||
To do so, use the procedure documented by the package, typically `autoreconf'.])])
|
||||
|
||||
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_AUTOMAKE_VERSION(VERSION)
|
||||
# ----------------------------
|
||||
# Automake X.Y traces this macro to ensure aclocal.m4 has been
|
||||
# generated from the m4 files accompanying Automake X.Y.
|
||||
# (This private macro should not be called outside this file.)
|
||||
AC_DEFUN([AM_AUTOMAKE_VERSION],
|
||||
[am__api_version='1.10'
|
||||
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
||||
dnl require some minimum version. Point them to the right macro.
|
||||
m4_if([$1], [1.10.2], [],
|
||||
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
||||
])
|
||||
|
||||
# _AM_AUTOCONF_VERSION(VERSION)
|
||||
# -----------------------------
|
||||
# aclocal traces this macro to find the Autoconf version.
|
||||
# This is a private macro too. Using m4_define simplifies
|
||||
# the logic in aclocal, which can simply ignore this definition.
|
||||
m4_define([_AM_AUTOCONF_VERSION], [])
|
||||
|
||||
# AM_SET_CURRENT_AUTOMAKE_VERSION
|
||||
# -------------------------------
|
||||
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
||||
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
||||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||
[AM_AUTOMAKE_VERSION([1.10.2])dnl
|
||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
||||
|
||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
|
||||
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
|
||||
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
|
||||
#
|
||||
# Of course, Automake must honor this variable whenever it calls a
|
||||
# tool from the auxiliary directory. The problem is that $srcdir (and
|
||||
# therefore $ac_aux_dir as well) can be either absolute or relative,
|
||||
# depending on how configure is run. This is pretty annoying, since
|
||||
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
|
||||
# source directory, any form will work fine, but in subdirectories a
|
||||
# relative path needs to be adjusted first.
|
||||
#
|
||||
# $ac_aux_dir/missing
|
||||
# fails when called from a subdirectory if $ac_aux_dir is relative
|
||||
# $top_srcdir/$ac_aux_dir/missing
|
||||
# fails if $ac_aux_dir is absolute,
|
||||
# fails when called from a subdirectory in a VPATH build with
|
||||
# a relative $ac_aux_dir
|
||||
#
|
||||
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
|
||||
# are both prefixed by $srcdir. In an in-source build this is usually
|
||||
# harmless because $srcdir is `.', but things will broke when you
|
||||
# start a VPATH build or use an absolute $srcdir.
|
||||
#
|
||||
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
|
||||
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
|
||||
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
|
||||
# and then we would define $MISSING as
|
||||
# MISSING="\${SHELL} $am_aux_dir/missing"
|
||||
# This will work as long as MISSING is not called from configure, because
|
||||
# unfortunately $(top_srcdir) has no meaning in configure.
|
||||
# However there are other variables, like CC, which are often used in
|
||||
# configure, and could therefore not use this "fixed" $ac_aux_dir.
|
||||
#
|
||||
# Another solution, used here, is to always expand $ac_aux_dir to an
|
||||
# absolute PATH. The drawback is that using absolute paths prevent a
|
||||
# configured tree to be moved without reconfiguration.
|
||||
|
||||
AC_DEFUN([AM_AUX_DIR_EXPAND],
|
||||
[dnl Rely on autoconf to set up CDPATH properly.
|
||||
AC_PREREQ([2.50])dnl
|
||||
# expand $ac_aux_dir to an absolute path
|
||||
am_aux_dir=`cd $ac_aux_dir && pwd`
|
||||
])
|
||||
|
||||
# AM_CONDITIONAL -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 8
|
||||
|
||||
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
||||
# -------------------------------------
|
||||
# Define a conditional.
|
||||
AC_DEFUN([AM_CONDITIONAL],
|
||||
[AC_PREREQ(2.52)dnl
|
||||
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
|
||||
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
|
||||
AC_SUBST([$1_TRUE])dnl
|
||||
AC_SUBST([$1_FALSE])dnl
|
||||
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
|
||||
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
|
||||
if $2; then
|
||||
$1_TRUE=
|
||||
$1_FALSE='#'
|
||||
else
|
||||
$1_TRUE='#'
|
||||
$1_FALSE=
|
||||
fi
|
||||
AC_CONFIG_COMMANDS_PRE(
|
||||
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
|
||||
AC_MSG_ERROR([[conditional "$1" was never defined.
|
||||
Usually this means the macro was only invoked conditionally.]])
|
||||
fi])])
|
||||
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 9
|
||||
|
||||
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
|
||||
# written in clear, in which case automake, when reading aclocal.m4,
|
||||
# will think it sees a *use*, and therefore will trigger all it's
|
||||
# C support machinery. Also note that it means that autoscan, seeing
|
||||
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
|
||||
|
||||
|
||||
# _AM_DEPENDENCIES(NAME)
|
||||
# ----------------------
|
||||
# See how the compiler implements dependency checking.
|
||||
# NAME is "CC", "CXX", "GCJ", or "OBJC".
|
||||
# We try a few techniques and use that to set a single cache variable.
|
||||
#
|
||||
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
|
||||
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
|
||||
# dependency, and given that the user is not expected to run this macro,
|
||||
# just rely on AC_PROG_CC.
|
||||
AC_DEFUN([_AM_DEPENDENCIES],
|
||||
[AC_REQUIRE([AM_SET_DEPDIR])dnl
|
||||
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
|
||||
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
|
||||
AC_REQUIRE([AM_DEP_TRACK])dnl
|
||||
|
||||
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
|
||||
[$1], CXX, [depcc="$CXX" am_compiler_list=],
|
||||
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
|
||||
[$1], UPC, [depcc="$UPC" am_compiler_list=],
|
||||
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
|
||||
[depcc="$$1" am_compiler_list=])
|
||||
|
||||
AC_CACHE_CHECK([dependency style of $depcc],
|
||||
[am_cv_$1_dependencies_compiler_type],
|
||||
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
|
||||
# We make a subdir and do the tests there. Otherwise we can end up
|
||||
# making bogus files that we don't know about and never remove. For
|
||||
# instance it was reported that on HP-UX the gcc test will end up
|
||||
# making a dummy file named `D' -- because `-MD' means `put the output
|
||||
# in D'.
|
||||
mkdir conftest.dir
|
||||
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||
# using a relative directory.
|
||||
cp "$am_depcomp" conftest.dir
|
||||
cd conftest.dir
|
||||
# We will build objects and dependencies in a subdirectory because
|
||||
# it helps to detect inapplicable dependency modes. For instance
|
||||
# both Tru64's cc and ICC support -MD to output dependencies as a
|
||||
# side effect of compilation, but ICC will put the dependencies in
|
||||
# the current directory while Tru64 will put them in the object
|
||||
# directory.
|
||||
mkdir sub
|
||||
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
if test "$am_compiler_list" = ""; then
|
||||
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
|
||||
fi
|
||||
for depmode in $am_compiler_list; do
|
||||
# Setup a source with many dependencies, because some compilers
|
||||
# like to wrap large dependency lists on column 80 (with \), and
|
||||
# we should not choose a depcomp mode which is confused by this.
|
||||
#
|
||||
# We need to recreate these files for each test, as the compiler may
|
||||
# overwrite some of them when testing with obscure command lines.
|
||||
# This happens at least with the AIX C compiler.
|
||||
: > sub/conftest.c
|
||||
for i in 1 2 3 4 5 6; do
|
||||
echo '#include "conftst'$i'.h"' >> sub/conftest.c
|
||||
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
|
||||
# Solaris 8's {/usr,}/bin/sh.
|
||||
touch sub/conftst$i.h
|
||||
done
|
||||
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
||||
|
||||
case $depmode in
|
||||
nosideeffect)
|
||||
# after this tag, mechanisms are not by side-effect, so they'll
|
||||
# only be used when explicitly requested
|
||||
if test "x$enable_dependency_tracking" = xyes; then
|
||||
continue
|
||||
else
|
||||
break
|
||||
fi
|
||||
;;
|
||||
none) break ;;
|
||||
esac
|
||||
# We check with `-c' and `-o' for the sake of the "dashmstdout"
|
||||
# mode. It turns out that the SunPro C++ compiler does not properly
|
||||
# handle `-M -o', and we need to detect this.
|
||||
if depmode=$depmode \
|
||||
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
|
||||
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
||||
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
|
||||
>/dev/null 2>conftest.err &&
|
||||
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
|
||||
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
||||
# icc doesn't choke on unknown options, it will just issue warnings
|
||||
# or remarks (even with -Werror). So we grep stderr for any message
|
||||
# that says an option was ignored or not supported.
|
||||
# When given -MP, icc 7.0 and 7.1 complain thusly:
|
||||
# icc: Command line warning: ignoring option '-M'; no argument required
|
||||
# The diagnosis changed in icc 8.0:
|
||||
# icc: Command line remark: option '-MP' not supported
|
||||
if (grep 'ignoring option' conftest.err ||
|
||||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
|
||||
am_cv_$1_dependencies_compiler_type=$depmode
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
cd ..
|
||||
rm -rf conftest.dir
|
||||
else
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
fi
|
||||
])
|
||||
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
|
||||
AM_CONDITIONAL([am__fastdep$1], [
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
|
||||
])
|
||||
|
||||
|
||||
# AM_SET_DEPDIR
|
||||
# -------------
|
||||
# Choose a directory name for dependency files.
|
||||
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
|
||||
AC_DEFUN([AM_SET_DEPDIR],
|
||||
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
|
||||
])
|
||||
|
||||
|
||||
# AM_DEP_TRACK
|
||||
# ------------
|
||||
AC_DEFUN([AM_DEP_TRACK],
|
||||
[AC_ARG_ENABLE(dependency-tracking,
|
||||
[ --disable-dependency-tracking speeds up one-time build
|
||||
--enable-dependency-tracking do not reject slow dependency extractors])
|
||||
if test "x$enable_dependency_tracking" != xno; then
|
||||
am_depcomp="$ac_aux_dir/depcomp"
|
||||
AMDEPBACKSLASH='\'
|
||||
fi
|
||||
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||
AC_SUBST([AMDEPBACKSLASH])dnl
|
||||
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
|
||||
])
|
||||
|
||||
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
#serial 5
|
||||
|
||||
# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
# ------------------------------
|
||||
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[{
|
||||
# Autoconf 2.62 quotes --file arguments for eval, but not when files
|
||||
# are listed without --file. Let's play safe and only enable the eval
|
||||
# if we detect the quoting.
|
||||
case $CONFIG_FILES in
|
||||
*\'*) eval set x "$CONFIG_FILES" ;;
|
||||
*) set x $CONFIG_FILES ;;
|
||||
esac
|
||||
shift
|
||||
for mf
|
||||
do
|
||||
# Strip MF so we end up with the name of the file.
|
||||
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
||||
# Check whether this is an Automake generated Makefile or not.
|
||||
# We used to match only the files named `Makefile.in', but
|
||||
# some people rename them; so instead we look at the file content.
|
||||
# Grep'ing the first line is not enough: some people post-process
|
||||
# each Makefile.in and add a new line on top of each file to say so.
|
||||
# Grep'ing the whole file is not good either: AIX grep has a line
|
||||
# limit of 2048, but all sed's we know have understand at least 4000.
|
||||
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
|
||||
dirpart=`AS_DIRNAME("$mf")`
|
||||
else
|
||||
continue
|
||||
fi
|
||||
# Extract the definition of DEPDIR, am__include, and am__quote
|
||||
# from the Makefile without running `make'.
|
||||
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
||||
test -z "$DEPDIR" && continue
|
||||
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
||||
test -z "am__include" && continue
|
||||
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
||||
# When using ansi2knr, U may be empty or an underscore; expand it
|
||||
U=`sed -n 's/^U = //p' < "$mf"`
|
||||
# Find all dependency output files, they are included files with
|
||||
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
||||
# simplest approach to changing $(DEPDIR) to its actual value in the
|
||||
# expansion.
|
||||
for file in `sed -n "
|
||||
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
|
||||
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
|
||||
# Make sure the directory exists.
|
||||
test -f "$dirpart/$file" && continue
|
||||
fdir=`AS_DIRNAME(["$file"])`
|
||||
AS_MKDIR_P([$dirpart/$fdir])
|
||||
# echo "creating $dirpart/$file"
|
||||
echo '# dummy' > "$dirpart/$file"
|
||||
done
|
||||
done
|
||||
}
|
||||
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
|
||||
|
||||
# AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
# -----------------------------
|
||||
# This macro should only be invoked once -- use via AC_REQUIRE.
|
||||
#
|
||||
# This code is only required when automatic dependency tracking
|
||||
# is enabled. FIXME. This creates each `.P' file that we will
|
||||
# need in order to bootstrap the dependency handling code.
|
||||
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[AC_CONFIG_COMMANDS([depfiles],
|
||||
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
||||
])
|
||||
|
||||
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 8
|
||||
|
||||
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
|
||||
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
|
||||
|
||||
# Do all the work for Automake. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
# 2005, 2006, 2008 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 13
|
||||
|
||||
# This macro actually does too much. Some checks are only needed if
|
||||
# your package does certain things. But this isn't really a big deal.
|
||||
|
||||
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
|
||||
# AM_INIT_AUTOMAKE([OPTIONS])
|
||||
# -----------------------------------------------
|
||||
# The call with PACKAGE and VERSION arguments is the old style
|
||||
# call (pre autoconf-2.50), which is being phased out. PACKAGE
|
||||
# and VERSION should now be passed to AC_INIT and removed from
|
||||
# the call to AM_INIT_AUTOMAKE.
|
||||
# We support both call styles for the transition. After
|
||||
# the next Automake release, Autoconf can make the AC_INIT
|
||||
# arguments mandatory, and then we can depend on a new Autoconf
|
||||
# release and drop the old call support.
|
||||
AC_DEFUN([AM_INIT_AUTOMAKE],
|
||||
[AC_PREREQ([2.60])dnl
|
||||
dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
||||
dnl the ones we care about.
|
||||
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
||||
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
|
||||
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||
if test "`cd $srcdir && pwd`" != "`pwd`"; then
|
||||
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
|
||||
# is not polluted with repeated "-I."
|
||||
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
|
||||
# test to see if srcdir already configured
|
||||
if test -f $srcdir/config.status; then
|
||||
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||
fi
|
||||
fi
|
||||
|
||||
# test whether we have cygpath
|
||||
if test -z "$CYGPATH_W"; then
|
||||
if (cygpath --version) >/dev/null 2>/dev/null; then
|
||||
CYGPATH_W='cygpath -w'
|
||||
else
|
||||
CYGPATH_W=echo
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([CYGPATH_W])
|
||||
|
||||
# Define the identity of the package.
|
||||
dnl Distinguish between old-style and new-style calls.
|
||||
m4_ifval([$2],
|
||||
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
||||
AC_SUBST([PACKAGE], [$1])dnl
|
||||
AC_SUBST([VERSION], [$2])],
|
||||
[_AM_SET_OPTIONS([$1])dnl
|
||||
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
|
||||
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
|
||||
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
|
||||
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
|
||||
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
|
||||
|
||||
_AM_IF_OPTION([no-define],,
|
||||
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
|
||||
|
||||
# Some tools Automake needs.
|
||||
AC_REQUIRE([AM_SANITY_CHECK])dnl
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])dnl
|
||||
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
|
||||
AM_MISSING_PROG(AUTOCONF, autoconf)
|
||||
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo)
|
||||
AM_PROG_INSTALL_SH
|
||||
AM_PROG_INSTALL_STRIP
|
||||
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
|
||||
# We need awk for the "check" target. The system "awk" is bad on
|
||||
# some platforms.
|
||||
AC_REQUIRE([AC_PROG_AWK])dnl
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
|
||||
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
|
||||
[_AM_PROG_TAR([v7])])])
|
||||
_AM_IF_OPTION([no-dependencies],,
|
||||
[AC_PROVIDE_IFELSE([AC_PROG_CC],
|
||||
[_AM_DEPENDENCIES(CC)],
|
||||
[define([AC_PROG_CC],
|
||||
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
|
||||
AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
||||
[_AM_DEPENDENCIES(CXX)],
|
||||
[define([AC_PROG_CXX],
|
||||
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
|
||||
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
|
||||
[_AM_DEPENDENCIES(OBJC)],
|
||||
[define([AC_PROG_OBJC],
|
||||
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
# When config.status generates a header, we must update the stamp-h file.
|
||||
# This file resides in the same directory as the config header
|
||||
# that is generated. The stamp files are numbered to have different names.
|
||||
|
||||
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
|
||||
# loop where config.status creates the headers, so we can generate
|
||||
# our stamp files there.
|
||||
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
|
||||
[# Compute $1's index in $config_headers.
|
||||
_am_arg=$1
|
||||
_am_stamp_count=1
|
||||
for _am_header in $config_headers :; do
|
||||
case $_am_header in
|
||||
$_am_arg | $_am_arg:* )
|
||||
break ;;
|
||||
* )
|
||||
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
|
||||
esac
|
||||
done
|
||||
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_INSTALL_SH
|
||||
# ------------------
|
||||
# Define $install_sh.
|
||||
AC_DEFUN([AM_PROG_INSTALL_SH],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
|
||||
AC_SUBST(install_sh)])
|
||||
|
||||
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
|
||||
# Check whether the underlying file-system supports filenames
|
||||
# with a leading dot. For instance MS-DOS doesn't.
|
||||
AC_DEFUN([AM_SET_LEADING_DOT],
|
||||
[rm -rf .tst 2>/dev/null
|
||||
mkdir .tst 2>/dev/null
|
||||
if test -d .tst; then
|
||||
am__leading_dot=.
|
||||
else
|
||||
am__leading_dot=_
|
||||
fi
|
||||
rmdir .tst 2>/dev/null
|
||||
AC_SUBST([am__leading_dot])])
|
||||
|
||||
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 3
|
||||
|
||||
# AM_MAKE_INCLUDE()
|
||||
# -----------------
|
||||
# Check to see how make treats includes.
|
||||
AC_DEFUN([AM_MAKE_INCLUDE],
|
||||
[am_make=${MAKE-make}
|
||||
cat > confinc << 'END'
|
||||
am__doit:
|
||||
@echo done
|
||||
.PHONY: am__doit
|
||||
END
|
||||
# If we don't find an include directive, just comment out the code.
|
||||
AC_MSG_CHECKING([for style of include used by $am_make])
|
||||
am__include="#"
|
||||
am__quote=
|
||||
_am_result=none
|
||||
# First try GNU make style include.
|
||||
echo "include confinc" > confmf
|
||||
# We grep out `Entering directory' and `Leaving directory'
|
||||
# messages which can occur if `w' ends up in MAKEFLAGS.
|
||||
# In particular we don't look at `^make:' because GNU make might
|
||||
# be invoked under some other name (usually "gmake"), in which
|
||||
# case it prints its new name instead of `make'.
|
||||
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
|
||||
am__include=include
|
||||
am__quote=
|
||||
_am_result=GNU
|
||||
fi
|
||||
# Now try BSD make style include.
|
||||
if test "$am__include" = "#"; then
|
||||
echo '.include "confinc"' > confmf
|
||||
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
|
||||
am__include=.include
|
||||
am__quote="\""
|
||||
_am_result=BSD
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([am__include])
|
||||
AC_SUBST([am__quote])
|
||||
AC_MSG_RESULT([$_am_result])
|
||||
rm -f confinc confmf
|
||||
])
|
||||
|
||||
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 5
|
||||
|
||||
# AM_MISSING_PROG(NAME, PROGRAM)
|
||||
# ------------------------------
|
||||
AC_DEFUN([AM_MISSING_PROG],
|
||||
[AC_REQUIRE([AM_MISSING_HAS_RUN])
|
||||
$1=${$1-"${am_missing_run}$2"}
|
||||
AC_SUBST($1)])
|
||||
|
||||
|
||||
# AM_MISSING_HAS_RUN
|
||||
# ------------------
|
||||
# Define MISSING if not defined so far and test if it supports --run.
|
||||
# If it does, set am_missing_run to use it, otherwise, to nothing.
|
||||
AC_DEFUN([AM_MISSING_HAS_RUN],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
AC_REQUIRE_AUX_FILE([missing])dnl
|
||||
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
|
||||
# Use eval to expand $SHELL
|
||||
if eval "$MISSING --run true"; then
|
||||
am_missing_run="$MISSING --run "
|
||||
else
|
||||
am_missing_run=
|
||||
AC_MSG_WARN([`missing' script is too old or missing])
|
||||
fi
|
||||
])
|
||||
|
||||
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_MKDIR_P
|
||||
# ---------------
|
||||
# Check for `mkdir -p'.
|
||||
AC_DEFUN([AM_PROG_MKDIR_P],
|
||||
[AC_PREREQ([2.60])dnl
|
||||
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
|
||||
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
|
||||
dnl while keeping a definition of mkdir_p for backward compatibility.
|
||||
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
|
||||
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
|
||||
dnl Makefile.ins that do not define MKDIR_P, so we do our own
|
||||
dnl adjustment using top_builddir (which is defined more often than
|
||||
dnl MKDIR_P).
|
||||
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
|
||||
case $mkdir_p in
|
||||
[[\\/$]]* | ?:[[\\/]]*) ;;
|
||||
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
|
||||
esac
|
||||
])
|
||||
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 4
|
||||
|
||||
# _AM_MANGLE_OPTION(NAME)
|
||||
# -----------------------
|
||||
AC_DEFUN([_AM_MANGLE_OPTION],
|
||||
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
|
||||
|
||||
# _AM_SET_OPTION(NAME)
|
||||
# ------------------------------
|
||||
# Set option NAME. Presently that only means defining a flag for this option.
|
||||
AC_DEFUN([_AM_SET_OPTION],
|
||||
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
|
||||
|
||||
# _AM_SET_OPTIONS(OPTIONS)
|
||||
# ----------------------------------
|
||||
# OPTIONS is a space-separated list of Automake options.
|
||||
AC_DEFUN([_AM_SET_OPTIONS],
|
||||
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
|
||||
|
||||
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
|
||||
# -------------------------------------------
|
||||
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||
AC_DEFUN([_AM_IF_OPTION],
|
||||
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
||||
|
||||
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 4
|
||||
|
||||
# AM_SANITY_CHECK
|
||||
# ---------------
|
||||
AC_DEFUN([AM_SANITY_CHECK],
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftest.file
|
||||
# Do `set' in a subshell so we don't clobber the current shell's
|
||||
# arguments. Must try -L first in case configure is actually a
|
||||
# symlink; some systems play weird games with the mod time of symlinks
|
||||
# (eg FreeBSD returns the mod time of the symlink's containing
|
||||
# directory).
|
||||
if (
|
||||
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
|
||||
if test "$[*]" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t $srcdir/configure conftest.file`
|
||||
fi
|
||||
rm -f conftest.file
|
||||
if test "$[*]" != "X $srcdir/configure conftest.file" \
|
||||
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
|
||||
|
||||
# If neither matched, then we have a broken ls. This can happen
|
||||
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
||||
# broken ls alias from the environment. This has actually
|
||||
# happened. Such a system could not be considered "sane".
|
||||
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
||||
alias in your environment])
|
||||
fi
|
||||
|
||||
test "$[2]" = conftest.file
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
AC_MSG_RESULT(yes)])
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_INSTALL_STRIP
|
||||
# ---------------------
|
||||
# One issue with vendor `install' (even GNU) is that you can't
|
||||
# specify the program used to strip binaries. This is especially
|
||||
# annoying in cross-compiling environments, where the build's strip
|
||||
# is unlikely to handle the host's binaries.
|
||||
# Fortunately install-sh will honor a STRIPPROG variable, so we
|
||||
# always use install-sh in `make install-strip', and initialize
|
||||
# STRIPPROG with the value of the STRIP variable (set by the user).
|
||||
AC_DEFUN([AM_PROG_INSTALL_STRIP],
|
||||
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
||||
# Installed binaries are usually stripped using `strip' when the user
|
||||
# run `make install-strip'. However `strip' might not be the right
|
||||
# tool to use in cross-compilation environments, therefore Automake
|
||||
# will honor the `STRIP' environment variable to overrule this program.
|
||||
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
|
||||
if test "$cross_compiling" != no; then
|
||||
AC_CHECK_TOOL([STRIP], [strip], :)
|
||||
fi
|
||||
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
||||
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||
|
||||
# Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# _AM_SUBST_NOTMAKE(VARIABLE)
|
||||
# ---------------------------
|
||||
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
|
||||
# This macro is traced by Automake.
|
||||
AC_DEFUN([_AM_SUBST_NOTMAKE])
|
||||
|
||||
# Check how to create a tarball. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
|
||||
# _AM_PROG_TAR(FORMAT)
|
||||
# --------------------
|
||||
# Check how to create a tarball in format FORMAT.
|
||||
# FORMAT should be one of `v7', `ustar', or `pax'.
|
||||
#
|
||||
# Substitute a variable $(am__tar) that is a command
|
||||
# writing to stdout a FORMAT-tarball containing the directory
|
||||
# $tardir.
|
||||
# tardir=directory && $(am__tar) > result.tar
|
||||
#
|
||||
# Substitute a variable $(am__untar) that extract such
|
||||
# a tarball read from stdin.
|
||||
# $(am__untar) < result.tar
|
||||
AC_DEFUN([_AM_PROG_TAR],
|
||||
[# Always define AMTAR for backward compatibility.
|
||||
AM_MISSING_PROG([AMTAR], [tar])
|
||||
m4_if([$1], [v7],
|
||||
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
|
||||
[m4_case([$1], [ustar],, [pax],,
|
||||
[m4_fatal([Unknown tar format])])
|
||||
AC_MSG_CHECKING([how to create a $1 tar archive])
|
||||
# Loop over all known methods to create a tar archive until one works.
|
||||
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
|
||||
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
|
||||
# Do not fold the above two line into one, because Tru64 sh and
|
||||
# Solaris sh will not grok spaces in the rhs of `-'.
|
||||
for _am_tool in $_am_tools
|
||||
do
|
||||
case $_am_tool in
|
||||
gnutar)
|
||||
for _am_tar in tar gnutar gtar;
|
||||
do
|
||||
AM_RUN_LOG([$_am_tar --version]) && break
|
||||
done
|
||||
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
|
||||
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
|
||||
am__untar="$_am_tar -xf -"
|
||||
;;
|
||||
plaintar)
|
||||
# Must skip GNU tar: if it does not support --format= it doesn't create
|
||||
# ustar tarball either.
|
||||
(tar --version) >/dev/null 2>&1 && continue
|
||||
am__tar='tar chf - "$$tardir"'
|
||||
am__tar_='tar chf - "$tardir"'
|
||||
am__untar='tar xf -'
|
||||
;;
|
||||
pax)
|
||||
am__tar='pax -L -x $1 -w "$$tardir"'
|
||||
am__tar_='pax -L -x $1 -w "$tardir"'
|
||||
am__untar='pax -r'
|
||||
;;
|
||||
cpio)
|
||||
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
|
||||
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
|
||||
am__untar='cpio -i -H $1 -d'
|
||||
;;
|
||||
none)
|
||||
am__tar=false
|
||||
am__tar_=false
|
||||
am__untar=false
|
||||
;;
|
||||
esac
|
||||
|
||||
# If the value was cached, stop now. We just wanted to have am__tar
|
||||
# and am__untar set.
|
||||
test -n "${am_cv_prog_tar_$1}" && break
|
||||
|
||||
# tar/untar a dummy directory, and stop if the command works
|
||||
rm -rf conftest.dir
|
||||
mkdir conftest.dir
|
||||
echo GrepMe > conftest.dir/file
|
||||
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
|
||||
rm -rf conftest.dir
|
||||
if test -s conftest.tar; then
|
||||
AM_RUN_LOG([$am__untar <conftest.tar])
|
||||
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
|
||||
fi
|
||||
done
|
||||
rm -rf conftest.dir
|
||||
|
||||
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
|
||||
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
|
||||
AC_SUBST([am__tar])
|
||||
AC_SUBST([am__untar])
|
||||
]) # _AM_PROG_TAR
|
||||
|
||||
m4_include([m4/libtool.m4])
|
||||
m4_include([m4/ltoptions.m4])
|
||||
m4_include([m4/ltsugar.m4])
|
||||
m4_include([m4/ltversion.m4])
|
||||
m4_include([m4/lt~obsolete.m4])
|
138
src/animate.dsp
Normal file
138
src/animate.dsp
Normal file
@ -0,0 +1,138 @@
|
||||
# Microsoft Developer Studio Project File - Name="anim" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=anim - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "animate.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "animate.mak" CFG="anim - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "anim - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "anim - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "anim - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /I "c:\src\libpng" /I "c:\src\zlib" /I "c:\src\libxml2\include" /I "c:\src\jpeg" /I "c:\src\iconv\include" /I "c:\src\pthreads" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /Zm1000 /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib c:\src\jpeg\libjpeg.lib c:\src\libpng\libpng.lib c:\src\libxml2\lib\libxml2.lib c:\src\zlib\zlib.lib c:\src\pthreads\pthreadVC2.lib /nologo /subsystem:console /machine:I386 /out:"Release/flam3-animate.exe"
|
||||
|
||||
!ELSEIF "$(CFG)" == "anim - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "c:\src\jpeg" /I "c:\src\libpng" /I "c:\src\zlib" /I "c:\src\libxml2\include" /I "c:\src\iconv\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /Zm1000 /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib c:\src\jpeg\libjpeg.lib c:\src\libpng\libpng.lib c:\src\libxml2\lib\libxml2.lib c:\src\zlib\zlib.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "anim - Win32 Release"
|
||||
# Name "anim - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\docstring.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\flam3-animate.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\flam3-palettes.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\flam3.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\isaac.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\jpeg.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\png.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=config.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\jpeg.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=rect.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
1516
src/config.guess
vendored
Executable file
1516
src/config.guess
vendored
Executable file
File diff suppressed because it is too large
Load Diff
89
src/config.h.in
Normal file
89
src/config.h.in
Normal file
@ -0,0 +1,89 @@
|
||||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Have 64-bit __sync_bool_compare_and_swap() and friends. */
|
||||
#undef HAVE_GCC_64BIT_ATOMIC_OPS
|
||||
|
||||
/* Have 32-bit __sync_bool_compare_and_swap() and friends. */
|
||||
#undef HAVE_GCC_ATOMIC_OPS
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the `jpeg' library (-ljpeg). */
|
||||
#undef HAVE_LIBJPEG
|
||||
|
||||
/* Define to 1 if you have the `png' library (-lpng). */
|
||||
#undef HAVE_LIBPNG
|
||||
|
||||
/* Define to 1 if you have the `pthread' library (-lpthread). */
|
||||
#undef HAVE_LIBPTHREAD
|
||||
|
||||
/* Define to 1 if you have the `xml2' library (-lxml2). */
|
||||
#undef HAVE_LIBXML2
|
||||
|
||||
/* Define to 1 if you have the `z' library (-lz). */
|
||||
#undef HAVE_LIBZ
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
1626
src/config.sub
vendored
Executable file
1626
src/config.sub
vendored
Executable file
File diff suppressed because it is too large
Load Diff
14453
src/configure
vendored
Executable file
14453
src/configure
vendored
Executable file
File diff suppressed because it is too large
Load Diff
84
src/configure.in
Normal file
84
src/configure.in
Normal file
@ -0,0 +1,84 @@
|
||||
dnl $Id: configure.in,v 1.42 2008-07-21 18:51:56 spotspot Exp $
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT(flam3-animate.c)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
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)])
|
||||
AM_INIT_AUTOMAKE(flam3,"2.8b7")
|
||||
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
# Save CFLAGS from the environment
|
||||
save_CFLAGS=$CFLAGS
|
||||
|
||||
AC_PROG_CC
|
||||
|
||||
CFLAGS=$save_CFLAGS
|
||||
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
AM_DISABLE_SHARED
|
||||
AC_PROG_LIBTOOL
|
||||
AC_HEADER_STDC
|
||||
AC_C_CONST
|
||||
AC_TYPE_SIZE_T
|
||||
AC_HEADER_TIME
|
||||
AC_CHECK_LIB([z],[deflateInit_],,[AC_MSG_ERROR([zlib is required.])])
|
||||
AC_CHECK_LIB([png],[png_write_image],,[AC_MSG_ERROR([The png library is required.])])
|
||||
AC_CHECK_LIB([xml2],[xmlParseFile],,[AC_MSG_ERROR([The xml2 library is required.])])
|
||||
|
||||
|
||||
if test "${enable_atomic_ops}" = "" ; then
|
||||
enable_atomic_ops=yes
|
||||
fi
|
||||
|
||||
if test "${enable_atomic_ops}" = "yes" ; then
|
||||
|
||||
AC_MSG_CHECKING([whether $CC knows 32-bit __sync_bool_compare_and_swap()])
|
||||
AC_LANG_CONFTEST([#include <stdint.h>
|
||||
int main() { uint32_t a = 4;
|
||||
__sync_bool_compare_and_swap(&a, 4, 5); }])
|
||||
$CC conftest.c $CFLAGS -o conftest > /dev/null 2> /dev/null
|
||||
ret=$?
|
||||
rm -f conftest.o conftest
|
||||
if test $ret -eq 0 ; then
|
||||
AC_DEFINE([HAVE_GCC_ATOMIC_OPS], 1, [Have 32-bit __sync_bool_compare_and_swap() and friends.])
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no - try specifying CFLAGS=-march={your_arch}])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether $CC knows 64-bit __sync_bool_compare_and_swap()])
|
||||
AC_LANG_CONFTEST([#include <stdint.h>
|
||||
int main() { uint64_t a = 4; __sync_bool_compare_and_swap(&a, 4, 5); }])
|
||||
$CC conftest.c $CFLAGS -o conftest > /dev/null 2> /dev/null
|
||||
ret=$?
|
||||
rm -f conftest.o conftest
|
||||
if test $ret -eq 0 ; then
|
||||
AC_DEFINE([HAVE_GCC_64BIT_ATOMIC_OPS], 1, [Have 64-bit __sync_bool_compare_and_swap() and friends.])
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no - try specifying CFLAGS=-march={your_arch}])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "${enable_pthread}" = "" ; then
|
||||
enable_pthread=yes
|
||||
fi
|
||||
|
||||
if test "${enable_pthread}" = "yes" ; then
|
||||
AC_CHECK_LIB([pthread],[pthread_create],,[AC_MSG_WARN([Pthread library not found - threads disabled.])])
|
||||
fi
|
||||
AC_CHECK_LIB([jpeg],[jpeg_start_compress],,[AC_MSG_ERROR([The jpeg library is required.])])
|
||||
AC_PATH_PROG(XML2_CONFIG,xml2-config, no, $PATH:/bin:/usr/bin:/usr/local/bin)
|
||||
|
||||
if test "$XML2_CONFIG" != "no"
|
||||
then
|
||||
CPPFLAGS="`$XML2_CONFIG --cflags` $CPPFLAGS"
|
||||
fi
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
flam3.pc
|
||||
])
|
146
src/convert.dsp
Normal file
146
src/convert.dsp
Normal file
@ -0,0 +1,146 @@
|
||||
# Microsoft Developer Studio Project File - Name="convert" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=convert - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "convert.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "convert.mak" CFG="convert - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "convert - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "convert - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "convert - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /I "c:\src\libxml2\include" /I "c:\src\jpeg" /I "c:\src\iconv\include" /I "c:\src\pthreads" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /Zm1000 /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 c:\src\expat\expat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib c:\src\jpeg\libjpeg.lib c:\src\libpng\libpng.lib c:\src\libxml2\lib\libxml2.lib c:\src\zlib\zlib.lib c:\src\pthreads\pthreadVC2.lib /nologo /subsystem:console /machine:I386 /out:"Release/flam3-convert.exe"
|
||||
|
||||
!ELSEIF "$(CFG)" == "convert - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "c:\src\expat\xmlparse" /I "c:\src\jpeg" /I "c:\src\libxml2\include" /I "c:\src\iconv\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib c:\src\expat\expat.lib c:\src\jpeg\libjpeg.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "convert - Win32 Release"
|
||||
# Name "convert - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\docstring.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\flam3-convert.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\flam3-palettes.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\flam3.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\isaac.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\jpeg.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\png.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=cmap.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=config.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=jpeg.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=libifs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=rect.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
206
src/docstring.c
Normal file
206
src/docstring.c
Normal file
@ -0,0 +1,206 @@
|
||||
/*
|
||||
FLAM3 - cosmic recursive fractal flames
|
||||
Copyright (C) 1992-2009 Spotworks LLC
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include "config.h"
|
||||
#include "flam3.h"
|
||||
|
||||
|
||||
static char *the_docstring0 =
|
||||
"FLAM3 - cosmic recursive fractal flames version ";
|
||||
|
||||
static char *the_docstring1 =
|
||||
"\n\n"
|
||||
"This software is licensed under the GPL. You should have access\n"
|
||||
"to the source code; see http://www.fsf.org/licenses/gpl.html.\n"
|
||||
"\n"
|
||||
"This is free software to render fractal flames as described on\n"
|
||||
"http://flam3.com. Flam3-animate makes animations, and flam3-render\n"
|
||||
"makes still images. Flam3-genome creates and manipulates genomes\n"
|
||||
"(parameter sets). A C library is also installed.\n"
|
||||
"\n"
|
||||
"Note: the following instructions are written for Linux users. Windows\n"
|
||||
"users may have to install the cygwin package to get the \"env\"\n"
|
||||
"command or set the envars in your windows command prompt manually.\n"
|
||||
"That means instead of a command like\n"
|
||||
"\n"
|
||||
" env dtime=5 prefix=foo. in=test.flame flam3-animate\n"
|
||||
"\n"
|
||||
"say\n"
|
||||
"\n"
|
||||
" set dtime=5\n"
|
||||
" set prefix=foo.\n"
|
||||
" set in=test.flame\n"
|
||||
" flam3-animate\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"envar default meaning\n"
|
||||
"===== ======= =======\n"
|
||||
"prefix (empty) prefix names of output files with this string.\n"
|
||||
"begin j time of first frame to render (j=first time specified in file) (animate only)\n"
|
||||
"end n-1 time of last frame to render (n=last time specified in the input file) (animate only)\n"
|
||||
"time NA time of first and last frame (ie do one frame) (animate only)\n"
|
||||
"frame NA synonym for \"time\" (animate only)\n"
|
||||
"in stdin name of input file\n"
|
||||
"out NA name of output file (bad idea if rending more than one, use prefix instead)\n"
|
||||
"template NA apply defaults based on this genome (genome only)\n"
|
||||
"dtime 1 time between frames (animate only)\n"
|
||||
"fields 0 if 1 then render fields, ie odd scanlines at time+0.5\n"
|
||||
"nstrips 1 number of strips, ie render fractions of a frame at once (render only)\n"
|
||||
"qs 1 quality scale, multiply quality of all frames by this\n"
|
||||
"ss 1 size scale, multiply size (in pixels) of all frames by this\n"
|
||||
"jpeg NA jpeg quality for compression, default is native jpeg default\n"
|
||||
"format png jpg or ppm or png\n"
|
||||
"pixel_aspect 1.0 aspect ratio of pixels (width over height), eg 0.90909 for NTSC\n"
|
||||
"seed random integer seed for random numbers, defaults to time+pid\n"
|
||||
"isaac_seed random character-based seed for iteration loop randomness, defaults to time\n"
|
||||
"nthreads 0 number of threads to use for render. default auto-detects.\n"
|
||||
"verbose 0 if non-zero then print progress meter on stderr\n"
|
||||
"bits 33 also 32 or 64: sets bit-width of internal buffers (33 means 32-bit floating-point)\n"
|
||||
"bpc 8 bits per color channel: png supports 16, all others are 8 only (render/animate)\n"
|
||||
"image filename replace palette with png, jpg, or ppm image\n"
|
||||
"use_vars -1 comma separated list of variation #'s to use when generating a random flame (genome only)\n"
|
||||
"dont_use_vars NA comma separated list of variation #'s to NOT use when generating a random flame (genome only)\n"
|
||||
"cross0 NA randomly select one genome from this file to genetically cross (genome only)\n"
|
||||
"cross1 NA with one genome from this file (genome only)\n"
|
||||
"method NA method used for genetic cross: alternate, interpolate, or union. (genome only)\n"
|
||||
"mutate NA randomly mutate a random genome from this file (genome only)\n"
|
||||
"symmetry NA set symmetry of result. (genome only)\n"
|
||||
"clone NA clone random flame in input (genome only)\n"
|
||||
"clone_all NA clones all flames in file. useful for applying template to all flames (genome only)\n"
|
||||
"animate NA interpolates between all flames in a file, using times specified in file (genome only)\n"
|
||||
"sequence NA 360 degree rotation 'loops' times of each control point plus rotating transitions (genome only)\n"
|
||||
"loops NA number of times to rotate each control point in sequence (genome only)\n"
|
||||
"tries 50 number of tries to make to find a good genome. (genome only)\n"
|
||||
"strip NA strip input, frame and nframes control which one. (genome only)\n"
|
||||
"transparency 0 make bknd transparent, if format supports it (render/animate)\n"
|
||||
"name_enable 0 use 'name' attr in <flame> to name image output if present (render only)\n"
|
||||
"nick \"\" nickname to use in <edit> tags / img comments\n"
|
||||
"url \"\" url to use in <edit> tags / img comments\n"
|
||||
"id \"\" ID to use in <edit> tags\n"
|
||||
"comment \"\" comment string for <edit> tags (genome only)\n"
|
||||
"use_mem auto floating point number of bytes of memory to use (render only)\n"
|
||||
"write_genome 0 write out genome associated with center of motion blur window (animate only)\n"
|
||||
"noedits unset omit edit tags from output (genome only)\n"
|
||||
"print_edit_depth 0 depth to truncate <edit> tag structure. 0 prints all <edit> tags (genome only)\n"
|
||||
"intpalette unset round palette entries for importing into older Apophysis versions (genome only)\n"
|
||||
"insert_palette unset insert the palette into the image.\n"
|
||||
"enable_jpeg_comments 1 enables comments in the jpeg header (render and animate)\n"
|
||||
"enable_png_comments 1 enables comments in the png header (render and animate)\n"
|
||||
"\n"
|
||||
"New in 2.8:\n"
|
||||
"earlyclip 0 enables the early clipping of rgb values for better antialiasing and resizing\n"
|
||||
" defaults to 0 for backwards compatibility\n"
|
||||
"flam27 0 flam3 2.7 compatibility mode; ensures generated genomes can be used by flam3 2.7.18\n"
|
||||
"stagger 0 affects simultaneity of xform interpolation during genome interpolation.\n"
|
||||
" represents how 'separate' the xforms are interpolated. set to 1 for each\n"
|
||||
" xform to be interpolated individually, fractions control interp overlap.\n"
|
||||
|
||||
"\n"
|
||||
"for example:\n"
|
||||
"\n"
|
||||
" env dtime=5 prefix=foo. in=test.flam3 flam3-animate\n"
|
||||
"\n"
|
||||
"means to render every 5th frame of parameter file foo.flam3, and store\n"
|
||||
"the results in files named foo.XXXX.jpg.\n"
|
||||
"\n"
|
||||
"the flam3-convert program reads from stdin the old format created by\n"
|
||||
"the GIMP and writes to stdout the new xml format.\n"
|
||||
"\n"
|
||||
"the flam3-genome program creates random parameter files. it also mutates,\n"
|
||||
"rotates, and interpolates existing parameter files. for example to\n"
|
||||
"create 10 wholly new control points and render them at normal quality:\n"
|
||||
"\n"
|
||||
" env template=vidres.flam3 repeat=10 flam3-genome > new.flam3\n"
|
||||
" flam3-render < new.flam3\n"
|
||||
"\n"
|
||||
"if you left out the \"template=vidres.flam3\" part then the size,\n"
|
||||
"quality, etc parameters would be their default (small) values. you\n"
|
||||
"can set the symmetry group:\n"
|
||||
"\n"
|
||||
" env template=vidres.flam3 symmetry=3 flam3-genome > new3.flam3\n"
|
||||
" env template=vidres.flam3 symmetry=-2 flam3-genome > new-2.flam3\n"
|
||||
" flam3-render < new3.flam3\n"
|
||||
" flam3-render < new-2.flam3\n"
|
||||
"\n"
|
||||
"Mutation is done by giving an input flame file to alter:\n"
|
||||
"\n"
|
||||
" env template=vidres.flam3 flam3-genome > parent.flam3\n"
|
||||
" env prefix=parent. flam3-render < parent.flam3\n"
|
||||
" env template=vidres.flam3 mutate=parent.flam3 repeat=10 flam3-genome > mutation.flam3\n"
|
||||
" flam3-render < mutation.flam3\n"
|
||||
"\n"
|
||||
"Normally one wouldn't use the same file for the template and the file\n"
|
||||
"to mutate. Crossover is handled similarly:\n"
|
||||
"\n"
|
||||
" env template=vidres.flam3 flam3-genome > parent0.flam3\n"
|
||||
" env prefix=parent0. flam3-render < parent0.flam3\n"
|
||||
" env template=vidres.flam3 flam3-genome > parent1.flam3\n"
|
||||
" env prefix=parent1. flam3-render < parent1.flam3\n"
|
||||
" env template=vidres.flam3 cross0=parent0.flam3 cross1=parent1.flam3 flam3-genome > crossover.flam3\n"
|
||||
" flam3-render < crossover.flam3\n"
|
||||
"\n"
|
||||
"flam3-genome has 3 ways to produce parameter files for animation in\n"
|
||||
"the style of electric sheep. the highest level and most useful from\n"
|
||||
"the command line is the sequence method. it takes a collection of\n"
|
||||
"control points and makes an animation that has each flame do fractal\n"
|
||||
"rotation for 360 degrees, then make a smooth transition to the next.\n"
|
||||
"for example:\n"
|
||||
"\n"
|
||||
" env sequence=test.flam3 nframes=20 flam3-genome > seq.flam3\n"
|
||||
" flam3-animate < seq.flam3\n"
|
||||
"\n"
|
||||
"creates and renders a 60 frame animation. there are two flames in\n"
|
||||
"test.flam3, so the animation consists three stags: the first one\n"
|
||||
"rotating, then a transition, then the second one rotating. each stage\n"
|
||||
"has 20 frames as specified on the command line. if you want to\n"
|
||||
"render only some fraction of a whole animation file, specify the begin\n"
|
||||
"and end times:\n"
|
||||
"\n"
|
||||
" env begin=20 end=40 flam3-animate < seq.flam3\n"
|
||||
"\n"
|
||||
"the other two methods are harder to use becaues they produce files that\n"
|
||||
"are only good for one frame of animation. the output consists of 3\n"
|
||||
"control points, one for the time requested, one before and one after.\n"
|
||||
"that allows proper motion blur. for example:\n"
|
||||
"\n"
|
||||
" env template=vidres.flam3 flam3-genome > rotme.flam3\n"
|
||||
" env rotate=rotme.flam3 frame=10 nframes=20 flam3-genome > rot10.flam3\n"
|
||||
" env frame=10 flam3-animate < rot10.flam3\n"
|
||||
"\n"
|
||||
"the file rot10.flam3 specifies the animation for just one frame, in\n"
|
||||
"this case 10 out of 20 frames in the complete animation. C1\n"
|
||||
"continuous electric sheep genetic crossfades are created like this:\n"
|
||||
"\n"
|
||||
" env inter=test.flam3 frame=10 nframes=20 flam3-genome > inter10.flam3\n"
|
||||
" env frame=10 flam3-animate < inter10.flam3\n"
|
||||
"\n"
|
||||
"see http://flam3.com/flame.pdf for descriptions & formulas, and\n"
|
||||
"see http://electricsheep.wikispaces.com/Variations for updates.\n"
|
||||
"\n"
|
||||
"The complete list of variations:\n"
|
||||
;
|
||||
|
||||
void docstring() {
|
||||
int i;
|
||||
fputs(the_docstring0, stdout);
|
||||
fputs(flam3_version(), stdout);
|
||||
fputs(the_docstring1, stdout);
|
||||
for (i = 0; i < flam3_nvariations; i++)
|
||||
printf(" %2d. %s\n", i, flam3_variation_names[i]);
|
||||
}
|
490
src/filters.c
Normal file
490
src/filters.c
Normal file
@ -0,0 +1,490 @@
|
||||
/*
|
||||
FLAM3 - cosmic recursive fractal flames
|
||||
Copyright (C) 1992-2009 Spotworks LLC
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "filters.h"
|
||||
|
||||
|
||||
/*
|
||||
* filter function definitions
|
||||
* from Graphics Gems III code
|
||||
* and ImageMagick resize.c
|
||||
*/
|
||||
|
||||
|
||||
double flam3_spatial_support[flam3_num_spatialfilters] = {
|
||||
|
||||
1.5, /* gaussian */
|
||||
1.0, /* hermite */
|
||||
0.5, /* box */
|
||||
1.0, /* triangle */
|
||||
1.5, /* bell */
|
||||
2.0, /* b spline */
|
||||
2.0, /* mitchell */
|
||||
1.0, /* blackman */
|
||||
2.0, /* catrom */
|
||||
1.0, /* hanning */
|
||||
1.0, /* hamming */
|
||||
3.0, /* lanczos3 */
|
||||
2.0, /* lanczos2 */
|
||||
1.5 /* quadratic */
|
||||
};
|
||||
|
||||
double flam3_hermite_filter(double t) {
|
||||
/* f(t) = 2|t|^3 - 3|t|^2 + 1, -1 <= t <= 1 */
|
||||
if(t < 0.0) t = -t;
|
||||
if(t < 1.0) return((2.0 * t - 3.0) * t * t + 1.0);
|
||||
return(0.0);
|
||||
}
|
||||
|
||||
double flam3_box_filter(double t) {
|
||||
if((t > -0.5) && (t <= 0.5)) return(1.0);
|
||||
return(0.0);
|
||||
}
|
||||
|
||||
double flam3_triangle_filter(double t) {
|
||||
if(t < 0.0) t = -t;
|
||||
if(t < 1.0) return(1.0 - t);
|
||||
return(0.0);
|
||||
}
|
||||
|
||||
double flam3_bell_filter(double t) {
|
||||
/* box (*) box (*) box */
|
||||
if(t < 0) t = -t;
|
||||
if(t < .5) return(.75 - (t * t));
|
||||
if(t < 1.5) {
|
||||
t = (t - 1.5);
|
||||
return(.5 * (t * t));
|
||||
}
|
||||
return(0.0);
|
||||
}
|
||||
|
||||
double flam3_b_spline_filter(double t) {
|
||||
|
||||
/* box (*) box (*) box (*) box */
|
||||
double tt;
|
||||
|
||||
if(t < 0) t = -t;
|
||||
if(t < 1) {
|
||||
tt = t * t;
|
||||
return((.5 * tt * t) - tt + (2.0 / 3.0));
|
||||
} else if(t < 2) {
|
||||
t = 2 - t;
|
||||
return((1.0 / 6.0) * (t * t * t));
|
||||
}
|
||||
return(0.0);
|
||||
}
|
||||
|
||||
double flam3_sinc(double x) {
|
||||
x *= M_PI;
|
||||
if(x != 0) return(sin(x) / x);
|
||||
return(1.0);
|
||||
}
|
||||
|
||||
double flam3_blackman_filter(double x) {
|
||||
return(0.42+0.5*cos(M_PI*x)+0.08*cos(2*M_PI*x));
|
||||
}
|
||||
|
||||
double flam3_catrom_filter(double x) {
|
||||
if (x < -2.0)
|
||||
return(0.0);
|
||||
if (x < -1.0)
|
||||
return(0.5*(4.0+x*(8.0+x*(5.0+x))));
|
||||
if (x < 0.0)
|
||||
return(0.5*(2.0+x*x*(-5.0-3.0*x)));
|
||||
if (x < 1.0)
|
||||
return(0.5*(2.0+x*x*(-5.0+3.0*x)));
|
||||
if (x < 2.0)
|
||||
return(0.5*(4.0+x*(-8.0+x*(5.0-x))));
|
||||
return(0.0);
|
||||
}
|
||||
|
||||
double flam3_mitchell_filter(double t) {
|
||||
double tt;
|
||||
|
||||
tt = t * t;
|
||||
if(t < 0) t = -t;
|
||||
if(t < 1.0) {
|
||||
t = (((12.0 - 9.0 * flam3_mitchell_b - 6.0 * flam3_mitchell_c) * (t * tt))
|
||||
+ ((-18.0 + 12.0 * flam3_mitchell_b + 6.0 * flam3_mitchell_c) * tt)
|
||||
+ (6.0 - 2 * flam3_mitchell_b));
|
||||
return(t / 6.0);
|
||||
} else if(t < 2.0) {
|
||||
t = (((-1.0 * flam3_mitchell_b - 6.0 * flam3_mitchell_c) * (t * tt))
|
||||
+ ((6.0 * flam3_mitchell_b + 30.0 * flam3_mitchell_c) * tt)
|
||||
+ ((-12.0 * flam3_mitchell_b - 48.0 * flam3_mitchell_c) * t)
|
||||
+ (8.0 * flam3_mitchell_b + 24 * flam3_mitchell_c));
|
||||
return(t / 6.0);
|
||||
}
|
||||
return(0.0);
|
||||
}
|
||||
|
||||
double flam3_hanning_filter(double x) {
|
||||
return(0.5+0.5*cos(M_PI*x));
|
||||
}
|
||||
|
||||
double flam3_hamming_filter(double x) {
|
||||
return(0.54+0.46*cos(M_PI*x));
|
||||
}
|
||||
|
||||
double flam3_lanczos3_filter(double t) {
|
||||
if(t < 0) t = -t;
|
||||
if(t < 3.0) return(flam3_sinc(t) * flam3_sinc(t/3.0));
|
||||
return(0.0);
|
||||
}
|
||||
|
||||
double flam3_lanczos2_filter(double t) {
|
||||
if(t < 0) t = -t;
|
||||
if(t < 2.0) return(flam3_sinc(t) * flam3_sinc(t/2.0));
|
||||
return(0.0);
|
||||
}
|
||||
|
||||
double flam3_gaussian_filter(double x) {
|
||||
return(exp((-2.0*x*x))*sqrt(2.0/M_PI));
|
||||
}
|
||||
|
||||
double flam3_quadratic_filter(double x) {
|
||||
if (x < -1.5)
|
||||
return(0.0);
|
||||
if (x < -0.5)
|
||||
return(0.5*(x+1.5)*(x+1.5));
|
||||
if (x < 0.5)
|
||||
return(0.75-x*x);
|
||||
if (x < 1.5)
|
||||
return(0.5*(x-1.5)*(x-1.5));
|
||||
return(0.0);
|
||||
}
|
||||
|
||||
double flam3_spatial_filter(int knum, double x) {
|
||||
|
||||
if (knum==0)
|
||||
return flam3_gaussian_filter(x);
|
||||
else if (knum==1)
|
||||
return flam3_hermite_filter(x);
|
||||
else if (knum==2)
|
||||
return flam3_box_filter(x);
|
||||
else if (knum==3)
|
||||
return flam3_triangle_filter(x);
|
||||
else if (knum==4)
|
||||
return flam3_bell_filter(x);
|
||||
else if (knum==5)
|
||||
return flam3_b_spline_filter(x);
|
||||
else if (knum==6)
|
||||
return flam3_mitchell_filter(x);
|
||||
else if (knum==7)
|
||||
return flam3_sinc(x)*flam3_blackman_filter(x);
|
||||
else if (knum==8)
|
||||
return flam3_catrom_filter(x);
|
||||
else if (knum==9)
|
||||
return flam3_sinc(x)*flam3_hanning_filter(x);
|
||||
else if (knum==10)
|
||||
return flam3_sinc(x)*flam3_hamming_filter(x);
|
||||
else if (knum==11)
|
||||
return flam3_lanczos3_filter(x)*flam3_sinc(x/3.0);
|
||||
else if (knum==12)
|
||||
return flam3_lanczos2_filter(x)*flam3_sinc(x/2.0);
|
||||
else if (knum==13)
|
||||
return flam3_quadratic_filter(x);
|
||||
}
|
||||
|
||||
int normalize_vector(double *v, int n) {
|
||||
double t = 0.0;
|
||||
int i;
|
||||
for (i = 0; i < n; i++)
|
||||
t += v[i];
|
||||
if (0.0 == t) return 1;
|
||||
t = 1.0 / t;
|
||||
for (i = 0; i < n; i++)
|
||||
v[i] *= t;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int flam3_create_spatial_filter(flam3_frame *spec, int field, double **filter) {
|
||||
|
||||
int sf_kernel = spec->genomes[0].spatial_filter_select;
|
||||
int supersample = spec->genomes[0].spatial_oversample;
|
||||
double sf_radius = spec->genomes[0].spatial_filter_radius;
|
||||
double aspect_ratio = spec->pixel_aspect_ratio;
|
||||
double sf_supp = flam3_spatial_support[sf_kernel];
|
||||
|
||||
double fw = 2.0 * sf_supp * supersample * sf_radius / aspect_ratio;
|
||||
double adjust, ii, jj;
|
||||
|
||||
int fwidth = ((int) fw) + 1;
|
||||
int i,j;
|
||||
|
||||
|
||||
/* Make sure the filter kernel has same parity as oversample */
|
||||
if ((fwidth ^ supersample) & 1)
|
||||
fwidth++;
|
||||
|
||||
/* Calculate the coordinate scaling factor for the kernel values */
|
||||
if (fw > 0.0)
|
||||
adjust = sf_supp * fwidth / fw;
|
||||
else
|
||||
adjust = 1.0;
|
||||
|
||||
/* Calling function MUST FREE THE RETURNED KERNEL, lest ye leak memory */
|
||||
(*filter) = (double *)calloc(fwidth * fwidth,sizeof(double));
|
||||
|
||||
/* fill in the coefs */
|
||||
for (i = 0; i < fwidth; i++)
|
||||
for (j = 0; j < fwidth; j++) {
|
||||
|
||||
/* Calculate the function inputs for the kernel function */
|
||||
ii = ((2.0 * i + 1.0) / (double)fwidth - 1.0)*adjust;
|
||||
jj = ((2.0 * j + 1.0) / (double)fwidth - 1.0)*adjust;
|
||||
|
||||
/* Scale for scanlines */
|
||||
if (field) jj *= 2.0;
|
||||
|
||||
/* Adjust for aspect ratio */
|
||||
jj /= aspect_ratio;
|
||||
|
||||
(*filter)[i + j * fwidth] =
|
||||
flam3_spatial_filter(sf_kernel,ii) * flam3_spatial_filter(sf_kernel,jj);
|
||||
}
|
||||
|
||||
|
||||
if (normalize_vector((*filter), fwidth * fwidth)) {
|
||||
fprintf(stderr, "Spatial filter value is too small: %g. Terminating.\n",sf_radius);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
return (fwidth);
|
||||
}
|
||||
|
||||
flam3_de_helper flam3_create_de_filters(double max_rad, double min_rad, double curve, int ss) {
|
||||
|
||||
flam3_de_helper de;
|
||||
double comp_max_radius, comp_min_radius;
|
||||
double num_de_filters_d;
|
||||
int num_de_filters,de_max_ind;
|
||||
int de_row_size, de_half_size;
|
||||
int filtloop;
|
||||
int keep_thresh=100;
|
||||
|
||||
de.kernel_size=-1;
|
||||
|
||||
if (curve <= 0.0) {
|
||||
fprintf(stderr,"estimator curve must be > 0\n");
|
||||
return(de);
|
||||
}
|
||||
|
||||
if (max_rad < min_rad) {
|
||||
fprintf(stderr,"estimator must be larger than estimator_minimum.\n");
|
||||
fprintf(stderr,"(%f > %f) ? \n",max_rad,min_rad);
|
||||
return(de);
|
||||
}
|
||||
|
||||
/* We should scale the filter width by the oversample */
|
||||
/* The '+1' comes from the assumed distance to the first pixel */
|
||||
comp_max_radius = max_rad*ss + 1;
|
||||
comp_min_radius = min_rad*ss + 1;
|
||||
|
||||
/* Calculate how many filter kernels we need based on the decay function */
|
||||
/* */
|
||||
/* num filters = (de_max_width / de_min_width)^(1/estimator_curve) */
|
||||
/* */
|
||||
num_de_filters_d = pow( comp_max_radius/comp_min_radius, 1.0/curve );
|
||||
if (num_de_filters_d>1e7) {
|
||||
fprintf(stderr,"too many filters required in this configuration (%g)\n",num_de_filters_d);
|
||||
return(de);
|
||||
}
|
||||
num_de_filters = (int)ceil(num_de_filters_d);
|
||||
|
||||
/* Condense the smaller kernels to save space */
|
||||
if (num_de_filters>keep_thresh) {
|
||||
de_max_ind = (int)ceil(DE_THRESH + pow(num_de_filters-DE_THRESH,curve))+1;
|
||||
de.max_filtered_counts = (int)pow( (double)(de_max_ind-DE_THRESH), 1.0/curve) + DE_THRESH;
|
||||
} else {
|
||||
de_max_ind = num_de_filters;
|
||||
de.max_filtered_counts = de_max_ind;
|
||||
}
|
||||
|
||||
/* Allocate the memory for these filters */
|
||||
/* and the hit/width lookup vector */
|
||||
de_row_size = (int)(2*ceil(comp_max_radius)-1);
|
||||
de_half_size = (de_row_size-1)/2;
|
||||
de.kernel_size = (de_half_size+1)*(2+de_half_size)/2;
|
||||
|
||||
de.filter_coefs = (double *) calloc (de_max_ind * de.kernel_size,sizeof(double));
|
||||
de.filter_widths = (double *) calloc (de_max_ind,sizeof(double));
|
||||
|
||||
/* Generate the filter coefficients */
|
||||
de.max_filter_index = 0;
|
||||
for (filtloop=0;filtloop<de_max_ind;filtloop++) {
|
||||
|
||||
double de_filt_sum=0.0, de_filt_d;
|
||||
double de_filt_h;
|
||||
int dej,dek;
|
||||
double adjloop;
|
||||
int filter_coef_idx;
|
||||
|
||||
/* Calculate the filter width for this number of hits in a bin */
|
||||
if (filtloop<keep_thresh)
|
||||
de_filt_h = (comp_max_radius / pow(filtloop+1,curve));
|
||||
else {
|
||||
adjloop = pow(filtloop-keep_thresh,(1.0/curve)) + keep_thresh;
|
||||
de_filt_h = (comp_max_radius / pow(adjloop+1,curve));
|
||||
}
|
||||
|
||||
/* Once we've reached the min radius, don't populate any more */
|
||||
if (de_filt_h <= comp_min_radius) {
|
||||
de_filt_h = comp_min_radius;
|
||||
de.max_filter_index = filtloop;
|
||||
}
|
||||
|
||||
de.filter_widths[filtloop] = de_filt_h;
|
||||
|
||||
/* Calculate norm of kernel separately (easier) */
|
||||
for (dej=-de_half_size; dej<=de_half_size; dej++) {
|
||||
for (dek=-de_half_size; dek<=de_half_size; dek++) {
|
||||
|
||||
de_filt_d = sqrt( (double)(dej*dej+dek*dek) ) / de_filt_h;
|
||||
|
||||
/* Only populate the coefs within this radius */
|
||||
if (de_filt_d <= 1.0) {
|
||||
|
||||
/* Gaussian */
|
||||
de_filt_sum += flam3_spatial_filter(flam3_gaussian_kernel,
|
||||
flam3_spatial_support[flam3_gaussian_kernel]*de_filt_d);
|
||||
|
||||
/* Epanichnikov */
|
||||
// de_filt_sum += (1.0 - (de_filt_d * de_filt_d));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
filter_coef_idx = filtloop*de.kernel_size;
|
||||
|
||||
/* Calculate the unique entries of the kernel */
|
||||
for (dej=0; dej<=de_half_size; dej++) {
|
||||
for (dek=0; dek<=dej; dek++) {
|
||||
de_filt_d = sqrt( (double)(dej*dej+dek*dek) ) / de_filt_h;
|
||||
|
||||
/* Only populate the coefs within this radius */
|
||||
if (de_filt_d>1.0)
|
||||
de.filter_coefs[filter_coef_idx] = 0.0;
|
||||
else {
|
||||
|
||||
/* Gaussian */
|
||||
de.filter_coefs[filter_coef_idx] = flam3_spatial_filter(flam3_gaussian_kernel,
|
||||
flam3_spatial_support[flam3_gaussian_kernel]*de_filt_d)/de_filt_sum;
|
||||
|
||||
/* Epanichnikov */
|
||||
// de_filter_coefs[filter_coef_idx] = (1.0 - (de_filt_d * de_filt_d))/de_filt_sum;
|
||||
}
|
||||
|
||||
filter_coef_idx ++;
|
||||
}
|
||||
}
|
||||
|
||||
if (de.max_filter_index>0)
|
||||
break;
|
||||
}
|
||||
|
||||
if (de.max_filter_index==0)
|
||||
de.max_filter_index = de_max_ind-1;
|
||||
|
||||
|
||||
return(de);
|
||||
}
|
||||
|
||||
double flam3_create_temporal_filter(int numsteps, int filter_type, double filter_exp, double filter_width,
|
||||
double **temporal_filter, double **temporal_deltas) {
|
||||
|
||||
double maxfilt = 0.0;
|
||||
double sumfilt = 0.0;
|
||||
double slpx,halfsteps;
|
||||
double *deltas, *filter;
|
||||
|
||||
int i;
|
||||
|
||||
/* Allocate memory - this must be freed in the calling routine! */
|
||||
deltas = (double *)malloc(numsteps*sizeof(double));
|
||||
filter = (double *)malloc(numsteps*sizeof(double));
|
||||
|
||||
/* Deal with only one step */
|
||||
if (numsteps==1) {
|
||||
deltas[0] = 0;
|
||||
filter[0] = 1.0;
|
||||
*temporal_deltas = deltas;
|
||||
*temporal_filter = filter;
|
||||
return(1.0);
|
||||
}
|
||||
|
||||
/* Define the temporal deltas */
|
||||
for (i = 0; i < numsteps; i++)
|
||||
deltas[i] = ((double)i /(double)(numsteps - 1) - 0.5)*filter_width;
|
||||
|
||||
/* Define the filter coefs */
|
||||
if (flam3_temporal_exp == filter_type) {
|
||||
|
||||
for (i=0; i < numsteps; i++) {
|
||||
|
||||
if (filter_exp>=0)
|
||||
slpx = ((double)i+1.0)/numsteps;
|
||||
else
|
||||
slpx = (double)(numsteps - i)/numsteps;
|
||||
|
||||
/* Scale the color based on these values */
|
||||
filter[i] = pow(slpx,fabs(filter_exp));
|
||||
|
||||
/* Keep the max */
|
||||
if (filter[i]>maxfilt)
|
||||
maxfilt = filter[i];
|
||||
}
|
||||
|
||||
} else if (flam3_temporal_gaussian == filter_type) {
|
||||
|
||||
halfsteps = numsteps/2.0;
|
||||
for (i=0; i < numsteps; i++) {
|
||||
|
||||
/* Gaussian */
|
||||
filter[i] = flam3_spatial_filter(flam3_gaussian_kernel,
|
||||
flam3_spatial_support[flam3_gaussian_kernel]*fabs(i - halfsteps)/halfsteps);
|
||||
/* Keep the max */
|
||||
if (filter[i]>maxfilt)
|
||||
maxfilt = filter[i];
|
||||
}
|
||||
|
||||
} else { // (flam3_temporal_box)
|
||||
|
||||
for (i=0; i < numsteps; i++)
|
||||
filter[i] = 1.0;
|
||||
|
||||
maxfilt = 1.0;
|
||||
|
||||
}
|
||||
|
||||
/* Adjust the filter so that the max is 1.0, and */
|
||||
/* calculate the K2 scaling factor */
|
||||
for (i=0;i<numsteps;i++) {
|
||||
filter[i] /= maxfilt;
|
||||
sumfilt += filter[i];
|
||||
}
|
||||
|
||||
sumfilt /= numsteps;
|
||||
|
||||
*temporal_deltas = deltas;
|
||||
*temporal_filter = filter;
|
||||
|
||||
return(sumfilt);
|
||||
}
|
||||
|
65
src/filters.h
Normal file
65
src/filters.h
Normal file
@ -0,0 +1,65 @@
|
||||
/*
|
||||
FLAM3 - cosmic recursive fractal flames
|
||||
Copyright (C) 1992-2009 Spotworks LLC
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef filters_included
|
||||
#define filters_included
|
||||
|
||||
#include "private.h"
|
||||
|
||||
#define DE_THRESH 100
|
||||
|
||||
/* Spatial filter kernels */
|
||||
#define flam3_gaussian_kernel 0
|
||||
#define flam3_hermite_kernel 1
|
||||
#define flam3_box_kernel 2
|
||||
#define flam3_triangle_kernel 3
|
||||
#define flam3_bell_kernel 4
|
||||
#define flam3_b_spline_kernel 5
|
||||
#define flam3_lanczos3_kernel 6
|
||||
#define flam3_lanczos2_kernel 7
|
||||
#define flam3_mitchell_kernel 8
|
||||
#define flam3_blackman_kernel 9
|
||||
#define flam3_catrom_kernel 10
|
||||
#define flam3_hamming_kernel 11
|
||||
#define flam3_hanning_kernel 12
|
||||
#define flam3_quadratic_kernel 13
|
||||
|
||||
/* Temporal filters */
|
||||
#define flam3_temporal_box 0
|
||||
#define flam3_temporal_gaussian 1
|
||||
#define flam3_temporal_exp 2
|
||||
|
||||
typedef struct {
|
||||
int max_filtered_counts;
|
||||
int max_filter_index;
|
||||
int kernel_size;
|
||||
double *filter_widths;
|
||||
double *filter_coefs;
|
||||
} flam3_de_helper;
|
||||
|
||||
extern double flam3_spatial_support[flam3_num_spatialfilters];
|
||||
|
||||
double flam3_spatial_filter(int knum, double x);
|
||||
int flam3_create_spatial_filter(flam3_frame *spec, int field, double **filter);
|
||||
flam3_de_helper flam3_create_de_filters(double max_rad, double min_rad, double curve, int ss);
|
||||
double flam3_create_temporal_filter(int numsteps, int filter_type, double filter_exp, double filter_width,
|
||||
double **temporal_filter, double **temporal_deltas);
|
||||
|
||||
#endif
|
||||
|
||||
|
342
src/flam3-animate.c
Normal file
342
src/flam3-animate.c
Normal file
@ -0,0 +1,342 @@
|
||||
/*
|
||||
FLAM3 - cosmic recursive fractal flames
|
||||
Copyright (C) 1992-2009 Spotworks LLC
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include "private.h"
|
||||
#include "img.h"
|
||||
#include "isaacs.h"
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
char *ai, *fname;
|
||||
char flamename[256];
|
||||
char *prefix = args("prefix", "");
|
||||
int first_frame = argi("begin", 0);
|
||||
int last_frame = argi("end", 0);
|
||||
int frame_time = argi("time", 0);
|
||||
int dtime = argi("dtime", 1);
|
||||
int do_fields = argi("fields", 0);
|
||||
int write_genome = argi("write_genome",0);
|
||||
double qs = argf("qs", 1.0);
|
||||
double ss = argf("ss", 1.0);
|
||||
char *format = getenv("format");
|
||||
int verbose = argi("verbose", 1);
|
||||
int transparency = argi("transparency", 0);
|
||||
int bits = argi("bits", 33);
|
||||
int sub_batch_size = argi("sub_batch_size", 10000);
|
||||
int bpc = argi("bpc",8);
|
||||
int earlyclip = argi("earlyclip",0);
|
||||
int ftime, channels;
|
||||
unsigned char *image;
|
||||
flam3_genome *cps,center_cp;
|
||||
int i, ncps = 0;
|
||||
char *inf = getenv("in");
|
||||
double pixel_aspect = argf("pixel_aspect", 1.0);
|
||||
int num_threads = argi("nthreads",0);
|
||||
FILE *in,*fp,*genfp;
|
||||
flam3_frame f;
|
||||
flam3_img_comments fpc;
|
||||
stat_struct stats,stats2;
|
||||
|
||||
char badval_string[64];
|
||||
char numiter_string[64];
|
||||
char rtime_string[64];
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
char *slashloc;
|
||||
char exepath[256];
|
||||
char palpath[256];
|
||||
memset(exepath,0,256);
|
||||
memset(palpath,0,256);
|
||||
slashloc = strrchr(argv[0],'\\');
|
||||
if (NULL==slashloc) {
|
||||
sprintf(palpath,"flam3_palettes=flam3-palettes.xml");
|
||||
} else {
|
||||
strncpy(exepath,argv[0],slashloc-argv[0]+1);
|
||||
sprintf(palpath,"flam3_palettes=%sflam3-palettes.xml",exepath);
|
||||
}
|
||||
putenv(palpath);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
memset(¢er_cp,0, sizeof(flam3_genome));
|
||||
|
||||
if (1 != argc) {
|
||||
docstring();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/* Init random number generators */
|
||||
flam3_init_frame(&f);
|
||||
flam3_srandom();
|
||||
|
||||
/* Set the number of threads */
|
||||
if (num_threads==0) {
|
||||
num_threads = flam3_count_nthreads();
|
||||
if (verbose > 1)
|
||||
fprintf(stderr,"Automatically detected %d core(s)...\n",num_threads);
|
||||
} else{
|
||||
if (verbose)
|
||||
fprintf(stderr,"Manually specified %d thread(s)...\n",num_threads);
|
||||
}
|
||||
|
||||
if (getenv("frame")) {
|
||||
if (getenv("time")) {
|
||||
fprintf(stderr, "cannot specify both time and frame.\n");
|
||||
exit(1);
|
||||
}
|
||||
if (getenv("begin") || getenv("end")) {
|
||||
fprintf(stderr, "cannot specify both frame and begin or end.\n");
|
||||
exit(1);
|
||||
}
|
||||
first_frame = last_frame = atoi(getenv("frame"));
|
||||
}
|
||||
|
||||
if (getenv("time")) {
|
||||
if (getenv("begin") || getenv("end")) {
|
||||
fprintf(stderr, "cannot specify both time and begin or end.\n");
|
||||
exit(1);
|
||||
}
|
||||
first_frame = last_frame = frame_time;
|
||||
}
|
||||
|
||||
if (NULL == format) format = "png";
|
||||
if (strcmp(format, "jpg") &&
|
||||
strcmp(format, "ppm") &&
|
||||
strcmp(format, "png")) {
|
||||
fprintf(stderr, "format must be either jpg, ppm, or png, not %s.\n", format);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
if (pixel_aspect <= 0.0) {
|
||||
fprintf(stderr, "pixel aspect ratio must be positive, not %g.\n",
|
||||
pixel_aspect);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (inf)
|
||||
in = fopen(inf, "rb");
|
||||
else
|
||||
in = stdin;
|
||||
if (NULL == in) {
|
||||
perror(inf);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
cps = flam3_parse_from_file(in, inf, flam3_defaults_on, &ncps);
|
||||
if (inf)
|
||||
fclose(in);
|
||||
if (NULL == cps) {
|
||||
fprintf(stderr," error reading genomes.\n");
|
||||
exit(1);
|
||||
}
|
||||
if (0 == ncps) {
|
||||
fprintf(stderr, "error: no genomes.\n");
|
||||
exit(1);
|
||||
}
|
||||
for (i = 0; i < ncps; i++) {
|
||||
cps[i].sample_density *= qs;
|
||||
cps[i].height = (int)(cps[i].height * ss);
|
||||
cps[i].width = (int)(cps[i].width * ss);
|
||||
cps[i].pixels_per_unit *= ss;
|
||||
if (cps[i].height<=0 || cps[i].width<=0) {
|
||||
fprintf(stderr,"output image has dimension <=0, aborting.\n");
|
||||
exit(1);
|
||||
}
|
||||
if (i > 0 && cps[i].time <= cps[i-1].time) {
|
||||
fprintf(stderr, "error: control points must be sorted by time, but %g <= %g, index %d.\n",
|
||||
cps[i].time, cps[i-1].time, i);
|
||||
exit(1);
|
||||
}
|
||||
if ((cps[i].width != cps[0].width) ||
|
||||
(cps[i].height != cps[0].height)) {
|
||||
fprintf(stderr, "warning: flame %d at time %g size mismatch. "
|
||||
"(%d,%d) should be (%d,%d).\n",
|
||||
i, cps[i].time,
|
||||
cps[i].width, cps[i].height,
|
||||
cps[0].width, cps[0].height);
|
||||
cps[i].width = cps[0].width;
|
||||
cps[i].height = cps[0].height;
|
||||
}
|
||||
}
|
||||
if (!getenv("time") && !getenv("frame")) {
|
||||
if (!getenv("begin")) {
|
||||
first_frame = (int) cps[0].time;
|
||||
}
|
||||
if (!getenv("end")) {
|
||||
last_frame = (int) cps[ncps-1].time - 1;
|
||||
if (last_frame < first_frame) last_frame = first_frame;
|
||||
}
|
||||
}
|
||||
channels = strcmp(format, "png") ? 3 : 4;
|
||||
|
||||
/* Check for 16-bit-per-channel processing */
|
||||
if ( (16 == bpc) && (strcmp(format,"png") != 0)) {
|
||||
fprintf(stderr,"Support for 16 bpc images is only present for the png format.\n");
|
||||
exit(1);
|
||||
} else if (bpc != 8 && bpc != 16) {
|
||||
fprintf(stderr,"Unexpected bpc specified (%d)\n",bpc);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// f.temporal_filter_radius = argf("blur", 0.5);
|
||||
f.pixel_aspect_ratio = pixel_aspect;
|
||||
f.genomes = cps;
|
||||
f.ngenomes = ncps;
|
||||
f.verbose = verbose;
|
||||
f.bits = bits;
|
||||
f.progress = 0;
|
||||
f.earlyclip = earlyclip;
|
||||
f.nthreads = num_threads;
|
||||
f.sub_batch_size = sub_batch_size;
|
||||
|
||||
if (16==bpc)
|
||||
f.bytes_per_channel = 2;
|
||||
else
|
||||
f.bytes_per_channel = 1;
|
||||
|
||||
|
||||
image = (void *) malloc((size_t)channels *
|
||||
(size_t)cps[0].width *
|
||||
(size_t)cps[0].height * f.bytes_per_channel);
|
||||
|
||||
if (dtime < 1) {
|
||||
fprintf(stderr, "dtime must be positive, not %d.\n", dtime);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
for (ftime = first_frame; ftime <= last_frame; ftime += dtime) {
|
||||
f.time = (double) ftime;
|
||||
|
||||
if (verbose && ((last_frame-first_frame)/dtime) >= 1) {
|
||||
fprintf(stderr, "time = %d/%d/%d\n", ftime, last_frame, dtime);
|
||||
}
|
||||
|
||||
if (do_fields) {
|
||||
|
||||
if (flam3_render(&f, image, flam3_field_even, channels, transparency,&stats)) {
|
||||
fprintf(stderr,"error rendering image: aborting.\n");
|
||||
exit(1);
|
||||
}
|
||||
f.time += 0.5;
|
||||
if (flam3_render(&f, image, flam3_field_odd, channels, transparency,&stats2)) {
|
||||
fprintf(stderr,"error rendering image: aborting.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
stats.badvals+=stats2.badvals;
|
||||
stats.render_seconds+=stats2.render_seconds;
|
||||
stats.num_iters+=stats2.num_iters;
|
||||
} else {
|
||||
if (flam3_render(&f, image, flam3_field_both, channels, transparency,&stats)) {
|
||||
fprintf(stderr,"error rendering image: aborting.\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (getenv("out"))
|
||||
fname = getenv("out");
|
||||
else {
|
||||
fname = malloc(strlen(prefix) + 20);
|
||||
sprintf(fname, "%s%05d.%s", prefix, ftime, format);
|
||||
}
|
||||
|
||||
if (verbose)
|
||||
fprintf(stderr, "writing %s...", fname);
|
||||
|
||||
if (write_genome) {
|
||||
sprintf(flamename,"%s.flam3",fname);
|
||||
|
||||
/* get center genome */
|
||||
flam3_interpolate(f.genomes, f.ngenomes, f.time, 0, ¢er_cp);
|
||||
|
||||
/* write it out */
|
||||
genfp = fopen(flamename,"w");
|
||||
if (NULL == genfp) {
|
||||
perror(flamename);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
flam3_print(genfp, ¢er_cp, NULL, flam3_print_edits);
|
||||
|
||||
fclose(genfp);
|
||||
}
|
||||
|
||||
fp = fopen(fname, "wb");
|
||||
if (NULL == fp) {
|
||||
perror(fname);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Get center cp for embedding in png file */
|
||||
flam3_interpolate(f.genomes, f.ngenomes, f.time, 0, ¢er_cp);
|
||||
|
||||
/* Convert to string */
|
||||
fpc.genome = flam3_print_to_string(¢er_cp);
|
||||
sprintf(badval_string, "%g",stats.badvals/(double)stats.num_iters);
|
||||
fpc.badvals = badval_string;
|
||||
sprintf(numiter_string,"%g",(double)stats.num_iters);
|
||||
fpc.numiters = numiter_string;
|
||||
sprintf(rtime_string,"%d",stats.render_seconds);
|
||||
fpc.rtime = rtime_string;
|
||||
|
||||
if (!strcmp(format, "png")) {
|
||||
|
||||
write_png(fp, image, cps[0].width, cps[0].height, &fpc, 1);
|
||||
|
||||
} else if (!strcmp(format, "jpg")) {
|
||||
|
||||
write_jpeg(fp, image, cps[0].width, cps[0].height, &fpc);
|
||||
|
||||
} else {
|
||||
int size = 3 * cps[0].width * cps[0].height;
|
||||
fprintf(fp, "P6\n");
|
||||
fprintf(fp, "%d %d\n255\n", cps[0].width, cps[0].height);
|
||||
if (size != fwrite(image, 1, size, fp)) {
|
||||
perror(fname);
|
||||
}
|
||||
}
|
||||
|
||||
/* Free string */
|
||||
free(fpc.genome);
|
||||
|
||||
clear_cp(¢er_cp,0);
|
||||
|
||||
fclose(fp);
|
||||
|
||||
if (!getenv("out"))
|
||||
free(fname);
|
||||
|
||||
}
|
||||
|
||||
for (i = 0; i < ncps; i++) {
|
||||
xmlFreeDoc(cps[i].edits);
|
||||
clear_cp(&cps[i],0);
|
||||
}
|
||||
free(cps);
|
||||
|
||||
free(image);
|
||||
|
||||
if (verbose)
|
||||
fprintf(stderr, "done.\n");
|
||||
|
||||
fflush(stderr);
|
||||
return 0;
|
||||
}
|
36
src/flam3-animate.man
Normal file
36
src/flam3-animate.man
Normal file
@ -0,0 +1,36 @@
|
||||
.TH flam3-animate 1 "" ""
|
||||
.SH NAME
|
||||
flam3-animate
|
||||
flam3-render
|
||||
flam3-genome
|
||||
flam3-convert - render and animate FLAM3s and manipulate their genomes
|
||||
.SH SYNOPSIS
|
||||
.B flam3-render < input
|
||||
|
||||
.SH DESCRIPTION
|
||||
|
||||
FLAM3 implements a visual language based on a recursive set equation.
|
||||
|
||||
Flam3-genome creates and manipulates genomes (xml parameter sets) in
|
||||
this language. Flam3-render turns genomes into still images, and
|
||||
Flam3-animate renders motion-blurred frames of animation.
|
||||
|
||||
Flam3-convert reads from stdin files in the old format used by the
|
||||
flame GIMP plugin, and writes the new format to stdout.
|
||||
|
||||
.SH OPTIONS
|
||||
|
||||
Any command line option will cause the program to write its
|
||||
documentation to standard out.
|
||||
|
||||
.SH ENVIRONMENT
|
||||
|
||||
The environment variables are in the documention written to standard
|
||||
out given any command line option.
|
||||
|
||||
.SH SEE ALSO
|
||||
.BR WWW.FLAM3.COM,
|
||||
.BR electricsheep (1),
|
||||
|
||||
.SH AUTHOR
|
||||
spot aka Scott Draves, Erik Reckase
|
239
src/flam3-convert.c
Normal file
239
src/flam3-convert.c
Normal file
@ -0,0 +1,239 @@
|
||||
/*
|
||||
FLAM3 - cosmic recursive fractal flames
|
||||
Copyright (C) 1992-2009 Spotworks LLC
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
|
||||
|
||||
#define MAXARGS 1000
|
||||
#define streql(x,y) (!strcmp(x,y))
|
||||
|
||||
|
||||
/*
|
||||
* split a string passed in ss into tokens on whitespace.
|
||||
* # comments to end of line. ; terminates the record
|
||||
*/
|
||||
void tokenize(ss, argv, argc)
|
||||
char **ss;
|
||||
char *argv[];
|
||||
int *argc;
|
||||
{
|
||||
char *s = *ss;
|
||||
int i = 0, state = 0;
|
||||
|
||||
while (*s != ';') {
|
||||
char c = *s;
|
||||
switch (state) {
|
||||
case 0:
|
||||
if ('#' == c)
|
||||
state = 2;
|
||||
else if (!isspace(c)) {
|
||||
argv[i] = s;
|
||||
i++;
|
||||
state = 1;
|
||||
}
|
||||
case 1:
|
||||
if (isspace(c)) {
|
||||
*s = 0;
|
||||
state = 0;
|
||||
}
|
||||
case 2:
|
||||
if ('\n' == c)
|
||||
state = 0;
|
||||
}
|
||||
s++;
|
||||
}
|
||||
*s = 0;
|
||||
*ss = s+1;
|
||||
*argc = i;
|
||||
}
|
||||
|
||||
/*
|
||||
* given a pointer to a string SS, fill fields of a control point CP.
|
||||
* return a pointer to the first unused char in SS. totally barfucious,
|
||||
* must integrate with tcl soon...
|
||||
*/
|
||||
|
||||
void parse_control_point_old(char **ss, flam3_genome *cp) {
|
||||
char *argv[MAXARGS];
|
||||
int argc, i, j;
|
||||
int set_cm = 0, set_image_size = 0, set_nbatches = 0, set_white_level = 0, set_cmap_inter = 0;
|
||||
int set_spatial_oversample = 0, set_hr = 0;
|
||||
double *slot, xf, cm, t, nbatches, white_level, spatial_oversample, cmap_inter;
|
||||
double image_size[2];
|
||||
|
||||
memset(cp, 0, sizeof(flam3_genome));
|
||||
|
||||
flam3_add_xforms(cp, flam3_nxforms, 0, 0);
|
||||
|
||||
for (i = 0; i < flam3_nxforms; i++) {
|
||||
cp->xform[i].density = 0.0;
|
||||
cp->xform[i].color = i&1;
|
||||
cp->xform[i].color_speed = 0.5;
|
||||
cp->xform[i].animate = 1.0;
|
||||
cp->xform[i].var[0] = 1.0;
|
||||
for (j = 1; j < flam3_nvariations; j++)
|
||||
cp->xform[i].var[j] = 0.0;
|
||||
cp->xform[i].c[0][0] = 1.0;
|
||||
cp->xform[i].c[0][1] = 0.0;
|
||||
cp->xform[i].c[1][0] = 0.0;
|
||||
cp->xform[i].c[1][1] = 1.0;
|
||||
cp->xform[i].c[2][0] = 0.0;
|
||||
cp->xform[i].c[2][1] = 0.0;
|
||||
}
|
||||
|
||||
tokenize(ss, argv, &argc);
|
||||
for (i = 0; i < argc; i++) {
|
||||
if (streql("xform", argv[i]))
|
||||
slot = &xf;
|
||||
else if (streql("time", argv[i]))
|
||||
slot = &cp->time;
|
||||
else if (streql("brightness", argv[i]))
|
||||
slot = &cp->brightness;
|
||||
else if (streql("contrast", argv[i]))
|
||||
slot = &cp->contrast;
|
||||
else if (streql("gamma", argv[i]))
|
||||
slot = &cp->gamma;
|
||||
else if (streql("vibrancy", argv[i]))
|
||||
slot = &cp->vibrancy;
|
||||
else if (streql("hue_rotation", argv[i])) {
|
||||
slot = &cp->hue_rotation;
|
||||
set_hr = 1;
|
||||
} else if (streql("zoom", argv[i]))
|
||||
slot = &cp->zoom;
|
||||
else if (streql("image_size", argv[i])) {
|
||||
slot = image_size;
|
||||
set_image_size = 1;
|
||||
} else if (streql("center", argv[i]))
|
||||
slot = cp->center;
|
||||
else if (streql("background", argv[i]))
|
||||
slot = cp->background;
|
||||
else if (streql("pixels_per_unit", argv[i]))
|
||||
slot = &cp->pixels_per_unit;
|
||||
else if (streql("spatial_filter_radius", argv[i]))
|
||||
slot = &cp->spatial_filter_radius;
|
||||
else if (streql("sample_density", argv[i]))
|
||||
slot = &cp->sample_density;
|
||||
else if (streql("nbatches", argv[i])) {
|
||||
slot = &nbatches;
|
||||
set_nbatches = 1;
|
||||
} else if (streql("white_level", argv[i])) {
|
||||
slot = &white_level;
|
||||
set_white_level = 1;
|
||||
} else if (streql("spatial_oversample", argv[i])) {
|
||||
slot = &spatial_oversample;
|
||||
set_spatial_oversample = 1;
|
||||
} else if (streql("cmap", argv[i])) {
|
||||
slot = &cm;
|
||||
set_cm = 1;
|
||||
} else if (streql("palette", argv[i])) {
|
||||
slot = &cp->palette[0].color[0];
|
||||
} else if (streql("density", argv[i]))
|
||||
slot = &cp->xform[(int)xf].density;
|
||||
else if (streql("color", argv[i]))
|
||||
slot = &cp->xform[(int)xf].color;
|
||||
else if (streql("coefs", argv[i])) {
|
||||
slot = cp->xform[(int)xf].c[0];
|
||||
cp->xform[(int)xf].density = 1.0;
|
||||
} else if (streql("var", argv[i]))
|
||||
slot = cp->xform[(int)xf].var;
|
||||
else if (streql("cmap_inter", argv[i])) {
|
||||
slot = &cmap_inter;
|
||||
set_cmap_inter = 1;
|
||||
} else
|
||||
*slot++ = atof(argv[i]);
|
||||
}
|
||||
if (set_cm) {
|
||||
double hr = set_hr ? cp->hue_rotation : 0.0;
|
||||
cp->palette_index = (int) cm;
|
||||
flam3_get_palette(cp->palette_index, cp->palette, hr);
|
||||
}
|
||||
if (set_image_size) {
|
||||
cp->width = (int) image_size[0];
|
||||
cp->height = (int) image_size[1];
|
||||
}
|
||||
if (set_nbatches)
|
||||
cp->nbatches = (int) nbatches;
|
||||
if (set_spatial_oversample)
|
||||
cp->spatial_oversample = (int) spatial_oversample;
|
||||
if (set_white_level) {
|
||||
/* ignore */
|
||||
}
|
||||
for (i = 0; i < flam3_nxforms; i++) {
|
||||
t = 0.0;
|
||||
for (j = 0; j < flam3_nvariations; j++)
|
||||
t += cp->xform[i].var[j];
|
||||
t = 1.0 / t;
|
||||
for (j = 0; j < flam3_nvariations; j++)
|
||||
cp->xform[i].var[j] *= t;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
char *s, *ss;
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
char *slashloc;
|
||||
char palpath[256],exepath[256];
|
||||
|
||||
slashloc = strrchr(argv[0],'\\');
|
||||
if (NULL==slashloc) {
|
||||
sprintf(palpath,"flam3_palettes=flam3-palettes.xml");
|
||||
} else {
|
||||
strncpy(exepath,argv[0],slashloc-argv[0]+1);
|
||||
sprintf(palpath,"flam3_palettes=%sflam3-palettes.xml",exepath);
|
||||
}
|
||||
putenv(palpath);
|
||||
|
||||
#endif
|
||||
|
||||
if (1 != argc) {
|
||||
docstring();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
{
|
||||
int i, c, slen = 5000;
|
||||
s = malloc(slen);
|
||||
i = 0;
|
||||
do {
|
||||
c = getchar();
|
||||
if (EOF == c) goto done_reading;
|
||||
s[i++] = c;
|
||||
if (i == slen-1) {
|
||||
slen *= 2;
|
||||
s = realloc(s, slen);
|
||||
}
|
||||
} while (1);
|
||||
done_reading:
|
||||
s[i] = 0;
|
||||
}
|
||||
|
||||
ss = s;
|
||||
s += strlen(s);
|
||||
printf("<conversions>\n");
|
||||
while (strchr(ss, ';')) {
|
||||
flam3_genome cp;
|
||||
parse_control_point_old(&ss, &cp);
|
||||
flam3_print(stdout, &cp, NULL, flam3_print_edits);
|
||||
}
|
||||
printf("</conversions>\n");
|
||||
return 0;
|
||||
}
|
36
src/flam3-convert.man
Normal file
36
src/flam3-convert.man
Normal file
@ -0,0 +1,36 @@
|
||||
.TH flam3-animate 1 "" ""
|
||||
.SH NAME
|
||||
flam3-animate
|
||||
flam3-render
|
||||
flam3-genome
|
||||
flam3-convert - render and animate FLAM3s and manipulate their genomes
|
||||
.SH SYNOPSIS
|
||||
.B flam3-render < input
|
||||
|
||||
.SH DESCRIPTION
|
||||
|
||||
FLAM3 implements a visual language based on a recursive set equation.
|
||||
|
||||
Flam3-genome creates and manipulates genomes (xml parameter sets) in
|
||||
this language. Flam3-render turns genomes into still images, and
|
||||
Flam3-animate renders motion-blurred frames of animation.
|
||||
|
||||
Flam3-convert reads from stdin files in the old format used by the
|
||||
flame GIMP plugin, and writes the new format to stdout.
|
||||
|
||||
.SH OPTIONS
|
||||
|
||||
Any command line option will cause the program to write its
|
||||
documentation to standard out.
|
||||
|
||||
.SH ENVIRONMENT
|
||||
|
||||
The environment variables are in the documention written to standard
|
||||
out given any command line option.
|
||||
|
||||
.SH SEE ALSO
|
||||
.BR WWW.FLAM3.COM,
|
||||
.BR electricsheep (1),
|
||||
|
||||
.SH AUTHOR
|
||||
spot aka Scott Draves, Erik Reckase
|
1075
src/flam3-genome.c
Normal file
1075
src/flam3-genome.c
Normal file
File diff suppressed because it is too large
Load Diff
36
src/flam3-genome.man
Normal file
36
src/flam3-genome.man
Normal file
@ -0,0 +1,36 @@
|
||||
.TH flam3-animate 1 "" ""
|
||||
.SH NAME
|
||||
flam3-animate
|
||||
flam3-render
|
||||
flam3-genome
|
||||
flam3-convert - render and animate FLAM3s and manipulate their genomes
|
||||
.SH SYNOPSIS
|
||||
.B flam3-render < input
|
||||
|
||||
.SH DESCRIPTION
|
||||
|
||||
FLAM3 implements a visual language based on a recursive set equation.
|
||||
|
||||
Flam3-genome creates and manipulates genomes (xml parameter sets) in
|
||||
this language. Flam3-render turns genomes into still images, and
|
||||
Flam3-animate renders motion-blurred frames of animation.
|
||||
|
||||
Flam3-convert reads from stdin files in the old format used by the
|
||||
flame GIMP plugin, and writes the new format to stdout.
|
||||
|
||||
.SH OPTIONS
|
||||
|
||||
Any command line option will cause the program to write its
|
||||
documentation to standard out.
|
||||
|
||||
.SH ENVIRONMENT
|
||||
|
||||
The environment variables are in the documention written to standard
|
||||
out given any command line option.
|
||||
|
||||
.SH SEE ALSO
|
||||
.BR WWW.FLAM3.COM,
|
||||
.BR electricsheep (1),
|
||||
|
||||
.SH AUTHOR
|
||||
spot aka Scott Draves, Erik Reckase
|
23135
src/flam3-palettes.xml
Normal file
23135
src/flam3-palettes.xml
Normal file
File diff suppressed because it is too large
Load Diff
421
src/flam3-render.c
Normal file
421
src/flam3-render.c
Normal file
@ -0,0 +1,421 @@
|
||||
/*
|
||||
FLAM3 - cosmic recursive fractal flames
|
||||
Copyright (C) 1992-2009 Spotworks LLC
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifdef WIN32
|
||||
#define WINVER 0x0500
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
|
||||
#include "private.h"
|
||||
#include "img.h"
|
||||
#include "isaacs.h"
|
||||
|
||||
|
||||
int calc_nstrips(flam3_frame *spec) {
|
||||
double mem_required;
|
||||
double mem_available;
|
||||
int nstrips,ninc;
|
||||
char *testmalloc;
|
||||
#ifdef WIN32
|
||||
MEMORYSTATUS stat;
|
||||
stat.dwLength = sizeof(stat);
|
||||
GlobalMemoryStatus(&stat); // may want to go to GlobalMemoryStatusEx eventually
|
||||
mem_available = (double)stat.dwTotalPhys;
|
||||
// fprintf(stderr,"%lu bytes free memory...\n",(size_t)stat.dwAvailPhys);
|
||||
// if (mem_available > 1e9) mem_available = 1e9;
|
||||
#elif defined(_SC_PHYS_PAGES) && defined(_SC_PAGESIZE)
|
||||
mem_available =
|
||||
(double)sysconf(_SC_PHYS_PAGES) * sysconf(_SC_PAGESIZE);
|
||||
#elif defined __APPLE__
|
||||
unsigned int physmem;
|
||||
size_t len = sizeof(physmem);
|
||||
static int mib[2] = { CTL_HW, HW_PHYSMEM };
|
||||
if (sysctl(mib, 2, &physmem, &len, NULL, 0) == 0 && len == sizeof(physmem)) {
|
||||
mem_available = (double )physmem;
|
||||
} else {
|
||||
fprintf(stderr, "warning: unable to determine physical memory.\n");
|
||||
mem_available = 2e9;
|
||||
}
|
||||
#else
|
||||
fprintf(stderr, "warning: unable to determine physical memory.\n");
|
||||
mem_available = 2e9;
|
||||
#endif
|
||||
#if 0
|
||||
fprintf(stderr,"available phyical memory is %lu\n",
|
||||
(unsigned long)mem_available);
|
||||
#endif
|
||||
mem_available *= 0.8;
|
||||
if (getenv("use_mem")) {
|
||||
mem_available = atof(getenv("use_mem"));
|
||||
}
|
||||
mem_required = flam3_render_memory_required(spec);
|
||||
if (mem_available >= mem_required) return 1;
|
||||
nstrips = (int) ceil(mem_required / mem_available);
|
||||
|
||||
if (0) {
|
||||
/* Attempt to malloc a strip, and if it fails, try adding additional strips */
|
||||
ninc=-1;
|
||||
testmalloc = NULL;
|
||||
while(NULL==testmalloc && ninc<3) {
|
||||
ninc++;
|
||||
testmalloc = (char *)malloc((int)ceil(mem_required / (nstrips+ninc)));
|
||||
}
|
||||
if (NULL==testmalloc) {
|
||||
fprintf(stderr,"Unable to allocate memory for render. Please close some running programs and try to render again.\n");
|
||||
exit(1);
|
||||
} else {
|
||||
free(testmalloc);
|
||||
nstrips = nstrips + ninc;
|
||||
}
|
||||
}
|
||||
|
||||
return nstrips;
|
||||
}
|
||||
|
||||
int print_progress(void *foo, double fraction, int stage, double eta) {
|
||||
fprintf(stderr, "stage=%s progress=%g eta=%g\n", stage?"filtering":"chaos", fraction, eta);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
flam3_frame f;
|
||||
char *ai;
|
||||
flam3_genome *cps;
|
||||
int ncps;
|
||||
int i;
|
||||
void *image=NULL;
|
||||
FILE *fp;
|
||||
char fname[256];
|
||||
size_t this_size, last_size = -1;
|
||||
double imgmem;
|
||||
unsigned int strip;
|
||||
double center_y, center_base;
|
||||
unsigned int nstrips;
|
||||
randctx savectx;
|
||||
char *prefix = args("prefix", "");
|
||||
char *out = args("out", NULL);
|
||||
char *format = getenv("format");
|
||||
int verbose = argi("verbose", 1);
|
||||
int bits = argi("bits", 33);
|
||||
int bpc = argi("bpc",8);
|
||||
int seed = argi("seed", 0);
|
||||
int transparency = argi("transparency", 0);
|
||||
char *inf = getenv("in");
|
||||
double qs = argf("qs", 1.0);
|
||||
double ss = argf("ss", 1.0);
|
||||
double pixel_aspect = argf("pixel_aspect", 1.0);
|
||||
int sub_batch_size = argi("sub_batch_size",10000);
|
||||
int name_enable = argi("name_enable",0);
|
||||
int num_threads = argi("nthreads",0);
|
||||
int earlyclip = argi("earlyclip",0);
|
||||
FILE *in;
|
||||
double zoom_scale;
|
||||
unsigned int channels;
|
||||
long start_time = (long)time(0);
|
||||
flam3_img_comments fpc;
|
||||
stat_struct stats;
|
||||
char numiter_string[64];
|
||||
char badval_string[64];
|
||||
char rtime_string[64];
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
char *slashloc;
|
||||
char exepath[256];
|
||||
char palpath[256];
|
||||
memset(exepath,0,256);
|
||||
memset(palpath,0,256);
|
||||
|
||||
slashloc = strrchr(argv[0],'\\');
|
||||
if (NULL==slashloc) {
|
||||
sprintf(palpath,"flam3_palettes=flam3-palettes.xml");
|
||||
} else {
|
||||
strncpy(exepath,argv[0],slashloc-argv[0]+1);
|
||||
sprintf(palpath,"flam3_palettes=%sflam3-palettes.xml",exepath);
|
||||
}
|
||||
putenv(palpath);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
if (1 != argc) {
|
||||
docstring();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/* Init random number generators */
|
||||
flam3_init_frame(&f);
|
||||
flam3_srandom();
|
||||
|
||||
/* Set the number of threads */
|
||||
if (num_threads==0) {
|
||||
num_threads = flam3_count_nthreads();
|
||||
if (verbose > 1)
|
||||
fprintf(stderr,"Automatically detected %d core(s)...\n",num_threads);
|
||||
} else{
|
||||
if (verbose)
|
||||
fprintf(stderr,"Manually specified %d thread(s)...\n",num_threads);
|
||||
}
|
||||
|
||||
|
||||
if (NULL == format) format = "png";
|
||||
if (strcmp(format, "jpg") &&
|
||||
strcmp(format, "ppm") &&
|
||||
strcmp(format, "png")) {
|
||||
fprintf(stderr,
|
||||
"format must be either jpg, ppm, or png, not %s.\n",
|
||||
format);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
channels = strcmp(format, "png") ? 3 : 4;
|
||||
|
||||
/* Check for 16-bit-per-channel processing */
|
||||
if ( (16 == bpc) && (strcmp(format,"png") != 0)) {
|
||||
fprintf(stderr,"Support for 16 bpc images is only present for the png format.\n");
|
||||
exit(1);
|
||||
} else if (bpc != 8 && bpc != 16) {
|
||||
fprintf(stderr,"Unexpected bpc specified (%d)\n",bpc);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (pixel_aspect <= 0.0) {
|
||||
fprintf(stderr, "pixel aspect ratio must be positive, not %g.\n",
|
||||
pixel_aspect);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (inf)
|
||||
in = fopen(inf, "rb");
|
||||
else
|
||||
in = stdin;
|
||||
if (NULL == in) {
|
||||
perror(inf);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
cps = flam3_parse_from_file(in, inf, flam3_defaults_on, &ncps);
|
||||
if (NULL == cps) {
|
||||
fprintf(stderr,"error reading genomes from file\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (inf)
|
||||
fclose(in);
|
||||
|
||||
for (i = 0; i < ncps; i++) {
|
||||
/* Force ntemporal_samples to 1 for -render */
|
||||
cps[i].ntemporal_samples = 1;
|
||||
cps[i].sample_density *= qs;
|
||||
cps[i].height = (int)(cps[i].height * ss);
|
||||
cps[i].width = (int)(cps[i].width * ss);
|
||||
cps[i].pixels_per_unit *= ss;
|
||||
if (cps[i].height<=0 || cps[i].width<=0) {
|
||||
fprintf(stderr,"output image has dimension <=0, aborting.\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (out && (ncps > 1)) {
|
||||
fprintf(stderr, "hqi-flame: warning: writing multiple images "
|
||||
"to one file. all but last will be lost.\n");
|
||||
}
|
||||
|
||||
|
||||
for (i = 0; i < ncps; i++) {
|
||||
int real_height;
|
||||
|
||||
if (verbose && ncps > 1) {
|
||||
fprintf(stderr, "flame = %d/%d ", i+1, ncps);
|
||||
}
|
||||
|
||||
// f.temporal_filter_radius = 0.0;
|
||||
f.genomes = &cps[i];
|
||||
f.ngenomes = 1;
|
||||
f.verbose = verbose;
|
||||
f.bits = bits;
|
||||
f.time = 0.0;
|
||||
f.pixel_aspect_ratio = pixel_aspect;
|
||||
f.progress = 0;//print_progress;
|
||||
f.nthreads = num_threads;
|
||||
f.earlyclip = earlyclip;
|
||||
f.sub_batch_size = sub_batch_size;
|
||||
|
||||
if (16==bpc)
|
||||
f.bytes_per_channel = 2;
|
||||
else
|
||||
f.bytes_per_channel = 1;
|
||||
|
||||
|
||||
if (getenv("nstrips")) {
|
||||
nstrips = atoi(getenv("nstrips"));
|
||||
} else {
|
||||
nstrips = calc_nstrips(&f);
|
||||
}
|
||||
|
||||
if (nstrips > cps[i].height) {
|
||||
fprintf(stderr, "cannot have more strips than rows but %d>%d.\n",
|
||||
nstrips, cps[i].height);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
imgmem = (double)channels * (double)cps[i].width
|
||||
* (double)cps[i].height * f.bytes_per_channel;
|
||||
|
||||
if (imgmem > ULONG_MAX) {
|
||||
fprintf(stderr,"Image size > ULONG_MAX. Aborting.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
this_size = (size_t)channels * (size_t)cps[i].width
|
||||
* (size_t)cps[i].height * f.bytes_per_channel;
|
||||
if (this_size != last_size) {
|
||||
if (last_size != -1)
|
||||
free(image);
|
||||
last_size = this_size;
|
||||
image = (void *) malloc(this_size);
|
||||
if (NULL==image) {
|
||||
fprintf(stderr,"Error allocating memory for image. Aborting\n");
|
||||
exit(1);
|
||||
}
|
||||
} else {
|
||||
memset(image, 0, this_size);
|
||||
}
|
||||
|
||||
cps[i].sample_density *= nstrips;
|
||||
real_height = cps[i].height;
|
||||
cps[i].height = (int) ceil(cps[i].height / (double) nstrips);
|
||||
center_y = cps[i].center[1];
|
||||
zoom_scale = pow(2.0, cps[i].zoom);
|
||||
center_base = center_y - ((nstrips - 1) * cps[i].height) /
|
||||
(2 * cps[i].pixels_per_unit * zoom_scale);
|
||||
|
||||
/* Copy off random context to use for each strip */
|
||||
memcpy(&savectx, &f.rc, sizeof(randctx));
|
||||
|
||||
for (strip = 0; strip < nstrips; strip++) {
|
||||
size_t ssoff = (size_t)cps[i].height * strip * cps[i].width * channels * f.bytes_per_channel;
|
||||
void *strip_start = image + ssoff;
|
||||
cps[i].center[1] = center_base + cps[i].height * (double) strip / (cps[i].pixels_per_unit * zoom_scale);
|
||||
|
||||
if ((cps[i].height * (strip + 1)) > real_height) {
|
||||
int oh = cps[i].height;
|
||||
cps[i].height = real_height - oh * strip;
|
||||
cps[i].center[1] -=
|
||||
(oh - cps[i].height) * 0.5 /
|
||||
(cps[i].pixels_per_unit * zoom_scale);
|
||||
}
|
||||
|
||||
/* Use the same random context for each strip */
|
||||
memcpy(&f.rc, &savectx, sizeof(randctx));
|
||||
|
||||
if (verbose && nstrips > 1) {
|
||||
fprintf(stderr, "strip = %d/%d\n", strip+1, nstrips);
|
||||
}
|
||||
if (verbose && (1 == nstrips) && (ncps > 1)) {
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
cps[i].ntemporal_samples = 1;
|
||||
if (flam3_render(&f, strip_start, flam3_field_both, channels, transparency, &stats)) {
|
||||
fprintf(stderr,"error rendering image: aborting.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (NULL != out) {
|
||||
strcpy(fname,out);
|
||||
} else if (name_enable && cps[i].flame_name[0]>0) {
|
||||
sprintf(fname, "%s.%s",cps[i].flame_name,format);
|
||||
} else {
|
||||
sprintf(fname, "%s%05d.%s", prefix, i, format);
|
||||
}
|
||||
if (verbose) {
|
||||
fprintf(stderr, "writing %s...", fname);
|
||||
}
|
||||
fp = fopen(fname, "wb");
|
||||
if (NULL == fp) {
|
||||
perror(fname);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Generate temp file with genome */
|
||||
fpc.genome = flam3_print_to_string(f.genomes);
|
||||
|
||||
sprintf(badval_string,"%g",stats.badvals/(double)stats.num_iters);
|
||||
fpc.badvals = badval_string;
|
||||
sprintf(numiter_string,"%g",(double)stats.num_iters);
|
||||
fpc.numiters = numiter_string;
|
||||
sprintf(rtime_string,"%d",stats.render_seconds);
|
||||
fpc.rtime = rtime_string;
|
||||
|
||||
if (!strcmp(format, "png")) {
|
||||
|
||||
write_png(fp, image, cps[i].width, real_height, &fpc, f.bytes_per_channel);
|
||||
|
||||
} else if (!strcmp(format, "jpg")) {
|
||||
|
||||
write_jpeg(fp, (unsigned char *)image, cps[i].width, real_height, &fpc);
|
||||
|
||||
} else {
|
||||
fprintf(fp, "P6\n");
|
||||
fprintf(fp, "%d %d\n255\n", cps[i].width, real_height);
|
||||
if (this_size != fwrite((unsigned char *)image, 1, this_size, fp)) {
|
||||
perror(fname);
|
||||
}
|
||||
}
|
||||
/* Free string */
|
||||
free(fpc.genome);
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
/* restore the cps values to their original values */
|
||||
cps[i].sample_density /= nstrips;
|
||||
cps[i].height = real_height;
|
||||
cps[i].center[1] = center_y;
|
||||
|
||||
if (verbose) {
|
||||
fprintf(stderr, "done.\n");
|
||||
}
|
||||
}
|
||||
if (verbose && ((ncps > 1) || (nstrips > 1))) {
|
||||
long total_time = (long)time(0) - start_time;
|
||||
|
||||
if (total_time > 100)
|
||||
fprintf(stderr, "total time = %.1f minutes\n", total_time / 60.0);
|
||||
else
|
||||
fprintf(stderr, "total time = %ld seconds\n", total_time);
|
||||
}
|
||||
|
||||
for (i=0;i<ncps;i++) {
|
||||
|
||||
xmlFreeDoc(cps[i].edits);
|
||||
clear_cp(&cps[i],0);
|
||||
|
||||
}
|
||||
free(cps);
|
||||
|
||||
free(image);
|
||||
return 0;
|
||||
}
|
36
src/flam3-render.man
Normal file
36
src/flam3-render.man
Normal file
@ -0,0 +1,36 @@
|
||||
.TH flam3-animate 1 "" ""
|
||||
.SH NAME
|
||||
flam3-animate
|
||||
flam3-render
|
||||
flam3-genome
|
||||
flam3-convert - render and animate FLAM3s and manipulate their genomes
|
||||
.SH SYNOPSIS
|
||||
.B flam3-render < input
|
||||
|
||||
.SH DESCRIPTION
|
||||
|
||||
FLAM3 implements a visual language based on a recursive set equation.
|
||||
|
||||
Flam3-genome creates and manipulates genomes (xml parameter sets) in
|
||||
this language. Flam3-render turns genomes into still images, and
|
||||
Flam3-animate renders motion-blurred frames of animation.
|
||||
|
||||
Flam3-convert reads from stdin files in the old format used by the
|
||||
flame GIMP plugin, and writes the new format to stdout.
|
||||
|
||||
.SH OPTIONS
|
||||
|
||||
Any command line option will cause the program to write its
|
||||
documentation to standard out.
|
||||
|
||||
.SH ENVIRONMENT
|
||||
|
||||
The environment variables are in the documention written to standard
|
||||
out given any command line option.
|
||||
|
||||
.SH SEE ALSO
|
||||
.BR WWW.FLAM3.COM,
|
||||
.BR electricsheep (1),
|
||||
|
||||
.SH AUTHOR
|
||||
spot aka Scott Draves, Erik Reckase
|
3994
src/flam3.c
Normal file
3994
src/flam3.c
Normal file
File diff suppressed because it is too large
Load Diff
65
src/flam3.dsw
Normal file
65
src/flam3.dsw
Normal file
@ -0,0 +1,65 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "anim"=.\anim.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "convert"=.\convert.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "hqi"=.\hqi.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "pick"=.\pick.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
657
src/flam3.h
Normal file
657
src/flam3.h
Normal file
@ -0,0 +1,657 @@
|
||||
/*
|
||||
FLAM3 - cosmic recursive fractal flames
|
||||
Copyright (C) 1992-2009 Spotworks LLC
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef flam3_included
|
||||
#define flam3_included
|
||||
|
||||
#include <stdio.h>
|
||||
#include <libxml/parser.h>
|
||||
#include "isaac.h"
|
||||
|
||||
#if defined(_MSC_VER) /* VC++ */
|
||||
#include <windows.h>
|
||||
#define EXPORT __declspec (dllexport)
|
||||
#else
|
||||
#define EXPORT
|
||||
#endif
|
||||
|
||||
EXPORT char *flam3_version();
|
||||
|
||||
#define flam3_palette_random (-1)
|
||||
#define flam3_palette_interpolated (-2)
|
||||
|
||||
#define flam3_defaults_on (1)
|
||||
#define flam3_defaults_off (0)
|
||||
|
||||
#define flam3_name_len 64
|
||||
|
||||
#define flam3_print_edits (1)
|
||||
#define flam3_dont_print_edits (0)
|
||||
|
||||
//typedef double flam3_palette[256][3];
|
||||
typedef struct {
|
||||
double index;
|
||||
double color[4];
|
||||
} flam3_palette_entry;
|
||||
|
||||
typedef flam3_palette_entry flam3_palette[256];
|
||||
|
||||
int flam3_get_palette(int palette_index, flam3_palette p, double hue_rotation);
|
||||
|
||||
#define flam3_variation_random (-1)
|
||||
#define flam3_variation_random_fromspecified (-2)
|
||||
|
||||
extern char *flam3_variation_names[];
|
||||
|
||||
#define flam3_nvariations 97
|
||||
#define flam3_nxforms 12
|
||||
|
||||
#define flam3_parent_fn_len 30
|
||||
|
||||
#define flam3_interpolation_linear 0
|
||||
#define flam3_interpolation_smooth 1
|
||||
|
||||
#define flam3_inttype_linear 0
|
||||
#define flam3_inttype_log 1
|
||||
#define flam3_inttype_compat 2 /* Linear and old behaviour */
|
||||
#define flam3_inttype_older 3 /* rotate padded xforms */
|
||||
|
||||
#define flam3_palette_interpolation_hsv 0
|
||||
#define flam3_palette_interpolation_sweep 1
|
||||
|
||||
#define flam3_max_action_length 10000
|
||||
|
||||
#define flam3_palette_mode_step 0
|
||||
#define flam3_palette_mode_linear 1
|
||||
|
||||
#define VAR_LINEAR 0
|
||||
#define VAR_SINUSOIDAL 1
|
||||
#define VAR_SPHERICAL 2
|
||||
#define VAR_SWIRL 3
|
||||
#define VAR_HORSESHOE 4
|
||||
#define VAR_POLAR 5
|
||||
#define VAR_HANDKERCHIEF 6
|
||||
#define VAR_HEART 7
|
||||
#define VAR_DISC 8
|
||||
#define VAR_SPIRAL 9
|
||||
#define VAR_HYPERBOLIC 10
|
||||
#define VAR_DIAMOND 11
|
||||
#define VAR_EX 12
|
||||
#define VAR_JULIA 13
|
||||
#define VAR_BENT 14
|
||||
#define VAR_WAVES 15
|
||||
#define VAR_FISHEYE 16
|
||||
#define VAR_POPCORN 17
|
||||
#define VAR_EXPONENTIAL 18
|
||||
#define VAR_POWER 19
|
||||
#define VAR_COSINE 20
|
||||
#define VAR_RINGS 21
|
||||
#define VAR_FAN 22
|
||||
#define VAR_BLOB 23
|
||||
#define VAR_PDJ 24
|
||||
#define VAR_FAN2 25
|
||||
#define VAR_RINGS2 26
|
||||
#define VAR_EYEFISH 27
|
||||
#define VAR_BUBBLE 28
|
||||
#define VAR_CYLINDER 29
|
||||
#define VAR_PERSPECTIVE 30
|
||||
#define VAR_NOISE 31
|
||||
#define VAR_JULIAN 32
|
||||
#define VAR_JULIASCOPE 33
|
||||
#define VAR_BLUR 34
|
||||
#define VAR_GAUSSIAN_BLUR 35
|
||||
#define VAR_RADIAL_BLUR 36
|
||||
#define VAR_PIE 37
|
||||
#define VAR_NGON 38
|
||||
#define VAR_CURL 39
|
||||
#define VAR_RECTANGLES 40
|
||||
#define VAR_ARCH 41
|
||||
#define VAR_TANGENT 42
|
||||
#define VAR_SQUARE 43
|
||||
#define VAR_RAYS 44
|
||||
#define VAR_BLADE 45
|
||||
#define VAR_SECANT2 46
|
||||
#define VAR_TWINTRIAN 47
|
||||
#define VAR_CROSS 48
|
||||
#define VAR_DISC2 49
|
||||
#define VAR_SUPER_SHAPE 50
|
||||
#define VAR_FLOWER 51
|
||||
#define VAR_CONIC 52
|
||||
#define VAR_PARABOLA 53
|
||||
#define VAR_BENT2 54
|
||||
#define VAR_BIPOLAR 55
|
||||
#define VAR_BOARDERS 56
|
||||
#define VAR_BUTTERFLY 57
|
||||
#define VAR_CELL 58
|
||||
#define VAR_CPOW 59
|
||||
#define VAR_CURVE 60
|
||||
#define VAR_EDISC 61
|
||||
#define VAR_ELLIPTIC 62
|
||||
#define VAR_ESCHER 63
|
||||
#define VAR_FOCI 64
|
||||
#define VAR_LAZYSUSAN 65
|
||||
#define VAR_LOONIE 66
|
||||
#define VAR_PRE_BLUR 67
|
||||
#define VAR_MODULUS 68
|
||||
#define VAR_OSCILLOSCOPE 69
|
||||
#define VAR_POLAR2 70
|
||||
#define VAR_POPCORN2 71
|
||||
#define VAR_SCRY 72
|
||||
#define VAR_SEPARATION 73
|
||||
#define VAR_SPLIT 74
|
||||
#define VAR_SPLITS 75
|
||||
#define VAR_STRIPES 76
|
||||
#define VAR_WEDGE 77
|
||||
#define VAR_WEDGE_JULIA 78
|
||||
#define VAR_WEDGE_SPH 79
|
||||
#define VAR_WHORL 80
|
||||
#define VAR_WAVES2 81
|
||||
#define VAR_EXP 82
|
||||
#define VAR_LOG 83
|
||||
#define VAR_SIN 84
|
||||
#define VAR_COS 85
|
||||
#define VAR_TAN 86
|
||||
#define VAR_SEC 87
|
||||
#define VAR_CSC 88
|
||||
#define VAR_COT 89
|
||||
#define VAR_SINH 90
|
||||
#define VAR_COSH 91
|
||||
#define VAR_TANH 92
|
||||
#define VAR_SECH 93
|
||||
#define VAR_CSCH 94
|
||||
#define VAR_COTH 95
|
||||
#define VAR_AUGER 96
|
||||
|
||||
typedef struct {
|
||||
|
||||
double badvals;
|
||||
long int num_iters;
|
||||
int render_seconds;
|
||||
|
||||
} stat_struct;
|
||||
|
||||
typedef struct {
|
||||
|
||||
unsigned int width, height;
|
||||
int version;
|
||||
int id;
|
||||
|
||||
/* There are 256 levels of gray to work with */
|
||||
double intensity_weight[256];
|
||||
unsigned int bin_size[256];
|
||||
unsigned int bin_offset[256];
|
||||
|
||||
/* Pointer to newly allocated memory; we will be allocating */
|
||||
/* 2*w*h ushorts for this storage. The bin offset will */
|
||||
/* provide the starting point for a random selection from */
|
||||
/* (bin size) ordered pairs */
|
||||
unsigned short *rowcols;
|
||||
|
||||
} flam3_image_store;
|
||||
|
||||
|
||||
typedef struct xform {
|
||||
double var[flam3_nvariations]; /* interp coefs between variations */
|
||||
double c[3][2]; /* the coefs to the affine part of the function */
|
||||
double post[3][2]; /* the post transform */
|
||||
double density; /* probability that this function is chosen. 0 - 1 */
|
||||
double color; /* color coords for this function. 0 - 1 */
|
||||
double color_speed; /* scaling factor on color added to current iteration */
|
||||
double animate; /* whether or not this xform rotates (in sheep) >0 means stationary */
|
||||
double opacity; /* 0=invisible, 1=totally visible */
|
||||
double vis_adjusted; /* adjusted visibility for better transitions */
|
||||
|
||||
int padding;/* Set to 1 for padding xforms */
|
||||
double wind[2]; /* winding numbers */
|
||||
|
||||
int precalc_angles_flag;
|
||||
int precalc_atan_xy_flag;
|
||||
int precalc_atan_yx_flag;
|
||||
double has_preblur;
|
||||
int has_post;
|
||||
|
||||
/* Params for new parameterized variations */
|
||||
/* Blob */
|
||||
double blob_low;
|
||||
double blob_high;
|
||||
double blob_waves;
|
||||
|
||||
/* PDJ */
|
||||
double pdj_a;
|
||||
double pdj_b;
|
||||
double pdj_c;
|
||||
double pdj_d;
|
||||
|
||||
/* Fan2 */
|
||||
double fan2_x;
|
||||
double fan2_y;
|
||||
|
||||
/* Rings2 */
|
||||
double rings2_val;
|
||||
|
||||
/* Perspective */
|
||||
double perspective_angle;
|
||||
double perspective_dist;
|
||||
|
||||
/* Julia_N */
|
||||
double julian_power;
|
||||
double julian_dist;
|
||||
|
||||
/* Julia_Scope */
|
||||
double juliascope_power;
|
||||
double juliascope_dist;
|
||||
|
||||
/* Radial_Blur */
|
||||
double radial_blur_angle;
|
||||
|
||||
/* Pie */
|
||||
double pie_slices;
|
||||
double pie_rotation;
|
||||
double pie_thickness;
|
||||
|
||||
/* Ngon */
|
||||
double ngon_sides;
|
||||
double ngon_power;
|
||||
double ngon_circle;
|
||||
double ngon_corners;
|
||||
|
||||
/* Curl */
|
||||
double curl_c1;
|
||||
double curl_c2;
|
||||
|
||||
/* Rectangles */
|
||||
double rectangles_x;
|
||||
double rectangles_y;
|
||||
|
||||
/* AMW */
|
||||
double amw_amp;
|
||||
|
||||
/* Disc 2 */
|
||||
double disc2_rot;
|
||||
double disc2_twist;
|
||||
|
||||
/* Supershape */
|
||||
double super_shape_rnd;
|
||||
double super_shape_m;
|
||||
double super_shape_n1;
|
||||
double super_shape_n2;
|
||||
double super_shape_n3;
|
||||
double super_shape_holes;
|
||||
|
||||
/* Flower */
|
||||
double flower_petals;
|
||||
double flower_holes;
|
||||
|
||||
/* Conic */
|
||||
double conic_eccentricity;
|
||||
double conic_holes;
|
||||
|
||||
/* Parabola */
|
||||
double parabola_height;
|
||||
double parabola_width;
|
||||
|
||||
/* Bent2 */
|
||||
double bent2_x;
|
||||
double bent2_y;
|
||||
|
||||
/* Bipolar */
|
||||
double bipolar_shift;
|
||||
|
||||
/* Cell */
|
||||
double cell_size;
|
||||
|
||||
/* Cpow */
|
||||
double cpow_r;
|
||||
double cpow_i;
|
||||
double cpow_power; /* int in apo */
|
||||
|
||||
/* Curve */
|
||||
double curve_xamp,curve_yamp;
|
||||
double curve_xlength,curve_ylength;
|
||||
|
||||
/* Escher */
|
||||
double escher_beta;
|
||||
|
||||
/* Lazysusan */
|
||||
double lazysusan_spin;
|
||||
double lazysusan_space;
|
||||
double lazysusan_twist;
|
||||
double lazysusan_x, lazysusan_y;
|
||||
|
||||
/* Modulus */
|
||||
double modulus_x, modulus_y;
|
||||
|
||||
/* Oscope */
|
||||
double oscope_separation;
|
||||
double oscope_frequency;
|
||||
double oscope_amplitude;
|
||||
double oscope_damping;
|
||||
|
||||
/* Popcorn2 */
|
||||
double popcorn2_x, popcorn2_y, popcorn2_c;
|
||||
|
||||
/* Separation */
|
||||
double separation_x, separation_xinside;
|
||||
double separation_y, separation_yinside;
|
||||
|
||||
/* Split */
|
||||
double split_xsize;
|
||||
double split_ysize;
|
||||
|
||||
/* Splits */
|
||||
double splits_x,splits_y;
|
||||
|
||||
/* Stripes */
|
||||
double stripes_space;
|
||||
double stripes_warp;
|
||||
|
||||
/* Wedge */
|
||||
double wedge_angle, wedge_hole;
|
||||
double wedge_count, wedge_swirl;
|
||||
|
||||
/* Wedge_Julia */
|
||||
double wedge_julia_angle;
|
||||
double wedge_julia_count;
|
||||
double wedge_julia_power;
|
||||
double wedge_julia_dist;
|
||||
|
||||
/* Wedge_Sph */
|
||||
double wedge_sph_angle, wedge_sph_count;
|
||||
double wedge_sph_hole, wedge_sph_swirl;
|
||||
|
||||
/* Whorl */
|
||||
double whorl_inside, whorl_outside;
|
||||
|
||||
/* Waves2 */
|
||||
double waves2_freqx, waves2_scalex;
|
||||
double waves2_freqy, waves2_scaley;
|
||||
|
||||
/* Auger */
|
||||
double auger_sym, auger_weight;
|
||||
double auger_freq, auger_scale;
|
||||
|
||||
/* If perspective is used, precalculate these values */
|
||||
/* from the _angle and _dist */
|
||||
double persp_vsin;
|
||||
double persp_vfcos;
|
||||
|
||||
/* If Julia_N is used, precalculate these values */
|
||||
double julian_rN;
|
||||
double julian_cn;
|
||||
|
||||
/* If Julia_Scope is used, precalculate these values */
|
||||
double juliascope_rN;
|
||||
double juliascope_cn;
|
||||
|
||||
/* if Wedge_Julia, precalculate */
|
||||
double wedgeJulia_rN;
|
||||
double wedgeJulia_cn;
|
||||
double wedgeJulia_cf;
|
||||
|
||||
/* If Radial_Blur is used, precalculate these values */
|
||||
double radialBlur_spinvar;
|
||||
double radialBlur_zoomvar;
|
||||
|
||||
/* Precalculate these values for waves */
|
||||
double waves_dx2;
|
||||
double waves_dy2;
|
||||
|
||||
/* If disc2 is used, precalculate these values */
|
||||
double disc2_sinadd;
|
||||
double disc2_cosadd;
|
||||
double disc2_timespi;
|
||||
|
||||
/* If supershape is used, precalculate these values */
|
||||
double super_shape_pm_4;
|
||||
double super_shape_pneg1_n1;
|
||||
|
||||
int num_active_vars;
|
||||
double active_var_weights[flam3_nvariations];
|
||||
int varFunc[flam3_nvariations];
|
||||
|
||||
int motion_freq;
|
||||
int motion_func;
|
||||
|
||||
struct xform *motion;
|
||||
int num_motion;
|
||||
|
||||
|
||||
} flam3_xform;
|
||||
|
||||
typedef struct {
|
||||
char flame_name[flam3_name_len+1]; /* 64 chars plus a null */
|
||||
double time;
|
||||
int interpolation;
|
||||
int interpolation_type;
|
||||
int palette_interpolation;
|
||||
int num_xforms;
|
||||
int final_xform_index;
|
||||
int final_xform_enable;
|
||||
flam3_xform *xform;
|
||||
|
||||
/* Xaos implementation */
|
||||
double **chaos;
|
||||
int chaos_enable;
|
||||
|
||||
int genome_index; /* index into source file */
|
||||
char parent_fname[flam3_parent_fn_len]; /* base filename where parent was located */
|
||||
int symmetry; /* 0 means none */
|
||||
flam3_palette palette;
|
||||
char *input_image; /* preview/temporary! */
|
||||
int palette_index;
|
||||
double brightness; /* 1.0 = normal */
|
||||
double contrast; /* 1.0 = normal */
|
||||
double gamma;
|
||||
double highlight_power;
|
||||
int width, height; /* of the final image */
|
||||
int spatial_oversample;
|
||||
double center[2]; /* of camera */
|
||||
double rot_center[2]; /* really the center */
|
||||
double rotate; /* camera */
|
||||
double vibrancy; /* blend between color algs (0=old,1=new) */
|
||||
double hue_rotation; /* applies to cmap, 0-1 */
|
||||
double background[3];
|
||||
double zoom; /* effects ppu, sample density, scale */
|
||||
double pixels_per_unit; /* vertically */
|
||||
double spatial_filter_radius; /* radius of spatial filter */
|
||||
int spatial_filter_select; /* selected spatial filter */
|
||||
// double (*spatial_filter_func)(double); /* spatial filter kernel function */
|
||||
// double spatial_filter_support; /* size of standard kernel for specific function */
|
||||
double sample_density; /* samples per pixel (not bucket) */
|
||||
/* in order to motion blur more accurately we compute the logs of the
|
||||
sample density many times and average the results. */
|
||||
/* nbatches is the number of times the buckets are filtered into
|
||||
the abucket log accumulator */
|
||||
/* ntemporal_samples is the number of time steps per batch. this many
|
||||
interpolated control points are used per batch and accumulated */
|
||||
int nbatches;
|
||||
int ntemporal_samples;
|
||||
|
||||
/* Density estimation parameters for blurring low density hits */
|
||||
double estimator; /* Filter width for bin with one hit */
|
||||
double estimator_curve; /* Exponent on decay function ( MAX / a^(k-1) ) */
|
||||
double estimator_minimum; /* Minimum filter width used -
|
||||
forces filter to be used of at least this width on all pts */
|
||||
|
||||
/* XML Edit structure */
|
||||
xmlDocPtr edits;
|
||||
|
||||
/* Small-gamma linearization threshold */
|
||||
double gam_lin_thresh;
|
||||
|
||||
/* for cmap_interpolated hack */
|
||||
int palette_index0;
|
||||
double hue_rotation0;
|
||||
int palette_index1;
|
||||
double hue_rotation1;
|
||||
double palette_blend;
|
||||
|
||||
int temporal_filter_type; /* Temporal filters */
|
||||
double temporal_filter_width, temporal_filter_exp;
|
||||
|
||||
int palette_mode;
|
||||
|
||||
|
||||
} flam3_genome;
|
||||
|
||||
typedef struct {
|
||||
int from;
|
||||
int to;
|
||||
double scalar;
|
||||
} flam3_chaos_entry;
|
||||
|
||||
/* xform manipulation */
|
||||
|
||||
void flam3_add_motion_element(flam3_xform *xf);
|
||||
void flam3_add_xforms(flam3_genome *cp, int num_to_add, int interp_padding, int final_flag);
|
||||
void flam3_delete_xform(flam3_genome *thiscp, int idx_to_delete);
|
||||
void flam3_copy_xform(flam3_xform *dest, flam3_xform *src);
|
||||
void flam3_copy(flam3_genome *dest, flam3_genome *src);
|
||||
void flam3_copyx(flam3_genome *dest, flam3_genome *src, int num_std, int num_final);
|
||||
void flam3_copy_params(flam3_xform *dest, flam3_xform *src, int varn);
|
||||
void flam3_delete_motion_elements(flam3_xform *xf);
|
||||
|
||||
EXPORT int flam3_xform_preview(flam3_genome *cp, int xi, double range, int numvals, int depth, double *result, randctx *rc);
|
||||
EXPORT unsigned short* flam3_create_xform_distrib(flam3_genome *cp);
|
||||
int flam3_create_chaos_distrib(flam3_genome *cp, int xi, unsigned short *xform_distrib);
|
||||
int flam3_check_unity_chaos(flam3_genome *cp);
|
||||
void clear_cp(flam3_genome *cp, int def_flag);
|
||||
|
||||
/* samples is array nsamples*4 long of x,y,color triples.
|
||||
using (samples[0], samples[1]) as starting XY point and
|
||||
(samples[2], samples[3]) as starting color coordinate,
|
||||
perform fuse iterations and throw them away, then perform
|
||||
nsamples iterations and save them in the samples array */
|
||||
EXPORT int flam3_iterate(flam3_genome *g, int nsamples, int fuse, double *samples,
|
||||
unsigned short *xform_distrib, randctx *rc);
|
||||
|
||||
void apply_motion_parameters(flam3_xform *xf, flam3_xform *addto, double blend);
|
||||
|
||||
/* genomes is array ngenomes long, with times set and in ascending order.
|
||||
interpolate to the requested time and return in result */
|
||||
EXPORT void flam3_interpolate(flam3_genome *genomes, int ngenomes, double time, double stagger, flam3_genome *result);
|
||||
|
||||
/* print genome to given file with extra_attributes if not NULL */
|
||||
void flam3_print(FILE *f, flam3_genome *g, char *extra_attributes, int print_edits);
|
||||
void flam3_print_xform(FILE *f, flam3_xform *x, int final_flag, int numstd, double *chaos_row, int motion_flag);
|
||||
char *flam3_print_to_string(flam3_genome *cp);
|
||||
|
||||
/* ivars is a list of variations to use, or flam3_variation_random */
|
||||
/* ivars_n is the number of values in ivars to select from. */
|
||||
/* sym is either a symmetry group or 0 meaning random or no symmetry */
|
||||
/* spec_xforms specifies the number of xforms to use, setting to 0 makes the number random. */
|
||||
EXPORT void flam3_random(flam3_genome *g, int *ivars, int ivars_n, int sym, int spec_xforms);
|
||||
|
||||
void add_to_action(char *action, char *addtoaction);
|
||||
|
||||
EXPORT void flam3_mutate(flam3_genome *cp, int mutate_mode, int *ivars, int ivars_n, int sym, double speed, randctx *rc, char *action);
|
||||
EXPORT void flam3_cross(flam3_genome *cp0, flam3_genome *cp1, flam3_genome *out, int cross_mode, randctx *rc, char *action);
|
||||
|
||||
/* return NULL in case of error */
|
||||
EXPORT flam3_genome *flam3_parse_xml2(char *s, char *fn, int default_flag, int *ncps);
|
||||
flam3_genome *flam3_parse_from_file(FILE *f, char *fn, int default_flag, int *ncps);
|
||||
|
||||
void flam3_add_symmetry(flam3_genome *g, int sym);
|
||||
|
||||
void flam3_improve_colors(flam3_genome *g, int ntries, int change_palette, int color_resolution);
|
||||
EXPORT int flam3_colorhist(flam3_genome *cp, int num_batches, double *hist);
|
||||
EXPORT int flam3_estimate_bounding_box(flam3_genome *g, double eps, int nsamples,
|
||||
double *bmin, double *bmax, randctx *rc);
|
||||
void flam3_rotate(flam3_genome *g, double angle, int interp_type); /* angle in degrees */
|
||||
|
||||
double flam3_dimension(flam3_genome *g, int ntries, int clip_to_camera);
|
||||
double flam3_lyapunov(flam3_genome *g, int ntries);
|
||||
|
||||
void flam3_apply_template(flam3_genome *cp, flam3_genome *templ);
|
||||
|
||||
EXPORT int flam3_count_nthreads(void);
|
||||
|
||||
typedef struct {
|
||||
// double temporal_filter_radius;
|
||||
double pixel_aspect_ratio; /* width over height of each pixel */
|
||||
flam3_genome *genomes;
|
||||
int ngenomes;
|
||||
int verbose;
|
||||
int bits;
|
||||
int bytes_per_channel;
|
||||
int earlyclip;
|
||||
double time;
|
||||
int (*progress)(void *, double, int, double);
|
||||
void *progress_parameter;
|
||||
randctx rc;
|
||||
int nthreads;
|
||||
int sub_batch_size;
|
||||
} flam3_frame;
|
||||
|
||||
|
||||
#define flam3_field_both 0
|
||||
#define flam3_field_even 1
|
||||
#define flam3_field_odd 2
|
||||
|
||||
/* out is pixel array.
|
||||
pixels are rgb or rgba if nchan is 3 or 4. */
|
||||
EXPORT int flam3_render(flam3_frame *f, void *out, int field, int nchan, int transp, stat_struct *stats);
|
||||
|
||||
EXPORT double flam3_render_memory_required(flam3_frame *f);
|
||||
EXPORT int flam3_make_strip(flam3_genome *cp, int nstrips, int stripnum);
|
||||
void rotate_by(double *p, double *center, double by);
|
||||
|
||||
|
||||
double flam3_random01();
|
||||
double flam3_random11();
|
||||
int flam3_random_bit();
|
||||
|
||||
/* ISAAC random numbers */
|
||||
double flam3_random_isaac_01(randctx *);
|
||||
double flam3_random_isaac_11(randctx *);
|
||||
int flam3_random_isaac_bit(randctx *);
|
||||
|
||||
EXPORT void flam3_init_frame(flam3_frame *f);
|
||||
|
||||
/* External memory helpers */
|
||||
EXPORT void *flam3_malloc(size_t size);
|
||||
EXPORT void flam3_free(void *ptr);
|
||||
|
||||
void flam3_srandom();
|
||||
|
||||
flam3_genome *sheep_loop(flam3_genome *cp, double blend);
|
||||
flam3_genome *sheep_edge(flam3_genome *cp, double blend, int seqflag, double stagger);
|
||||
|
||||
/* Motion function indices */
|
||||
#define MOTION_SIN 1
|
||||
#define MOTION_TRIANGLE 2
|
||||
#define MOTION_HILL 3
|
||||
|
||||
/* Mutation modes */
|
||||
#define MUTATE_NOT_SPECIFIED -1
|
||||
#define MUTATE_ALL_VARIATIONS 0
|
||||
#define MUTATE_ONE_XFORM_COEFS 1
|
||||
#define MUTATE_ADD_SYMMETRY 2
|
||||
#define MUTATE_POST_XFORMS 3
|
||||
#define MUTATE_COLOR_PALETTE 4
|
||||
#define MUTATE_DELETE_XFORM 5
|
||||
#define MUTATE_ALL_COEFS 6
|
||||
|
||||
/* Cross modes */
|
||||
#define CROSS_NOT_SPECIFIED -1
|
||||
#define CROSS_UNION 0
|
||||
#define CROSS_INTERPOLATE 1
|
||||
#define CROSS_ALTERNATE 2
|
||||
|
||||
#endif
|
12
src/flam3.pc.in
Normal file
12
src/flam3.pc.in
Normal file
@ -0,0 +1,12 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
datarootdir=@datarootdir@
|
||||
|
||||
Name: flam3
|
||||
Description: Renders and animates fractal flames and manipulates their genetic codes, see www.flam3.com for more info.
|
||||
Version: @VERSION@
|
||||
Requires: libpng12 >= 1.0 libxml-2.0
|
||||
Libs: -L${libdir} -lflam3 -ljpeg -lpthread
|
||||
Cflags: -I${includedir}
|
146
src/genome.dsp
Normal file
146
src/genome.dsp
Normal file
@ -0,0 +1,146 @@
|
||||
# Microsoft Developer Studio Project File - Name="pick" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=pick - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "genome.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "genome.mak" CFG="pick - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "pick - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "pick - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "pick - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /I "c:\src\libpng" /I "c:\src\zlib" /I "c:\src\libxml2\include" /I "c:\src\jpeg" /I "c:\src\iconv\include" /I "c:\src\pthreads" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /Zm1000 /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib c:\src\jpeg\libjpeg.lib c:\src\libpng\libpng.lib c:\src\libxml2\lib\libxml2.lib c:\src\zlib\zlib.lib c:\src\pthreads\pthreadVC2.lib /nologo /subsystem:console /machine:I386 /out:"Release/flam3-genome.exe"
|
||||
|
||||
!ELSEIF "$(CFG)" == "pick - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "c:\src\libpng" /I "c:\src\libxml2\include" /I "c:\src\jpeg" /I "c:\src\iconv\include" /I "c:\src\zlib" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /Zm1000 /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib c:\src\jpeg\libjpeg.lib c:\src\libpng\libpng.lib c:\src\libxml2\lib\libxml2.lib c:\src\zlib\zlib.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "pick - Win32 Release"
|
||||
# Name "pick - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\docstring.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\flam3-genome.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\flam3-palettes.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\flam3.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\isaac.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\jpeg.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\png.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=cmap.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=config.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=jpeg.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=libifs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=rect.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
44
src/img.h
Normal file
44
src/img.h
Normal file
@ -0,0 +1,44 @@
|
||||
/*
|
||||
FLAM3 - cosmic recursive fractal flames
|
||||
Copyright (C) 1992-2009 Spotworks LLC
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include "flam3.h"
|
||||
|
||||
#define FLAM3_PNG_COM 8
|
||||
|
||||
#ifdef WIN32
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
|
||||
char *genome;
|
||||
char *badvals;
|
||||
char *numiters;
|
||||
char *rtime;
|
||||
|
||||
} flam3_img_comments;
|
||||
|
||||
|
||||
void write_jpeg(FILE *file, unsigned char *image, int width, int height, flam3_img_comments *fpc);
|
||||
void write_png(FILE *file, void *image, int width, int height, flam3_img_comments *fpc, int bpc);
|
||||
|
||||
/* returns RGBA pixel array or NULL on failure */
|
||||
unsigned char *read_png(FILE *file, int *width, int *height);
|
||||
unsigned char *read_jpeg(FILE *file, int *width, int *height);
|
250
src/install-sh
Executable file
250
src/install-sh
Executable file
@ -0,0 +1,250 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||
#
|
||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d $dst ]; then
|
||||
instcmd=:
|
||||
else
|
||||
instcmd=mkdir
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
then
|
||||
true
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
else
|
||||
true
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
|
||||
oIFS="${IFS}"
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
shift
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
|
||||
fi &&
|
||||
|
||||
|
||||
exit 0
|
956
src/interpolation.c
Normal file
956
src/interpolation.c
Normal file
@ -0,0 +1,956 @@
|
||||
/*
|
||||
FLAM3 - cosmic recursive fractal flames
|
||||
Copyright (C) 1992-2009 Spotworks LLC
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "interpolation.h"
|
||||
#include "palettes.h"
|
||||
|
||||
double adjust_percentage(double in) {
|
||||
|
||||
if (in==0.0)
|
||||
return(0.0);
|
||||
else
|
||||
return(pow(10.0, -log(1.0/in)/log(2)));
|
||||
|
||||
}
|
||||
|
||||
double motion_funcs(int funcnum, double timeval) {
|
||||
|
||||
/* motion funcs should be cyclic, and equal to 0 at integral time values */
|
||||
/* abs peak values should be not be greater than 1 */
|
||||
if (funcnum==MOTION_SIN) {
|
||||
return (sin(2.0*M_PI*timeval));
|
||||
} else if (funcnum==MOTION_TRIANGLE) {
|
||||
double fr = fmod(timeval,1.0);
|
||||
|
||||
if (fr<0) fr+= 1.0;
|
||||
|
||||
if (fr<=.25)
|
||||
fr = 4.0 * fr;
|
||||
else if (fr<=.75)
|
||||
fr = -4.0 * fr + 2.0;
|
||||
else
|
||||
fr = 4.0 * fr - 4.0;
|
||||
|
||||
return(fr);
|
||||
} else { //if (funcnum==MOTION_HILL) {
|
||||
return( (1.0-cos(2.0*M_PI*timeval)) * 0.5);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
double det_matrix(double s[2][2]) {
|
||||
return s[0][0] * s[1][1] - s[0][1] * s[1][0];
|
||||
}
|
||||
|
||||
int id_matrix(double s[3][2]) {
|
||||
return
|
||||
(s[0][0] == 1.0) &&
|
||||
(s[0][1] == 0.0) &&
|
||||
(s[1][0] == 0.0) &&
|
||||
(s[1][1] == 1.0) &&
|
||||
(s[2][0] == 0.0) &&
|
||||
(s[2][1] == 0.0);
|
||||
}
|
||||
|
||||
int zero_matrix(double s[3][2]) {
|
||||
return
|
||||
(s[0][0] == 0.0) &&
|
||||
(s[0][1] == 0.0) &&
|
||||
(s[1][0] == 0.0) &&
|
||||
(s[1][1] == 0.0) &&
|
||||
(s[2][0] == 0.0) &&
|
||||
(s[2][1] == 0.0);
|
||||
}
|
||||
|
||||
void copy_matrix(double to[3][2], double from[3][2]) {
|
||||
|
||||
to[0][0] = from[0][0];
|
||||
to[0][1] = from[0][1];
|
||||
to[1][0] = from[1][0];
|
||||
to[1][1] = from[1][1];
|
||||
to[2][0] = from[2][0];
|
||||
to[2][1] = from[2][1];
|
||||
}
|
||||
|
||||
|
||||
void clear_matrix(double m[3][2]) {
|
||||
m[0][0] = 0.0;
|
||||
m[0][1] = 0.0;
|
||||
m[1][0] = 0.0;
|
||||
m[1][1] = 0.0;
|
||||
m[2][0] = 0.0;
|
||||
m[2][1] = 0.0;
|
||||
}
|
||||
|
||||
void sum_matrix(double s, double m1[3][2], double m2[3][2]) {
|
||||
|
||||
m2[0][0] += s * m1[0][0];
|
||||
m2[0][1] += s * m1[0][1];
|
||||
m2[1][0] += s * m1[1][0];
|
||||
m2[1][1] += s * m1[1][1];
|
||||
m2[2][0] += s * m1[2][0];
|
||||
m2[2][1] += s * m1[2][1];
|
||||
}
|
||||
|
||||
void mult_matrix(double s1[2][2], double s2[2][2], double d[2][2]) {
|
||||
d[0][0] = s1[0][0] * s2[0][0] + s1[1][0] * s2[0][1];
|
||||
d[1][0] = s1[0][0] * s2[1][0] + s1[1][0] * s2[1][1];
|
||||
d[0][1] = s1[0][1] * s2[0][0] + s1[1][1] * s2[0][1];
|
||||
d[1][1] = s1[0][1] * s2[1][0] + s1[1][1] * s2[1][1];
|
||||
}
|
||||
|
||||
int compare_xforms(const void *av, const void *bv) {
|
||||
flam3_xform *a = (flam3_xform *) av;
|
||||
flam3_xform *b = (flam3_xform *) bv;
|
||||
double aa[2][2];
|
||||
double bb[2][2];
|
||||
double ad, bd;
|
||||
|
||||
aa[0][0] = a->c[0][0];
|
||||
aa[0][1] = a->c[0][1];
|
||||
aa[1][0] = a->c[1][0];
|
||||
aa[1][1] = a->c[1][1];
|
||||
bb[0][0] = b->c[0][0];
|
||||
bb[0][1] = b->c[0][1];
|
||||
bb[1][0] = b->c[1][0];
|
||||
bb[1][1] = b->c[1][1];
|
||||
ad = det_matrix(aa);
|
||||
bd = det_matrix(bb);
|
||||
|
||||
if (a->color_speed > b->color_speed) return 1;
|
||||
if (a->color_speed < b->color_speed) return -1;
|
||||
if (a->color_speed) {
|
||||
if (ad < 0) return -1;
|
||||
if (bd < 0) return 1;
|
||||
ad = atan2(a->c[0][0], a->c[0][1]);
|
||||
bd = atan2(b->c[0][0], b->c[0][1]);
|
||||
}
|
||||
|
||||
if (ad < bd) return -1;
|
||||
if (ad > bd) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void interpolate_cmap(flam3_palette cmap, double blend,
|
||||
int index0, double hue0, int index1, double hue1) {
|
||||
|
||||
flam3_palette p0,p1;
|
||||
int i, j;
|
||||
|
||||
flam3_get_palette(index0, p0, hue0);
|
||||
flam3_get_palette(index1, p1, hue1);
|
||||
|
||||
for (i = 0; i < 256; i++) {
|
||||
double t[5], s[5];
|
||||
|
||||
rgb2hsv(p0[i].color, s);
|
||||
rgb2hsv(p1[i].color, t);
|
||||
|
||||
s[3] = p0[i].color[3];
|
||||
t[3] = p1[i].color[3];
|
||||
|
||||
s[4] = p0[i].index;
|
||||
t[4] = p1[i].index;
|
||||
|
||||
for (j = 0; j < 5; j++)
|
||||
t[j] = ((1.0-blend) * s[j]) + (blend * t[j]);
|
||||
|
||||
hsv2rgb(t, cmap[i].color);
|
||||
cmap[i].color[3] = t[3];
|
||||
cmap[i].index = t[4];
|
||||
}
|
||||
}
|
||||
|
||||
void interp_and_convert_back(double *c, int ncps, int xfi, double cxang[4][2],
|
||||
double cxmag[4][2], double cxtrn[4][2],double store_array[3][2]) {
|
||||
|
||||
int i,col;
|
||||
|
||||
double accang[2],accmag[2];
|
||||
double expmag;
|
||||
int accmode[2];
|
||||
|
||||
accang[0] = 0.0;
|
||||
accang[1] = 0.0;
|
||||
accmag[0] = 0.0;
|
||||
accmag[1] = 0.0;
|
||||
|
||||
accmode[0]=accmode[1]=0;
|
||||
|
||||
/* accumulation mode defaults to logarithmic, but in special */
|
||||
/* cases we want to switch to linear accumulation */
|
||||
for (col=0; col<2; col++) {
|
||||
for (i=0; i<ncps; i++) {
|
||||
if (log(cxmag[i][col])<-10)
|
||||
accmode[col]=1; // Mode set to linear interp
|
||||
}
|
||||
}
|
||||
|
||||
for (i=0; i<ncps; i++) {
|
||||
for (col=0; col<2; col++) {
|
||||
|
||||
accang[col] += c[i] * cxang[i][col];
|
||||
|
||||
if (accmode[col]==0)
|
||||
accmag[col] += c[i] * log(cxmag[i][col]);
|
||||
else
|
||||
accmag[col] += c[i] * (cxmag[i][col]);
|
||||
|
||||
/* translation is ready to go */
|
||||
store_array[2][col] += c[i] * cxtrn[i][col];
|
||||
}
|
||||
}
|
||||
|
||||
/* Convert the angle back to rectangular */
|
||||
for (col=0;col<2;col++) {
|
||||
if (accmode[col]==0)
|
||||
expmag = exp(accmag[col]);
|
||||
else
|
||||
expmag = accmag[col];
|
||||
|
||||
store_array[col][0] = expmag * cos(accang[col]);
|
||||
store_array[col][1] = expmag * sin(accang[col]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void convert_linear_to_polar(flam3_genome *cp, int ncps, int xfi, int cflag,
|
||||
double cxang[4][2], double cxmag[4][2], double cxtrn[4][2]) {
|
||||
|
||||
double c1[2],d,t,refang;
|
||||
int col,k;
|
||||
int zlm[2];
|
||||
|
||||
for (k=0; k<ncps;k++) {
|
||||
|
||||
/* Establish the angles and magnitudes for each component */
|
||||
/* Keep translation linear */
|
||||
zlm[0]=zlm[1]=0;
|
||||
for (col=0;col<2;col++) {
|
||||
|
||||
if (cflag==0) {
|
||||
c1[0] = cp[k].xform[xfi].c[col][0];
|
||||
c1[1] = cp[k].xform[xfi].c[col][1];
|
||||
t = cp[k].xform[xfi].c[2][col];
|
||||
} else {
|
||||
c1[0] = cp[k].xform[xfi].post[col][0];
|
||||
c1[1] = cp[k].xform[xfi].post[col][1];
|
||||
t = cp[k].xform[xfi].post[2][col];
|
||||
}
|
||||
|
||||
cxang[k][col] = atan2(c1[1],c1[0]);
|
||||
cxmag[k][col] = sqrt(c1[0]*c1[0] + c1[1]*c1[1]);
|
||||
|
||||
if (cxmag[k][col]== 0.0)
|
||||
zlm[col]=1;
|
||||
|
||||
cxtrn[k][col] = t;
|
||||
}
|
||||
|
||||
if (zlm[0]==1 && zlm[1]==0)
|
||||
cxang[k][0] = cxang[k][1];
|
||||
else if (zlm[0]==0 && zlm[1]==1)
|
||||
cxang[k][1] = cxang[k][0];
|
||||
|
||||
}
|
||||
|
||||
/* Make sure the rotation is the shorter direction around the circle */
|
||||
/* by adjusting each angle in succession, and rotate clockwise if 180 degrees */
|
||||
for (col=0; col<2; col++) {
|
||||
for (k=1;k<ncps;k++) {
|
||||
|
||||
/* Adjust angles differently if we have an asymmetric case */
|
||||
if (cp[k].xform[xfi].wind[col]>0 && cflag==0) {
|
||||
|
||||
/* Adjust the angles to make sure that it's within wind:wind+2pi */
|
||||
refang = cp[k].xform[xfi].wind[col] - 2*M_PI;
|
||||
|
||||
/* Make sure both angles are within [refang refang+2*pi] */
|
||||
while(cxang[k-1][col] < refang)
|
||||
cxang[k-1][col] += 2*M_PI;
|
||||
|
||||
while(cxang[k-1][col] > refang + 2*M_PI)
|
||||
cxang[k-1][col] -= 2*M_PI;
|
||||
|
||||
while(cxang[k][col] < refang)
|
||||
cxang[k][col] += 2*M_PI;
|
||||
|
||||
while(cxang[k][col] > refang + 2*M_PI)
|
||||
cxang[k][col] -= 2*M_PI;
|
||||
|
||||
} else {
|
||||
|
||||
/* Normal way of adjusting angles */
|
||||
d = cxang[k][col]-cxang[k-1][col];
|
||||
|
||||
/* Adjust to avoid the -pi/pi discontinuity */
|
||||
if (d > M_PI+EPS)
|
||||
cxang[k][col] -= 2*M_PI;
|
||||
else if (d < -(M_PI-EPS) ) /* Forces clockwise rotation at 180 */
|
||||
cxang[k][col] += 2*M_PI;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void interpolate_catmull_rom(flam3_genome cps[], double t, flam3_genome *result) {
|
||||
double t2 = t * t;
|
||||
double t3 = t2 * t;
|
||||
double cmc[4];
|
||||
|
||||
cmc[0] = (2*t2 - t - t3) / 2;
|
||||
cmc[1] = (3*t3 - 5*t2 + 2) / 2;
|
||||
cmc[2] = (4*t2 - 3*t3 + t) / 2;
|
||||
cmc[3] = (t3 - t2) / 2;
|
||||
|
||||
flam3_interpolate_n(result, 4, cps, cmc, 0);
|
||||
}
|
||||
|
||||
double smoother(double t) {
|
||||
return 3*t*t - 2*t*t*t;
|
||||
}
|
||||
|
||||
double get_stagger_coef(double t, double stagger_prc, int num_xforms, int this_xform) {
|
||||
|
||||
/* max_stag is the spacing between xform start times if stagger_prc = 1.0 */
|
||||
double max_stag = (double)(num_xforms-1)/num_xforms;
|
||||
|
||||
/* scale the spacing by stagger_prc */
|
||||
double stag_scaled = stagger_prc * max_stag;
|
||||
|
||||
/* t ranges from 1 to 0 (the contribution of cp[0] to the blend) */
|
||||
/* the first line below makes the first xform interpolate first */
|
||||
/* the second line makes the last xform interpolate first */
|
||||
double st = stag_scaled * (num_xforms - 1 - this_xform) / (num_xforms-1);
|
||||
// double st = stag_scaled * (this_xform) / (num_xforms-1);
|
||||
double et = st + (1-stag_scaled);
|
||||
|
||||
// printf("t=%f xf:%d st=%f et=%f : : %f\n",t,this_xform,st,et,smoother((t-st)/(1-stag_scaled)));
|
||||
|
||||
if (t <= st)
|
||||
return (0);
|
||||
else if (t >= et)
|
||||
return (1);
|
||||
else
|
||||
return ( smoother((t-st)/(1-stag_scaled)) );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* all cpi and result must be aligned (have the same number of xforms,
|
||||
and have final xform in the same slot) */
|
||||
void flam3_interpolate_n(flam3_genome *result, int ncp,
|
||||
flam3_genome *cpi, double *c, double stagger) {
|
||||
int i, j, k, numstd;
|
||||
|
||||
if (flam3_palette_interpolation_hsv == cpi[0].palette_interpolation) {
|
||||
|
||||
for (i = 0; i < 256; i++) {
|
||||
double t[3], s[4];
|
||||
s[0] = s[1] = s[2] = s[3] = s[4] = 0.0;
|
||||
|
||||
for (k = 0; k < ncp; k++) {
|
||||
rgb2hsv(cpi[k].palette[i].color, t);
|
||||
for (j = 0; j < 3; j++)
|
||||
s[j] += c[k] * t[j];
|
||||
|
||||
s[3] += c[k] * cpi[k].palette[i].color[3];
|
||||
s[4] += c[k] * cpi[k].palette[i].index;
|
||||
|
||||
}
|
||||
|
||||
hsv2rgb(s, result->palette[i].color);
|
||||
result->palette[i].color[3] = s[3];
|
||||
result->palette[i].index = s[4];
|
||||
|
||||
for (j = 0; j < 4; j++) {
|
||||
if (result->palette[i].color[j] < 0.0)
|
||||
result->palette[i].color[j] = 0.0;
|
||||
if (result->palette[i].color[j] > 1.0)
|
||||
result->palette[i].color[j] = 1.0;
|
||||
}
|
||||
|
||||
if (result->palette[i].index < 0.0)
|
||||
result->palette[i].index = 0.0;
|
||||
if (result->palette[i].index > 255.0)
|
||||
result->palette[i].index = 255.0;
|
||||
}
|
||||
} else {
|
||||
/* Sweep - not the best option for float indices */
|
||||
for (i = 0; i < 256; i++) {
|
||||
j = (i < (256 * c[0])) ? 0 : 1;
|
||||
result->palette[i] = cpi[j].palette[i];
|
||||
}
|
||||
}
|
||||
|
||||
result->palette_index = flam3_palette_random;
|
||||
result->symmetry = 0;
|
||||
result->spatial_filter_select = cpi[0].spatial_filter_select;
|
||||
result->temporal_filter_type = cpi[0].temporal_filter_type;
|
||||
result->palette_mode = cpi[0].palette_mode;
|
||||
|
||||
result->interpolation_type = cpi[0].interpolation_type;
|
||||
INTERP(brightness);
|
||||
INTERP(contrast);
|
||||
INTERP(highlight_power);
|
||||
INTERP(gamma);
|
||||
INTERP(vibrancy);
|
||||
INTERP(hue_rotation);
|
||||
INTERI(width);
|
||||
INTERI(height);
|
||||
INTERI(spatial_oversample);
|
||||
INTERP(center[0]);
|
||||
INTERP(center[1]);
|
||||
INTERP(rot_center[0]);
|
||||
INTERP(rot_center[1]);
|
||||
INTERP(background[0]);
|
||||
INTERP(background[1]);
|
||||
INTERP(background[2]);
|
||||
INTERP(pixels_per_unit);
|
||||
INTERP(spatial_filter_radius);
|
||||
INTERP(temporal_filter_exp);
|
||||
INTERP(temporal_filter_width);
|
||||
INTERP(sample_density);
|
||||
INTERP(zoom);
|
||||
INTERP(rotate);
|
||||
INTERI(nbatches);
|
||||
INTERI(ntemporal_samples);
|
||||
INTERP(estimator);
|
||||
INTERP(estimator_minimum);
|
||||
INTERP(estimator_curve);
|
||||
INTERP(gam_lin_thresh);
|
||||
|
||||
/* Interpolate the chaos array */
|
||||
numstd = cpi[0].num_xforms - (cpi[0].final_xform_index >= 0);
|
||||
for (i=0;i<numstd;i++) {
|
||||
for (j=0;j<numstd;j++) {
|
||||
INTERP(chaos[i][j]);
|
||||
if (result->chaos[i][j]<0) result->chaos[i][j]=0;
|
||||
//chaos can be > 1
|
||||
//if (result->chaos[i][j]>1) result->chaos[i][j]=1.0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Interpolate each xform */
|
||||
for (i = 0; i < cpi[0].num_xforms; i++) {
|
||||
|
||||
double csave[2];
|
||||
double td;
|
||||
int all_id;
|
||||
int nx = cpi[0].num_xforms-(cpi[0].final_xform_index>=0);
|
||||
|
||||
if (ncp==2 && stagger>0 && i!=cpi[0].final_xform_index) {
|
||||
csave[0] = c[0];
|
||||
csave[1] = c[1];
|
||||
c[0] = get_stagger_coef(csave[0],stagger,nx,i);
|
||||
c[1] = 1.0-c[0];
|
||||
}
|
||||
|
||||
|
||||
INTERP(xform[i].density);
|
||||
td = result->xform[i].density;
|
||||
result->xform[i].density = (td < 0.0) ? 0.0 : td;
|
||||
INTERP(xform[i].color);
|
||||
if (result->xform[i].color<0) result->xform[i].color=0;
|
||||
if (result->xform[i].color>1) result->xform[i].color=1;
|
||||
|
||||
INTERP(xform[i].color_speed);
|
||||
if (result->xform[i].color_speed<0) result->xform[i].color_speed=0;
|
||||
if (result->xform[i].color_speed>1) result->xform[i].color_speed=1;
|
||||
|
||||
INTERP(xform[i].opacity);
|
||||
INTERP(xform[i].animate);
|
||||
INTERP(xform[i].blob_low);
|
||||
INTERP(xform[i].blob_high);
|
||||
INTERP(xform[i].blob_waves);
|
||||
INTERP(xform[i].pdj_a);
|
||||
INTERP(xform[i].pdj_b);
|
||||
INTERP(xform[i].pdj_c);
|
||||
INTERP(xform[i].pdj_d);
|
||||
INTERP(xform[i].fan2_x);
|
||||
INTERP(xform[i].fan2_y);
|
||||
INTERP(xform[i].rings2_val);
|
||||
INTERP(xform[i].perspective_angle);
|
||||
INTERP(xform[i].perspective_dist);
|
||||
INTERP(xform[i].julian_power);
|
||||
INTERP(xform[i].julian_dist);
|
||||
INTERP(xform[i].juliascope_power);
|
||||
INTERP(xform[i].juliascope_dist);
|
||||
INTERP(xform[i].radial_blur_angle);
|
||||
INTERP(xform[i].pie_slices);
|
||||
INTERP(xform[i].pie_rotation);
|
||||
INTERP(xform[i].pie_thickness);
|
||||
INTERP(xform[i].ngon_sides);
|
||||
INTERP(xform[i].ngon_power);
|
||||
INTERP(xform[i].ngon_circle);
|
||||
INTERP(xform[i].ngon_corners);
|
||||
INTERP(xform[i].curl_c1);
|
||||
INTERP(xform[i].curl_c2);
|
||||
INTERP(xform[i].rectangles_x);
|
||||
INTERP(xform[i].rectangles_y);
|
||||
INTERP(xform[i].amw_amp);
|
||||
INTERP(xform[i].disc2_rot);
|
||||
INTERP(xform[i].disc2_twist);
|
||||
INTERP(xform[i].super_shape_rnd);
|
||||
INTERP(xform[i].super_shape_m);
|
||||
INTERP(xform[i].super_shape_n1);
|
||||
INTERP(xform[i].super_shape_n2);
|
||||
INTERP(xform[i].super_shape_n3);
|
||||
INTERP(xform[i].super_shape_holes);
|
||||
INTERP(xform[i].flower_petals);
|
||||
INTERP(xform[i].flower_holes);
|
||||
INTERP(xform[i].conic_eccentricity);
|
||||
INTERP(xform[i].conic_holes);
|
||||
INTERP(xform[i].parabola_height);
|
||||
INTERP(xform[i].parabola_width);
|
||||
INTERP(xform[i].bent2_x);
|
||||
INTERP(xform[i].bent2_y);
|
||||
INTERP(xform[i].bipolar_shift);
|
||||
INTERP(xform[i].cell_size);
|
||||
INTERP(xform[i].cpow_r);
|
||||
INTERP(xform[i].cpow_i);
|
||||
INTERP(xform[i].cpow_power);
|
||||
INTERP(xform[i].curve_xamp);
|
||||
INTERP(xform[i].curve_yamp);
|
||||
INTERP(xform[i].curve_xlength);
|
||||
INTERP(xform[i].curve_ylength);
|
||||
INTERP(xform[i].escher_beta);
|
||||
INTERP(xform[i].lazysusan_x);
|
||||
INTERP(xform[i].lazysusan_y);
|
||||
INTERP(xform[i].lazysusan_twist);
|
||||
INTERP(xform[i].lazysusan_space);
|
||||
INTERP(xform[i].lazysusan_spin);
|
||||
INTERP(xform[i].modulus_x);
|
||||
INTERP(xform[i].modulus_y);
|
||||
INTERP(xform[i].oscope_separation);
|
||||
INTERP(xform[i].oscope_frequency);
|
||||
INTERP(xform[i].oscope_amplitude);
|
||||
INTERP(xform[i].oscope_damping);
|
||||
INTERP(xform[i].popcorn2_x);
|
||||
INTERP(xform[i].popcorn2_y);
|
||||
INTERP(xform[i].popcorn2_c);
|
||||
INTERP(xform[i].separation_x);
|
||||
INTERP(xform[i].separation_xinside);
|
||||
INTERP(xform[i].separation_y);
|
||||
INTERP(xform[i].separation_yinside);
|
||||
INTERP(xform[i].split_xsize);
|
||||
INTERP(xform[i].split_ysize);
|
||||
INTERP(xform[i].splits_x);
|
||||
INTERP(xform[i].splits_y);
|
||||
INTERP(xform[i].stripes_space);
|
||||
INTERP(xform[i].stripes_warp);
|
||||
INTERP(xform[i].wedge_angle);
|
||||
INTERP(xform[i].wedge_hole);
|
||||
INTERP(xform[i].wedge_count);
|
||||
INTERP(xform[i].wedge_swirl);
|
||||
INTERP(xform[i].wedge_julia_angle);
|
||||
INTERP(xform[i].wedge_julia_count);
|
||||
INTERP(xform[i].wedge_julia_power);
|
||||
INTERP(xform[i].wedge_julia_dist);
|
||||
INTERP(xform[i].wedge_sph_angle);
|
||||
INTERP(xform[i].wedge_sph_hole);
|
||||
INTERP(xform[i].wedge_sph_count);
|
||||
INTERP(xform[i].wedge_sph_swirl);
|
||||
INTERP(xform[i].whorl_inside);
|
||||
INTERP(xform[i].whorl_outside);
|
||||
INTERP(xform[i].waves2_scalex);
|
||||
INTERP(xform[i].waves2_scaley);
|
||||
INTERP(xform[i].waves2_freqx);
|
||||
INTERP(xform[i].waves2_freqy);
|
||||
|
||||
for (j = 0; j < flam3_nvariations; j++)
|
||||
INTERP(xform[i].var[j]);
|
||||
|
||||
if (flam3_inttype_log == cpi[0].interpolation_type) {
|
||||
double cxmag[4][2]; // XXX why only 4? should be ncp
|
||||
double cxang[4][2];
|
||||
double cxtrn[4][2];
|
||||
|
||||
/* affine part */
|
||||
clear_matrix(result->xform[i].c);
|
||||
convert_linear_to_polar(cpi,ncp,i,0,cxang,cxmag,cxtrn);
|
||||
interp_and_convert_back(c, ncp, i, cxang, cxmag, cxtrn,result->xform[i].c);
|
||||
|
||||
/* post part */
|
||||
all_id = 1;
|
||||
for (k=0; k<ncp; k++)
|
||||
all_id &= id_matrix(cpi[k].xform[i].post);
|
||||
|
||||
clear_matrix(result->xform[i].post);
|
||||
if (all_id) {
|
||||
result->xform[i].post[0][0] = 1.0;
|
||||
result->xform[i].post[1][1] = 1.0;
|
||||
} else {
|
||||
convert_linear_to_polar(cpi,ncp,i,1,cxang,cxmag,cxtrn);
|
||||
interp_and_convert_back(c, ncp, i, cxang, cxmag, cxtrn,result->xform[i].post);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
/* Interpolate c matrix & post */
|
||||
clear_matrix(result->xform[i].c);
|
||||
clear_matrix(result->xform[i].post);
|
||||
all_id = 1;
|
||||
for (k = 0; k < ncp; k++) {
|
||||
sum_matrix(c[k], cpi[k].xform[i].c, result->xform[i].c);
|
||||
sum_matrix(c[k], cpi[k].xform[i].post, result->xform[i].post);
|
||||
|
||||
all_id &= id_matrix(cpi[k].xform[i].post);
|
||||
|
||||
}
|
||||
if (all_id) {
|
||||
clear_matrix(result->xform[i].post);
|
||||
result->xform[i].post[0][0] = 1.0;
|
||||
result->xform[i].post[1][1] = 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
if (ncp==2 && stagger>0 && i!=cpi[0].final_xform_index) {
|
||||
c[0] = csave[0];
|
||||
c[1] = csave[1];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void establish_asymmetric_refangles(flam3_genome *cp, int ncps) {
|
||||
|
||||
int k, xfi, col;
|
||||
|
||||
double cxang[4][2],d,c1[2];
|
||||
|
||||
for (xfi=0; xfi<cp[0].num_xforms; xfi++) {
|
||||
|
||||
/* Final xforms don't rotate regardless of their symmetry */
|
||||
if (cp[0].final_xform_enable==1 && xfi==cp[0].final_xform_index)
|
||||
continue;
|
||||
|
||||
for (k=0; k<ncps;k++) {
|
||||
|
||||
/* Establish the angle for each component */
|
||||
/* Should potentially functionalize */
|
||||
for (col=0;col<2;col++) {
|
||||
|
||||
c1[0] = cp[k].xform[xfi].c[col][0];
|
||||
c1[1] = cp[k].xform[xfi].c[col][1];
|
||||
|
||||
cxang[k][col] = atan2(c1[1],c1[0]);
|
||||
}
|
||||
}
|
||||
|
||||
for (k=1; k<ncps; k++) {
|
||||
|
||||
for (col=0;col<2;col++) {
|
||||
|
||||
int sym0,sym1;
|
||||
int padsymflag;
|
||||
|
||||
d = cxang[k][col]-cxang[k-1][col];
|
||||
|
||||
/* Adjust to avoid the -pi/pi discontinuity */
|
||||
if (d > M_PI+EPS)
|
||||
cxang[k][col] -= 2*M_PI;
|
||||
else if (d < -(M_PI-EPS) )
|
||||
cxang[k][col] += 2*M_PI;
|
||||
|
||||
/* If this is an asymmetric case, store the NON-symmetric angle */
|
||||
/* Check them pairwise and store the reference angle in the second */
|
||||
/* to avoid overwriting if asymmetric on both sides */
|
||||
padsymflag = 0;
|
||||
|
||||
sym0 = (cp[k-1].xform[xfi].animate==0 || (cp[k-1].xform[xfi].padding==1 && padsymflag));
|
||||
sym1 = (cp[k].xform[xfi].animate==0 || (cp[k].xform[xfi].padding==1 && padsymflag));
|
||||
|
||||
if ( sym1 && !sym0 )
|
||||
cp[k].xform[xfi].wind[col] = cxang[k-1][col] + 2*M_PI;
|
||||
else if ( sym0 && !sym1 )
|
||||
cp[k].xform[xfi].wind[col] = cxang[k][col] + 2*M_PI;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void flam3_align(flam3_genome *dst, flam3_genome *src, int nsrc) {
|
||||
int i, tfx, tnx, max_nx = 0, max_fx = 0;
|
||||
int already_aligned=1;
|
||||
int xf,j;
|
||||
int ii,fnd;
|
||||
double normed;
|
||||
int usethisone;
|
||||
|
||||
usethisone = (nsrc/2) - 1;
|
||||
|
||||
max_nx = src[0].num_xforms - (src[0].final_xform_index >= 0);
|
||||
max_fx = src[0].final_xform_enable;
|
||||
|
||||
for (i = 1; i < nsrc; i++) {
|
||||
tnx = src[i].num_xforms - (src[i].final_xform_index >= 0);
|
||||
if (max_nx != tnx) {
|
||||
already_aligned = 0;
|
||||
if (tnx > max_nx) max_nx = tnx;
|
||||
}
|
||||
|
||||
tfx = src[i].final_xform_enable;
|
||||
if (max_fx != tfx) {
|
||||
already_aligned = 0;
|
||||
max_fx |= tfx;
|
||||
}
|
||||
}
|
||||
|
||||
/* Pad the cps to equal xforms */
|
||||
for (i = 0; i < nsrc; i++) {
|
||||
flam3_copyx(&dst[i], &src[i], max_nx, max_fx);
|
||||
}
|
||||
|
||||
/* Skip if this genome is compatibility mode */
|
||||
if (dst[usethisone].interpolation_type == flam3_inttype_compat ||
|
||||
dst[usethisone].interpolation_type == flam3_inttype_older)
|
||||
return;
|
||||
|
||||
|
||||
/* Check to see if there's a parametric variation present in one xform */
|
||||
/* but not in an aligned xform. If this is the case, use the parameters */
|
||||
/* from the xform with the variation as the defaults for the blank one. */
|
||||
|
||||
/* All genomes will have the same number of xforms at this point */
|
||||
/* num = max_nx + max_fx */
|
||||
for (i = 0; i<nsrc; i++) {
|
||||
|
||||
|
||||
for (xf = 0; xf<max_nx+max_fx; xf++) {
|
||||
|
||||
/* Loop over the variations to see which of them are set to 0 */
|
||||
/* Note that there are no parametric variations < 23 */
|
||||
for (j = 23; j < flam3_nvariations; j++) {
|
||||
|
||||
if (dst[i].xform[xf].var[j]==0) {
|
||||
|
||||
if (i>0) {
|
||||
|
||||
/* Check to see if the prior genome's xform is populated */
|
||||
if (dst[i-1].xform[xf].var[j] != 0) {
|
||||
|
||||
/* Copy the prior genome's parameters and continue */
|
||||
flam3_copy_params(&(dst[i].xform[xf]), &(dst[i-1].xform[xf]), j);
|
||||
continue;
|
||||
}
|
||||
|
||||
} else if (i<nsrc-1) {
|
||||
|
||||
/* Check to see if the next genome's xform is populated */
|
||||
if (dst[i+1].xform[xf].var[j] != 0) {
|
||||
|
||||
/* Copy the next genome's parameters and continue */
|
||||
flam3_copy_params(&(dst[i].xform[xf]), &(dst[i+1].xform[xf]), j);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
} /* variations */
|
||||
|
||||
if (dst[i].xform[xf].padding == 1 && !already_aligned) {
|
||||
|
||||
/* This is a new xform. Let's see if we can choose a better 'identity' xform. */
|
||||
/* Check the neighbors to see if any of these variations are used: */
|
||||
/* rings2, fan2, blob, perspective, julian, juliascope, ngon, curl, super_shape, split */
|
||||
/* If so, we can use a better starting point for these */
|
||||
|
||||
/* Remove linear from the list */
|
||||
dst[i].xform[xf].var[0] = 0.0;
|
||||
|
||||
/* Look through all of the 'companion' xforms to see if we get a match on any of these */
|
||||
fnd=0;
|
||||
|
||||
/* Only do the next substitution for log interpolation */
|
||||
if ( (i==0 && dst[i].interpolation_type == flam3_inttype_log)
|
||||
|| (i>0 && dst[i-1].interpolation_type==flam3_inttype_log) ) {
|
||||
|
||||
for (ii=-1; ii<=1; ii+=2) {
|
||||
|
||||
/* Skip if out of bounds */
|
||||
if (i+ii<0 || i+ii>=nsrc)
|
||||
continue;
|
||||
|
||||
/* Skip if this is also padding */
|
||||
if (dst[i+ii].xform[xf].padding==1)
|
||||
continue;
|
||||
|
||||
/* Spherical / Ngon (trumps all others due to holes) */
|
||||
/* Interpolate these against a 180 degree rotated identity */
|
||||
/* with weight -1. */
|
||||
/* Added JULIAN/JULIASCOPE to get rid of black wedges */
|
||||
if (dst[i+ii].xform[xf].var[VAR_SPHERICAL]>0 ||
|
||||
dst[i+ii].xform[xf].var[VAR_NGON]>0 ||
|
||||
dst[i+ii].xform[xf].var[VAR_JULIAN]>0 ||
|
||||
dst[i+ii].xform[xf].var[VAR_JULIASCOPE]>0 ||
|
||||
dst[i+ii].xform[xf].var[VAR_POLAR]>0 ||
|
||||
dst[i+ii].xform[xf].var[VAR_WEDGE_SPH]>0 ||
|
||||
dst[i+ii].xform[xf].var[VAR_WEDGE_JULIA]>0) {
|
||||
|
||||
dst[i].xform[xf].var[VAR_LINEAR] = -1.0;
|
||||
/* Set the coefs appropriately */
|
||||
dst[i].xform[xf].c[0][0] = -1.0;
|
||||
dst[i].xform[xf].c[0][1] = 0.0;
|
||||
dst[i].xform[xf].c[1][0] = 0.0;
|
||||
dst[i].xform[xf].c[1][1] = -1.0;
|
||||
dst[i].xform[xf].c[2][0] = 0.0;
|
||||
dst[i].xform[xf].c[2][1] = 0.0;
|
||||
fnd=-1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (fnd==0) {
|
||||
|
||||
for (ii=-1; ii<=1; ii+=2) {
|
||||
|
||||
/* Skip if out of bounds */
|
||||
if (i+ii<0 || i+ii>=nsrc)
|
||||
continue;
|
||||
|
||||
/* Skip if also padding */
|
||||
if (dst[i+ii].xform[xf].padding==1)
|
||||
continue;
|
||||
|
||||
/* Rectangles */
|
||||
if (dst[i+ii].xform[xf].var[VAR_RECTANGLES]>0) {
|
||||
dst[i].xform[xf].var[VAR_RECTANGLES] = 1.0;
|
||||
dst[i].xform[xf].rectangles_x = 0.0;
|
||||
dst[i].xform[xf].rectangles_y = 0.0;
|
||||
fnd++;
|
||||
}
|
||||
|
||||
/* Rings 2 */
|
||||
if (dst[i+ii].xform[xf].var[VAR_RINGS2]>0) {
|
||||
dst[i].xform[xf].var[VAR_RINGS2] = 1.0;
|
||||
dst[i].xform[xf].rings2_val = 0.0;
|
||||
fnd++;
|
||||
}
|
||||
|
||||
/* Fan 2 */
|
||||
if (dst[i+ii].xform[xf].var[VAR_FAN2]>0) {
|
||||
dst[i].xform[xf].var[VAR_FAN2] = 1.0;
|
||||
dst[i].xform[xf].fan2_x = 0.0;
|
||||
dst[i].xform[xf].fan2_y = 0.0;
|
||||
fnd++;
|
||||
}
|
||||
|
||||
/* Blob */
|
||||
if (dst[i+ii].xform[xf].var[VAR_BLOB]>0) {
|
||||
dst[i].xform[xf].var[VAR_BLOB] = 1.0;
|
||||
dst[i].xform[xf].blob_low = 1.0;
|
||||
dst[i].xform[xf].blob_high = 1.0;
|
||||
dst[i].xform[xf].blob_waves = 1.0;
|
||||
fnd++;
|
||||
}
|
||||
|
||||
/* Perspective */
|
||||
if (dst[i+ii].xform[xf].var[VAR_PERSPECTIVE]>0) {
|
||||
dst[i].xform[xf].var[VAR_PERSPECTIVE] = 1.0;
|
||||
dst[i].xform[xf].perspective_angle = 0.0;
|
||||
/* Keep the perspective distance as-is */
|
||||
fnd++;
|
||||
}
|
||||
|
||||
/* Curl */
|
||||
if (dst[i+ii].xform[xf].var[VAR_CURL]>0) {
|
||||
dst[i].xform[xf].var[VAR_CURL] = 1.0;
|
||||
dst[i].xform[xf].curl_c1 = 0.0;
|
||||
dst[i].xform[xf].curl_c2 = 0.0;
|
||||
fnd++;
|
||||
}
|
||||
|
||||
/* Super-Shape */
|
||||
if (dst[i+ii].xform[xf].var[VAR_SUPER_SHAPE]>0) {
|
||||
dst[i].xform[xf].var[VAR_SUPER_SHAPE] = 1.0;
|
||||
/* Keep supershape_m the same */
|
||||
dst[i].xform[xf].super_shape_n1 = 2.0;
|
||||
dst[i].xform[xf].super_shape_n2 = 2.0;
|
||||
dst[i].xform[xf].super_shape_n3 = 2.0;
|
||||
dst[i].xform[xf].super_shape_rnd = 0.0;
|
||||
dst[i].xform[xf].super_shape_holes = 0.0;
|
||||
fnd++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* If we didn't have any matches with those, */
|
||||
/* try the affine ones, fan and rings */
|
||||
if (fnd==0) {
|
||||
|
||||
for (ii=-1; ii<=1; ii+=2) {
|
||||
|
||||
/* Skip if out of bounds */
|
||||
if (i+ii<0 || i+ii>=nsrc)
|
||||
continue;
|
||||
|
||||
/* Skip if also a padding xform */
|
||||
if (dst[i+ii].xform[xf].padding==1)
|
||||
continue;
|
||||
|
||||
/* Fan */
|
||||
if (dst[i+ii].xform[xf].var[VAR_FAN]>0) {
|
||||
dst[i].xform[xf].var[VAR_FAN] = 1.0;
|
||||
fnd++;
|
||||
}
|
||||
|
||||
/* Rings */
|
||||
if (dst[i+ii].xform[xf].var[VAR_RINGS]>0) {
|
||||
dst[i].xform[xf].var[VAR_RINGS] = 1.0;
|
||||
fnd++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (fnd>0) {
|
||||
/* Set the coefs appropriately */
|
||||
dst[i].xform[xf].c[0][0] = 0.0;
|
||||
dst[i].xform[xf].c[0][1] = 1.0;
|
||||
dst[i].xform[xf].c[1][0] = 1.0;
|
||||
dst[i].xform[xf].c[1][1] = 0.0;
|
||||
dst[i].xform[xf].c[2][0] = 0.0;
|
||||
dst[i].xform[xf].c[2][1] = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
/* If we still have no matches, switch back to linear */
|
||||
if (fnd==0)
|
||||
|
||||
dst[i].xform[xf].var[VAR_LINEAR] = 1.0;
|
||||
|
||||
else if (fnd>0) {
|
||||
|
||||
/* Otherwise, go through and normalize the weights. */
|
||||
normed = 0.0;
|
||||
for (j = 0; j < flam3_nvariations; j++)
|
||||
normed += dst[i].xform[xf].var[j];
|
||||
|
||||
for (j = 0; j < flam3_nvariations; j++)
|
||||
dst[i].xform[xf].var[j] /= normed;
|
||||
|
||||
}
|
||||
}
|
||||
} /* xforms */
|
||||
} /* genomes */
|
||||
|
||||
}
|
||||
|
58
src/interpolation.h
Normal file
58
src/interpolation.h
Normal file
@ -0,0 +1,58 @@
|
||||
/*
|
||||
FLAM3 - cosmic recursive fractal flames
|
||||
Copyright (C) 1992-2009 Spotworks LLC
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef interpolation_included
|
||||
#define interpolation_included
|
||||
|
||||
#include "private.h"
|
||||
|
||||
#define INTERP(x) do { result->x = 0.0; \
|
||||
for (k = 0; k < ncp; k++) result->x += c[k] * cpi[k].x; } while(0)
|
||||
|
||||
#define INTERI(x) do { double tt = 0.0; \
|
||||
for (k = 0; k < ncp; k++) tt += c[k] * cpi[k].x; \
|
||||
result->x = (int)rint(tt); } while(0)
|
||||
|
||||
double adjust_percentage(double in);
|
||||
double motion_funcs(int funcnum, double timeval);
|
||||
|
||||
double smoother(double t);
|
||||
double get_stagger_coef(double t, double stagger_prc, int num_xforms, int this_xform);
|
||||
|
||||
double det_matrix(double s[2][2]);
|
||||
int id_matrix(double s[3][2]);
|
||||
int zero_matrix(double s[3][2]);
|
||||
void copy_matrix(double to[3][2], double from[3][2]);
|
||||
void clear_matrix(double m[3][2]);
|
||||
void sum_matrix(double s, double m1[3][2], double m2[3][2]);
|
||||
void mult_matrix(double s1[2][2], double s2[2][2], double d[2][2]);
|
||||
|
||||
int compare_xforms(const void *av, const void *bv);
|
||||
|
||||
void interpolate_cmap(flam3_palette cmap, double blend,
|
||||
int index0, double hue0, int index1, double hue1);
|
||||
void interp_and_convert_back(double *c, int ncps, int xfi, double cxang[4][2],
|
||||
double cxmag[4][2], double cxtrn[4][2],double store_array[3][2]);
|
||||
void convert_linear_to_polar(flam3_genome *cp, int ncps, int xfi, int cflag,
|
||||
double cxang[4][2], double cxmag[4][2], double cxtrn[4][2]);
|
||||
|
||||
void interpolate_catmull_rom(flam3_genome cps[], double t, flam3_genome *result);
|
||||
void flam3_interpolate_n(flam3_genome *result, int ncp, flam3_genome *cpi, double *c, double stagger);
|
||||
void establish_asymmetric_refangles(flam3_genome *cp, int ncps);
|
||||
void flam3_align(flam3_genome *dst, flam3_genome *src, int nsrc);
|
||||
#endif
|
110
src/isaac.c
Normal file
110
src/isaac.c
Normal file
@ -0,0 +1,110 @@
|
||||
/*
|
||||
------------------------------------------------------------------------------
|
||||
isaac.c: By Bob Jenkins. My random number generator, ISAAC.
|
||||
MODIFIED:
|
||||
960327: Creation (addition of randinit, really)
|
||||
970719: use context, not global variables, for internal state
|
||||
980324: make a portable version
|
||||
991209: modified for inclusion with GNU Backgammon by Gary Wong
|
||||
070121: modified for inclusion with flam3 by Erik Reckase
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "isaacs.h"
|
||||
#include "isaac.h"
|
||||
|
||||
#define ind(mm,x) ((mm)[(x>>2)&(RANDSIZ-1)])
|
||||
#define rngstep(mix,a,b,mm,m,m2,r,x) \
|
||||
{ \
|
||||
x = *m; \
|
||||
a = ((a^(mix)) + *(m2++)) & 0xffffffff; \
|
||||
*(m++) = y = (ind(mm,x) + a + b) & 0xffffffff; \
|
||||
*(r++) = b = (ind(mm,y>>RANDSIZL) + x) & 0xffffffff; \
|
||||
}
|
||||
|
||||
void isaac(randctx *ctx)
|
||||
{
|
||||
register ub4 a,b,x,y,*m,*mm,*m2,*r,*mend;
|
||||
mm=ctx->randmem; r=ctx->randrsl;
|
||||
a = ctx->randa; b = (ctx->randb + (++ctx->randc)) & 0xffffffff;
|
||||
for (m = mm, mend = m2 = m+(RANDSIZ/2); m<mend; )
|
||||
{
|
||||
rngstep( a<<13, a, b, mm, m, m2, r, x);
|
||||
rngstep( a>>6 , a, b, mm, m, m2, r, x);
|
||||
rngstep( a<<2 , a, b, mm, m, m2, r, x);
|
||||
rngstep( a>>16, a, b, mm, m, m2, r, x);
|
||||
}
|
||||
for (m2 = mm; m2<mend; )
|
||||
{
|
||||
rngstep( a<<13, a, b, mm, m, m2, r, x);
|
||||
rngstep( a>>6 , a, b, mm, m, m2, r, x);
|
||||
rngstep( a<<2 , a, b, mm, m, m2, r, x);
|
||||
rngstep( a>>16, a, b, mm, m, m2, r, x);
|
||||
}
|
||||
ctx->randb = b; ctx->randa = a;
|
||||
}
|
||||
|
||||
|
||||
#define mix(a,b,c,d,e,f,g,h) \
|
||||
{ \
|
||||
a^=b<<11; d+=a; b+=c; \
|
||||
b^=c>>2; e+=b; c+=d; \
|
||||
c^=d<<8; f+=c; d+=e; \
|
||||
d^=e>>16; g+=d; e+=f; \
|
||||
e^=f<<10; h+=e; f+=g; \
|
||||
f^=g>>4; a+=f; g+=h; \
|
||||
g^=h<<8; b+=g; h+=a; \
|
||||
h^=a>>9; c+=h; a+=b; \
|
||||
}
|
||||
|
||||
/* if (flag==TRUE), then use the contents of randrsl[] to initialize mm[]. */
|
||||
void irandinit(randctx *ctx, word flag)
|
||||
{
|
||||
word i;
|
||||
ub4 a,b,c,d,e,f,g,h;
|
||||
ub4 *m,*r;
|
||||
ctx->randa = ctx->randb = ctx->randc = 0;
|
||||
m=ctx->randmem;
|
||||
r=ctx->randrsl;
|
||||
a=b=c=d=e=f=g=h=0x9e3779b9; /* the golden ratio */
|
||||
|
||||
for (i=0; i<4; ++i) /* scramble it */
|
||||
{
|
||||
mix(a,b,c,d,e,f,g,h);
|
||||
}
|
||||
|
||||
if (flag)
|
||||
{
|
||||
/* initialize using the contents of r[] as the seed */
|
||||
for (i=0; i<RANDSIZ; i+=8)
|
||||
{
|
||||
a+=r[i ]; b+=r[i+1]; c+=r[i+2]; d+=r[i+3];
|
||||
e+=r[i+4]; f+=r[i+5]; g+=r[i+6]; h+=r[i+7];
|
||||
mix(a,b,c,d,e,f,g,h);
|
||||
m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
|
||||
m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
|
||||
}
|
||||
/* do a second pass to make all of the seed affect all of m */
|
||||
for (i=0; i<RANDSIZ; i+=8)
|
||||
{
|
||||
a+=m[i ]; b+=m[i+1]; c+=m[i+2]; d+=m[i+3];
|
||||
e+=m[i+4]; f+=m[i+5]; g+=m[i+6]; h+=m[i+7];
|
||||
mix(a,b,c,d,e,f,g,h);
|
||||
m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
|
||||
m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i=0; i<RANDSIZ; i+=8)
|
||||
{
|
||||
/* fill in mm[] with messy stuff */
|
||||
mix(a,b,c,d,e,f,g,h);
|
||||
m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
|
||||
m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
|
||||
}
|
||||
}
|
||||
|
||||
isaac(ctx); /* fill in the first set of results */
|
||||
ctx->randcnt=RANDSIZ; /* prepare to use the first set of results */
|
||||
}
|
56
src/isaac.h
Normal file
56
src/isaac.h
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
------------------------------------------------------------------------------
|
||||
isaac.h: definitions for a random number generator
|
||||
MODIFIED:
|
||||
960327: Creation (addition of randinit, really)
|
||||
970719: use context, not global variables, for internal state
|
||||
980324: renamed seed to flag
|
||||
980605: recommend RANDSIZL=4 for noncryptography.
|
||||
991209: modified for inclusion with GNU Backgammon by Gary Wong
|
||||
070121: modified for inclusion with flam3 by Erik Reckase
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "isaacs.h"
|
||||
|
||||
#ifndef _ISAAC_H_
|
||||
#define _ISAAC_H_
|
||||
|
||||
#define RANDSIZL (4) /* I recommend 8 for crypto, 4 for simulations */
|
||||
#define RANDSIZ (1<<RANDSIZL)
|
||||
|
||||
/* context of random number generator */
|
||||
struct randctx
|
||||
{
|
||||
ub4 randcnt;
|
||||
ub4 randrsl[RANDSIZ];
|
||||
ub4 randmem[RANDSIZ];
|
||||
ub4 randa;
|
||||
ub4 randb;
|
||||
ub4 randc;
|
||||
};
|
||||
typedef struct randctx randctx;
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------
|
||||
If (flag==TRUE), then use the contents of randrsl[0..RANDSIZ-1] as the seed.
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
void irandinit( randctx *r, word flag );
|
||||
|
||||
void isaac( randctx *r );
|
||||
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------
|
||||
Call irand(/o_ randctx *r _o/) to retrieve a single 32-bit random value
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
#define irand(r) \
|
||||
(!(r)->randcnt-- ? \
|
||||
(isaac(r), (r)->randcnt=RANDSIZ-1, (r)->randrsl[(r)->randcnt]) : \
|
||||
(r)->randrsl[(r)->randcnt])
|
||||
|
||||
#endif
|
||||
|
||||
|
46
src/isaacs.h
Normal file
46
src/isaacs.h
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Standard definitions and types, Bob Jenkins
|
||||
|
||||
Modified for inclusion with flam3 by Erik Reckase
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _ISAACS_H_
|
||||
|
||||
#define _ISAACS_H_
|
||||
|
||||
typedef unsigned long int ub4; /* unsigned 4-byte quantities */
|
||||
|
||||
#define UB4MAXVAL 0xffffffff
|
||||
|
||||
typedef signed long int sb4;
|
||||
|
||||
#define SB4MAXVAL 0x7fffffff
|
||||
|
||||
typedef unsigned short int ub2;
|
||||
|
||||
#define UB2MAXVAL 0xffff
|
||||
|
||||
typedef signed short int sb2;
|
||||
|
||||
#define SB2MAXVAL 0x7fff
|
||||
|
||||
typedef unsigned char ub1;
|
||||
|
||||
#define UB1MAXVAL 0xff
|
||||
|
||||
typedef signed char sb1; /* signed 1-byte quantities */
|
||||
|
||||
#define SB1MAXVAL 0x7f
|
||||
|
||||
typedef int word; /* fastest type available */
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
145
src/jpeg.c
Normal file
145
src/jpeg.c
Normal file
@ -0,0 +1,145 @@
|
||||
/*
|
||||
FLAM3 - cosmic recursive fractal flames
|
||||
Copyright (C) 1992-2009 Spotworks LLC
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <jpeglib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "img.h"
|
||||
#include "flam3.h"
|
||||
#include "private.h"
|
||||
|
||||
void
|
||||
write_jpeg(FILE *file, unsigned char *image, int width, int height, flam3_img_comments *fpc) {
|
||||
struct jpeg_compress_struct info;
|
||||
struct jpeg_error_mgr jerr;
|
||||
size_t i;
|
||||
char *nick = getenv("nick");
|
||||
char *url = getenv("url");
|
||||
char *id = getenv("id");
|
||||
char *ai; /* For argi */
|
||||
int jpegcom_enable = argi("enable_jpeg_comments",1);
|
||||
|
||||
char nick_string[64], url_string[128], id_string[128];
|
||||
char bv_string[64],ni_string[64],rt_string[64];
|
||||
char genome_string[65536], ver_string[64];
|
||||
|
||||
/* Create the mandatory comment strings */
|
||||
snprintf(genome_string,65536,"flam3_genome: %s",fpc->genome);
|
||||
snprintf(bv_string,64,"flam3_error_rate: %s",fpc->badvals);
|
||||
snprintf(ni_string,64,"flam3_samples: %s",fpc->numiters);
|
||||
snprintf(rt_string,64,"flam3_time: %s",fpc->rtime);
|
||||
snprintf(ver_string,64,"flam3_version: %s",flam3_version());
|
||||
|
||||
info.err = jpeg_std_error(&jerr);
|
||||
jpeg_create_compress(&info);
|
||||
jpeg_stdio_dest(&info, file);
|
||||
info.in_color_space = JCS_RGB;
|
||||
info.input_components = 3;
|
||||
info.image_width = width;
|
||||
info.image_height = height;
|
||||
jpeg_set_defaults(&info);
|
||||
|
||||
if (getenv("jpeg")) {
|
||||
int quality = atoi(getenv("jpeg"));
|
||||
jpeg_set_quality(&info, quality, TRUE);
|
||||
}
|
||||
|
||||
jpeg_start_compress(&info, TRUE);
|
||||
|
||||
/* Write comments to jpeg */
|
||||
if (jpegcom_enable==1) {
|
||||
jpeg_write_marker(&info, JPEG_COM, (unsigned char *)ver_string, (int)strlen(ver_string));
|
||||
|
||||
if (0 != nick) {
|
||||
snprintf(nick_string,64,"flam3_nickname: %s",nick);
|
||||
jpeg_write_marker(&info, JPEG_COM, (unsigned char *)nick_string, (int)strlen(nick_string));
|
||||
}
|
||||
|
||||
if (0 != url) {
|
||||
snprintf(url_string,128,"flam3_url: %s",url);
|
||||
jpeg_write_marker(&info, JPEG_COM, (unsigned char *)url_string, (int)strlen(url_string));
|
||||
}
|
||||
|
||||
if (0 != id) {
|
||||
snprintf(id_string,128,"flam3_id: %s",id);
|
||||
jpeg_write_marker(&info, JPEG_COM, (unsigned char *)id_string, (int)strlen(id_string));
|
||||
}
|
||||
|
||||
jpeg_write_marker(&info, JPEG_COM, (unsigned char *)bv_string, (int)strlen(bv_string));
|
||||
jpeg_write_marker(&info, JPEG_COM, (unsigned char *)ni_string, (int)strlen(ni_string));
|
||||
jpeg_write_marker(&info, JPEG_COM, (unsigned char *)rt_string, (int)strlen(rt_string));
|
||||
jpeg_write_marker(&info, JPEG_COM, (unsigned char *)genome_string, (int)strlen(genome_string));
|
||||
}
|
||||
|
||||
for (i = 0; i < height; i++) {
|
||||
JSAMPROW row_pointer[1];
|
||||
row_pointer[0] = (unsigned char *) image + (3 * width * i);
|
||||
jpeg_write_scanlines(&info, row_pointer, 1);
|
||||
}
|
||||
jpeg_finish_compress(&info);
|
||||
jpeg_destroy_compress(&info);
|
||||
}
|
||||
|
||||
unsigned char *read_jpeg(FILE *ifp, int *width, int *height) {
|
||||
struct jpeg_decompress_struct cinfo;
|
||||
struct jpeg_error_mgr jerr;
|
||||
int num_scanlines;
|
||||
unsigned char *p, *q, *t;
|
||||
|
||||
cinfo.err = jpeg_std_error(&jerr);
|
||||
jpeg_create_decompress(&cinfo);
|
||||
jpeg_stdio_src(&cinfo, ifp);
|
||||
(void) jpeg_read_header(&cinfo, TRUE);
|
||||
(void) jpeg_start_decompress(&cinfo);
|
||||
|
||||
/* or image_width? */
|
||||
*width = cinfo.output_width;
|
||||
*height = cinfo.output_height;
|
||||
|
||||
if (3 != cinfo.output_components) {
|
||||
printf("can only read RGB JPEG files, not %d components.\n",
|
||||
cinfo.output_components);
|
||||
return 0;
|
||||
}
|
||||
p = q = malloc(4 * *width * *height);
|
||||
t = malloc(3 * *width);
|
||||
|
||||
while (cinfo.output_scanline < cinfo.output_height) {
|
||||
unsigned char *s = t;
|
||||
int i;
|
||||
num_scanlines = jpeg_read_scanlines(&cinfo, &t, 1);
|
||||
for (i = 0; i < *width; i++) {
|
||||
p[0] = s[0];
|
||||
p[1] = s[1];
|
||||
p[2] = s[2];
|
||||
p[3] = 255;
|
||||
s += 3;
|
||||
p += 4;
|
||||
}
|
||||
}
|
||||
|
||||
(void) jpeg_finish_decompress(&cinfo);
|
||||
jpeg_destroy_decompress(&cinfo);
|
||||
|
||||
free(t);
|
||||
return q;
|
||||
}
|
6964
src/ltmain.sh
Executable file
6964
src/ltmain.sh
Executable file
File diff suppressed because it is too large
Load Diff
353
src/missing
Executable file
353
src/missing
Executable file
@ -0,0 +1,353 @@
|
||||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
|
||||
scriptversion=2004-09-07.08
|
||||
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004
|
||||
# Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program 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 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program 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 this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
msg="missing on your system"
|
||||
|
||||
case "$1" in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
# Exit code 63 means version mismatch. This often happens
|
||||
# when the user try to use an ancient version of a tool on
|
||||
# a file that requires a minimum version. In this case we
|
||||
# we should proceed has if the program had been absent, or
|
||||
# if --run hadn't been passed.
|
||||
if test $? = 63; then
|
||||
run=:
|
||||
msg="probably too old"
|
||||
fi
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit 0
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit 0
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Now exit if we have it, but it failed. Also exit now if we
|
||||
# don't have it and --version was passed (most likely to detect
|
||||
# the program).
|
||||
case "$1" in
|
||||
lex|yacc)
|
||||
# Not GNU programs, they don't have --version.
|
||||
;;
|
||||
|
||||
tar)
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
# Could not run --version or --help. This is probably someone
|
||||
# running `$TOOL --version' or `$TOOL --help' to check whether
|
||||
# $TOOL exists and not knowing $TOOL uses missing.
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case "$1" in
|
||||
aclocal*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case "$f" in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, but is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
||||
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' $msg. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f y.tab.h ]; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if [ ! -f y.tab.c ]; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f lex.yy.c ]; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
||||
fi
|
||||
if [ -f "$file" ]; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
|
||||
fi
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case "$firstarg" in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case "$firstarg" in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
40
src/mkinstalldirs
Executable file
40
src/mkinstalldirs
Executable file
@ -0,0 +1,40 @@
|
||||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
|
||||
# $Id: mkinstalldirs,v 1.1.1.1 2004-10-26 19:54:13 spotspot Exp $
|
||||
|
||||
errstatus=0
|
||||
|
||||
for file
|
||||
do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
|
||||
pathcomp=
|
||||
for d
|
||||
do
|
||||
pathcomp="$pathcomp$d"
|
||||
case "$pathcomp" in
|
||||
-* ) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp" 1>&2
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# mkinstalldirs ends here
|
483
src/palettes.c
Normal file
483
src/palettes.c
Normal file
@ -0,0 +1,483 @@
|
||||
/*
|
||||
FLAM3 - cosmic recursive fractal flames
|
||||
Copyright (C) 1992-2009 Spotworks LLC
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
#include "palettes.h"
|
||||
|
||||
lib_palette *the_palettes = NULL;
|
||||
int npalettes;
|
||||
|
||||
static void parse_palettes(xmlNode *node) {
|
||||
xmlAttrPtr attr;
|
||||
char *val;
|
||||
lib_palette *pal;
|
||||
|
||||
while (node) {
|
||||
if (node->type == XML_ELEMENT_NODE && !xmlStrcmp(node->name, (const xmlChar *)"palette")) {
|
||||
attr = node->properties;
|
||||
pal = &the_palettes[npalettes];
|
||||
memset(pal, 0, sizeof(lib_palette));
|
||||
|
||||
while (attr) {
|
||||
val = (char *) xmlGetProp(node, attr->name);
|
||||
if (!xmlStrcmp(attr->name, (const xmlChar *)"data")) {
|
||||
int count = 256;
|
||||
int c_idx = 0;
|
||||
int r,g,b;
|
||||
int col_count = 0;
|
||||
int sscanf_ret;
|
||||
|
||||
c_idx=0;
|
||||
col_count = 0;
|
||||
|
||||
do {
|
||||
sscanf_ret = sscanf((char *)&(val[c_idx]),"00%2x%2x%2x",&r,&g,&b);
|
||||
if (sscanf_ret != 3) {
|
||||
printf("Error: Problem reading hexadecimal color data.\n");
|
||||
exit(1);
|
||||
}
|
||||
c_idx += 8;
|
||||
while (isspace( (int)val[c_idx]))
|
||||
c_idx++;
|
||||
|
||||
pal->colors[col_count][0] = r;
|
||||
pal->colors[col_count][1] = g;
|
||||
pal->colors[col_count][2] = b;
|
||||
|
||||
col_count++;
|
||||
} while (col_count<count);
|
||||
} else if (!xmlStrcmp(attr->name, (const xmlChar *)"number")) {
|
||||
pal->number = atoi(val);
|
||||
} else if (!xmlStrcmp(attr->name, (const xmlChar *)"name")) {
|
||||
strncpy(pal->name, val, flam3_name_len);
|
||||
pal->name[flam3_name_len-1] = 0;
|
||||
}
|
||||
|
||||
xmlFree(val);
|
||||
attr = attr->next;
|
||||
}
|
||||
|
||||
npalettes++;
|
||||
the_palettes = realloc(the_palettes, (1 + npalettes) * sizeof(lib_palette));
|
||||
} else
|
||||
parse_palettes(node->children);
|
||||
|
||||
node = node->next;
|
||||
}
|
||||
}
|
||||
|
||||
static int init_palettes(char *filename) {
|
||||
FILE *fp;
|
||||
xmlDocPtr doc;
|
||||
xmlNode *rootnode;
|
||||
int i, c, slen = 5000;
|
||||
char *s;
|
||||
|
||||
fp = fopen(filename, "rb");
|
||||
if (NULL == fp) {
|
||||
fprintf(stderr, "flam3: could not open palette file ");
|
||||
perror(filename);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Incrementally read XML file into a string */
|
||||
s = malloc(slen);
|
||||
i = 0;
|
||||
do {
|
||||
c = getc(fp);
|
||||
if (EOF == c) {
|
||||
if (ferror(fp)) {
|
||||
perror(filename);
|
||||
exit(1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
s[i++] = c;
|
||||
if (i == slen-1) {
|
||||
slen *= 2;
|
||||
s = realloc(s, slen);
|
||||
}
|
||||
} while (1);
|
||||
|
||||
fclose(fp);
|
||||
s[i] = 0;
|
||||
|
||||
doc = xmlReadMemory(s, (int)strlen(s), filename, NULL, XML_PARSE_NONET);
|
||||
if (NULL == doc) {
|
||||
fprintf(stderr, "error parsing %s (%s).\n", filename, s);
|
||||
exit(1);
|
||||
}
|
||||
rootnode = xmlDocGetRootElement(doc);
|
||||
the_palettes = malloc(sizeof(lib_palette));
|
||||
npalettes = 0;
|
||||
parse_palettes(rootnode);
|
||||
xmlFreeDoc(doc);
|
||||
|
||||
free(s);
|
||||
xmlCleanupParser();
|
||||
return(1);
|
||||
}
|
||||
|
||||
int flam3_get_palette(int n, flam3_palette c, double hue_rotation) {
|
||||
int cmap_len = 256;
|
||||
int idx, i, j;
|
||||
|
||||
if (NULL == the_palettes) {
|
||||
|
||||
char *d = getenv("flam3_palettes");
|
||||
init_palettes(d ? d : (PACKAGE_DATA_DIR "/flam3-palettes.xml"));
|
||||
}
|
||||
|
||||
if (flam3_palette_random == n)
|
||||
n = the_palettes[random()%npalettes].number;
|
||||
|
||||
for (idx = 0; idx < npalettes; idx++) {
|
||||
|
||||
if (n == the_palettes[idx].number) {
|
||||
/* Loop over elements of cmap */
|
||||
for (i = 0; i < cmap_len; i++) {
|
||||
int ii = (i * 256) / cmap_len;
|
||||
double rgb[3], hsv[3];
|
||||
|
||||
/* Colors are in 0-1 space */
|
||||
for (j = 0; j < 3; j++)
|
||||
rgb[j] = the_palettes[idx].colors[ii][j] / 255.0;
|
||||
|
||||
rgb2hsv(rgb, hsv);
|
||||
hsv[0] += hue_rotation * 6.0;
|
||||
hsv2rgb(hsv, rgb);
|
||||
|
||||
c[i].index = i;
|
||||
|
||||
for (j = 0; j < 3; j++)
|
||||
c[i].color[j] = rgb[j];
|
||||
|
||||
c[i].color[3] = 1.0;
|
||||
}
|
||||
|
||||
return n;
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(stderr, "warning: palette number %d not found, using white.\n", n);
|
||||
|
||||
for (i = 0; i < cmap_len; i++) {
|
||||
c[i].index = i;
|
||||
for (j = 0; j < 4; j++)
|
||||
c[i].color[j] = 1.0;
|
||||
}
|
||||
|
||||
return flam3_palette_random;
|
||||
}
|
||||
|
||||
/* rgb 0 - 1,
|
||||
h 0 - 6, s 0 - 1, v 0 - 1 */
|
||||
void rgb2hsv(rgb, hsv)
|
||||
double *rgb; double *hsv;
|
||||
{
|
||||
double rd, gd, bd, h, s, v, max, min, del, rc, gc, bc;
|
||||
|
||||
rd = rgb[0];
|
||||
gd = rgb[1];
|
||||
bd = rgb[2];
|
||||
|
||||
/* compute maximum of rd,gd,bd */
|
||||
if (rd>=gd) { if (rd>=bd) max = rd; else max = bd; }
|
||||
else { if (gd>=bd) max = gd; else max = bd; }
|
||||
|
||||
/* compute minimum of rd,gd,bd */
|
||||
if (rd<=gd) { if (rd<=bd) min = rd; else min = bd; }
|
||||
else { if (gd<=bd) min = gd; else min = bd; }
|
||||
|
||||
del = max - min;
|
||||
v = max;
|
||||
if (max != 0.0) s = (del) / max;
|
||||
else s = 0.0;
|
||||
|
||||
h = 0;
|
||||
if (s != 0.0) {
|
||||
rc = (max - rd) / del;
|
||||
gc = (max - gd) / del;
|
||||
bc = (max - bd) / del;
|
||||
|
||||
if (rd==max) h = bc - gc;
|
||||
else if (gd==max) h = 2 + rc - bc;
|
||||
else if (bd==max) h = 4 + gc - rc;
|
||||
|
||||
if (h<0) h += 6;
|
||||
}
|
||||
|
||||
hsv[0] = h;
|
||||
hsv[1] = s;
|
||||
hsv[2] = v;
|
||||
}
|
||||
|
||||
|
||||
/* h 0 - 6, s 0 - 1, v 0 - 1
|
||||
rgb 0 - 1 */
|
||||
void hsv2rgb(hsv, rgb)
|
||||
double *hsv;
|
||||
double *rgb;
|
||||
{
|
||||
double h = hsv[0], s = hsv[1], v = hsv[2];
|
||||
int j;
|
||||
double rd, gd, bd;
|
||||
double f, p, q, t;
|
||||
|
||||
while (h >= 6.0) h = h - 6.0;
|
||||
while (h < 0.0) h = h + 6.0;
|
||||
j = (int) floor(h);
|
||||
f = h - j;
|
||||
p = v * (1-s);
|
||||
q = v * (1 - (s*f));
|
||||
t = v * (1 - (s*(1 - f)));
|
||||
|
||||
switch (j) {
|
||||
case 0: rd = v; gd = t; bd = p; break;
|
||||
case 1: rd = q; gd = v; bd = p; break;
|
||||
case 2: rd = p; gd = v; bd = t; break;
|
||||
case 3: rd = p; gd = q; bd = v; break;
|
||||
case 4: rd = t; gd = p; bd = v; break;
|
||||
case 5: rd = v; gd = p; bd = q; break;
|
||||
default: rd = v; gd = t; bd = p; break;
|
||||
}
|
||||
|
||||
rgb[0] = rd;
|
||||
rgb[1] = gd;
|
||||
rgb[2] = bd;
|
||||
}
|
||||
|
||||
double flam3_calc_alpha(double density, double gamma, double linrange) {
|
||||
|
||||
double dnorm = density;
|
||||
double funcval = pow(linrange, gamma);
|
||||
double frac,alpha;
|
||||
|
||||
if (dnorm>0) {
|
||||
if (dnorm < linrange) {
|
||||
frac = dnorm/linrange;
|
||||
alpha = (1.0-frac) * dnorm * (funcval / linrange) + frac * pow(dnorm,gamma);
|
||||
} else
|
||||
alpha = pow(dnorm,gamma);
|
||||
} else
|
||||
alpha = 0;
|
||||
|
||||
return(alpha);
|
||||
}
|
||||
|
||||
void flam3_calc_newrgb(double *cbuf, double ls, double highpow, double *newrgb) {
|
||||
|
||||
int rgbi;
|
||||
double newls,lsratio;
|
||||
double newhsv[3];
|
||||
double a, maxa=-1.0, maxc=0;
|
||||
double adjhlp;
|
||||
|
||||
if (ls==0.0) {
|
||||
newrgb[0] = 0.0;
|
||||
newrgb[1] = 0.0;
|
||||
newrgb[2] = 0.0;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Identify the most saturated channel */
|
||||
for (rgbi=0;rgbi<3;rgbi++) {
|
||||
a = ls * (cbuf[rgbi]/PREFILTER_WHITE);
|
||||
if (a>maxa) {
|
||||
maxa = a;
|
||||
maxc = cbuf[rgbi]/PREFILTER_WHITE;
|
||||
}
|
||||
}
|
||||
|
||||
/* If a channel is saturated and we have a non-negative highlight power */
|
||||
/* modify the color to prevent hue shift */
|
||||
if (maxa>255 && highpow>=0.0) {
|
||||
newls = 255.0/maxc;
|
||||
lsratio = pow(newls/ls,highpow);
|
||||
|
||||
/* Calculate the max-value color (ranged 0 - 1) */
|
||||
for (rgbi=0;rgbi<3;rgbi++)
|
||||
newrgb[rgbi] = newls*(cbuf[rgbi]/PREFILTER_WHITE)/255.0;
|
||||
|
||||
/* Reduce saturation by the lsratio */
|
||||
rgb2hsv(newrgb,newhsv);
|
||||
newhsv[1] *= lsratio;
|
||||
hsv2rgb(newhsv,newrgb);
|
||||
|
||||
for (rgbi=0;rgbi<3;rgbi++)
|
||||
newrgb[rgbi] *= 255.0;
|
||||
|
||||
} else {
|
||||
newls = 255.0/maxc;
|
||||
adjhlp = -highpow;
|
||||
if (adjhlp>1)
|
||||
adjhlp=1;
|
||||
if (maxa<=255)
|
||||
adjhlp=1.0;
|
||||
|
||||
/* Calculate the max-value color (ranged 0 - 1) interpolated with the old behaviour */
|
||||
for (rgbi=0;rgbi<3;rgbi++)
|
||||
newrgb[rgbi] = ((1.0-adjhlp)*newls + adjhlp*ls)*(cbuf[rgbi]/PREFILTER_WHITE);
|
||||
|
||||
// for (rgbi=0;rgbi<3;rgbi++)
|
||||
// newrgb[rgbi] = ls*(cbuf[rgbi]/PREFILTER_WHITE);
|
||||
}
|
||||
}
|
||||
|
||||
static int random_xform(flam3_genome *g, int excluded) {
|
||||
int ntries = 0;
|
||||
while (ntries++ < 100) {
|
||||
int i = random() % g->num_xforms;
|
||||
if (g->xform[i].density > 0.0 && i != excluded)
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
static double try_colors(flam3_genome *g, int color_resolution) {
|
||||
int *hist;
|
||||
int i, hits, res = color_resolution;
|
||||
int res3 = res * res * res;
|
||||
flam3_frame f;
|
||||
unsigned char *image, *p;
|
||||
flam3_genome saved;
|
||||
double scalar;
|
||||
int pixtotal;
|
||||
stat_struct stats;
|
||||
|
||||
memset(&saved, 0, sizeof(flam3_genome));
|
||||
|
||||
flam3_copy(&saved, g);
|
||||
|
||||
g->sample_density = 1;
|
||||
g->spatial_oversample = 1;
|
||||
g->estimator = 0.0;
|
||||
|
||||
/* Scale the image so that the total number of pixels is ~10000 */
|
||||
pixtotal = g->width * g->height;
|
||||
scalar = sqrt( 10000.0 / (double)pixtotal);
|
||||
g->width *= scalar;
|
||||
g->height *= scalar;
|
||||
g->pixels_per_unit *= scalar;
|
||||
|
||||
// g->width = 100; // XXX keep aspect ratio
|
||||
// g->height = 100;
|
||||
// g->pixels_per_unit = 50;
|
||||
g->nbatches = 1;
|
||||
g->ntemporal_samples = 1;
|
||||
|
||||
// f.temporal_filter_radius = 0.0;
|
||||
flam3_init_frame(&f);
|
||||
f.bits = 33;
|
||||
f.bytes_per_channel=1;
|
||||
f.verbose = 0;
|
||||
f.genomes = g;
|
||||
f.ngenomes = 1;
|
||||
f.earlyclip = 1;
|
||||
f.pixel_aspect_ratio = 1.0;
|
||||
f.progress = 0;
|
||||
f.nthreads = 1;
|
||||
|
||||
image = (unsigned char *) calloc(g->width * g->height, 3);
|
||||
if (flam3_render(&f, image, flam3_field_both, 3, 0, &stats)) {
|
||||
fprintf(stderr,"Error rendering test image for trycolors. Aborting.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
hist = calloc(sizeof(int), res3);
|
||||
p = image;
|
||||
for (i = 0; i < g->height * g->width; i++) {
|
||||
hist[(p[0] * res / 256) +
|
||||
(p[1] * res / 256) * res +
|
||||
(p[2] * res / 256) * res * res]++;
|
||||
p += 3;
|
||||
}
|
||||
|
||||
if (0) {
|
||||
int j, k;
|
||||
for (i = 0; i < res; i++) {
|
||||
fprintf(stderr, "\ni=%d: \n", i);
|
||||
for (j = 0; j < res; j++) {
|
||||
for (k = 0; k < res; k++) {
|
||||
fprintf(stderr, " %5d", hist[i * res * res + j * res + k]);
|
||||
}
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
hits = 0;
|
||||
for (i = 0; i < res3; i++) {
|
||||
if (hist[i]) hits++;
|
||||
}
|
||||
|
||||
free(hist);
|
||||
free(image);
|
||||
|
||||
g->sample_density = saved.sample_density;
|
||||
g->width = saved.width;
|
||||
g->height = saved.height;
|
||||
g->spatial_oversample = saved.spatial_oversample;
|
||||
g->pixels_per_unit = saved.pixels_per_unit;
|
||||
g->nbatches = saved.nbatches;
|
||||
g->ntemporal_samples = saved.ntemporal_samples;
|
||||
g->estimator = saved.estimator;
|
||||
|
||||
/* Free xform storage */
|
||||
clear_cp(&saved,flam3_defaults_on);
|
||||
|
||||
return (double) hits / res3;
|
||||
}
|
||||
|
||||
static void change_colors(flam3_genome *g, int change_palette) {
|
||||
int i;
|
||||
int x0, x1;
|
||||
if (change_palette) {
|
||||
g->hue_rotation = 0.0;
|
||||
g->palette_index = flam3_get_palette(flam3_palette_random, g->palette, 0.0);
|
||||
}
|
||||
for (i = 0; i < g->num_xforms; i++) {
|
||||
g->xform[i].color = flam3_random01();
|
||||
}
|
||||
x0 = random_xform(g, -1);
|
||||
x1 = random_xform(g, x0);
|
||||
if (x0 >= 0 && (random()&1)) g->xform[x0].color = 0.0;
|
||||
if (x1 >= 0 && (random()&1)) g->xform[x1].color = 1.0;
|
||||
}
|
||||
|
||||
void flam3_improve_colors(flam3_genome *g, int ntries, int change_palette, int color_resolution) {
|
||||
int i;
|
||||
double best, b;
|
||||
flam3_genome best_genome;
|
||||
|
||||
memset(&best_genome, 0, sizeof(flam3_genome));
|
||||
best = try_colors(g, color_resolution);
|
||||
flam3_copy(&best_genome,g);
|
||||
for (i = 0; i < ntries; i++) {
|
||||
change_colors(g, change_palette);
|
||||
b = try_colors(g, color_resolution);
|
||||
if (b > best) {
|
||||
best = b;
|
||||
flam3_copy(&best_genome,g);
|
||||
}
|
||||
}
|
||||
flam3_copy(g,&best_genome);
|
||||
clear_cp(&best_genome,flam3_defaults_on);
|
||||
}
|
||||
|
37
src/palettes.h
Normal file
37
src/palettes.h
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
FLAM3 - cosmic recursive fractal flames
|
||||
Copyright (C) 1992-2009 Spotworks LLC
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef palettes_included
|
||||
#define palettes_included
|
||||
|
||||
|
||||
typedef struct {
|
||||
int number;
|
||||
char name[flam3_name_len];
|
||||
unsigned char colors[256][3];
|
||||
} lib_palette;
|
||||
|
||||
|
||||
void rgb2hsv(double *rgb, double *hsv);
|
||||
void hsv2rgb(double *hsv, double *rgb);
|
||||
|
||||
double flam3_calc_alpha(double density, double gamma, double linrange);
|
||||
void flam3_calc_newrgb(double *cbuf, double ls, double highpow, double *newrgb);
|
||||
|
||||
#endif
|
||||
|
1364
src/parser.c
Normal file
1364
src/parser.c
Normal file
File diff suppressed because it is too large
Load Diff
35
src/parser.h
Normal file
35
src/parser.h
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
FLAM3 - cosmic recursive fractal flames
|
||||
Copyright (C) 1992-2009 Spotworks LLC
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef parser_included
|
||||
#define parser_included
|
||||
|
||||
#include "private.h"
|
||||
|
||||
int flam3_atoi(char *nstr);
|
||||
double flam3_atof(char *nstr);
|
||||
int var2n(const char *s);
|
||||
int flam3_parse_hexformat_colors(char *colstr, flam3_genome *cp, int numcolors, int chan);
|
||||
|
||||
void scan_for_flame_nodes(xmlNode *cur_node, char *parent_file, int default_flag, flam3_genome **all_cp, int *all_ncps);
|
||||
int parse_flame_element(xmlNode *flame_node, flam3_genome *loc_current_cp);
|
||||
int parse_xform_xml(xmlNode *chld_node,flam3_xform *this_xform, int *num_xaos,
|
||||
flam3_chaos_entry **xaos, int numstd, int motionxf);
|
||||
void flam3_edit_print(FILE *f, xmlNodePtr editNode, int tabs, int formatting);
|
||||
int flam3_interp_missing_colors(flam3_genome *cp);
|
||||
#endif
|
229
src/png.c
Executable file
229
src/png.c
Executable file
@ -0,0 +1,229 @@
|
||||
/*
|
||||
FLAM3 - cosmic recursive fractal flames
|
||||
Copyright (C) 1992-2009 Spotworks LLC
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <png.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "img.h"
|
||||
#include "flam3.h"
|
||||
#include "private.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <winsock.h> /* for htons */
|
||||
#else
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
void write_png(FILE *file, void *image, int width, int height, flam3_img_comments *fpc, int bpc) {
|
||||
png_structp png_ptr;
|
||||
png_infop info_ptr;
|
||||
png_text text[FLAM3_PNG_COM];
|
||||
size_t i;
|
||||
unsigned short testbe = 1;
|
||||
void **rows = malloc(sizeof(void *) * height);
|
||||
char *nick = getenv("nick");
|
||||
char *url = getenv("url");
|
||||
char *id = getenv("id");
|
||||
char *ai; /* For argi */
|
||||
int pngcom_enable = argi("enable_png_comments", 1);
|
||||
|
||||
text[0].compression = PNG_TEXT_COMPRESSION_NONE;
|
||||
text[0].key = "flam3_version";
|
||||
text[0].text = flam3_version();
|
||||
|
||||
text[1].compression = PNG_TEXT_COMPRESSION_NONE;
|
||||
text[1].key = "flam3_nickname";
|
||||
text[1].text = nick;
|
||||
|
||||
text[2].compression = PNG_TEXT_COMPRESSION_NONE;
|
||||
text[2].key = "flam3_url";
|
||||
text[2].text = url;
|
||||
|
||||
text[3].compression = PNG_TEXT_COMPRESSION_NONE;
|
||||
text[3].key = "flam3_id";
|
||||
text[3].text = id;
|
||||
|
||||
text[4].compression = PNG_TEXT_COMPRESSION_NONE;
|
||||
text[4].key = "flam3_error_rate";
|
||||
text[4].text = fpc->badvals;
|
||||
|
||||
text[5].compression = PNG_TEXT_COMPRESSION_NONE;
|
||||
text[5].key = "flam3_samples";
|
||||
text[5].text = fpc->numiters;
|
||||
|
||||
text[6].compression = PNG_TEXT_COMPRESSION_NONE;
|
||||
text[6].key = "flam3_time";
|
||||
text[6].text = fpc->rtime;
|
||||
|
||||
text[7].compression = PNG_TEXT_COMPRESSION_zTXt;
|
||||
text[7].key = "flam3_genome";
|
||||
text[7].text = fpc->genome;
|
||||
|
||||
for (i = 0; i < height; i++)
|
||||
rows[i] = (unsigned char *)image + i * width * 4 * bpc;
|
||||
|
||||
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING,
|
||||
NULL, NULL, NULL);
|
||||
info_ptr = png_create_info_struct(png_ptr);
|
||||
|
||||
if (setjmp(png_jmpbuf(png_ptr))) {
|
||||
fclose(file);
|
||||
png_destroy_write_struct(&png_ptr, &info_ptr);
|
||||
perror("writing file");
|
||||
return;
|
||||
}
|
||||
png_init_io(png_ptr, file);
|
||||
|
||||
png_set_IHDR(png_ptr, info_ptr, width, height, 8*bpc,
|
||||
PNG_COLOR_TYPE_RGBA,
|
||||
PNG_INTERLACE_NONE,
|
||||
PNG_COMPRESSION_TYPE_BASE,
|
||||
PNG_FILTER_TYPE_BASE);
|
||||
|
||||
/* Swap the bytes if we're doing 16bpc and on little-endian platform */
|
||||
if (2==bpc && testbe != htons(testbe)) {
|
||||
unsigned short *im = (unsigned short *)image;
|
||||
for (i=0; i<height*width*4; i++) {
|
||||
im[i] = htons(im[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (pngcom_enable==1)
|
||||
png_set_text(png_ptr, info_ptr, text, FLAM3_PNG_COM);
|
||||
|
||||
png_write_info(png_ptr, info_ptr);
|
||||
png_write_image(png_ptr, (png_bytepp) rows);
|
||||
png_write_end(png_ptr, info_ptr);
|
||||
png_destroy_write_struct(&png_ptr, &info_ptr);
|
||||
free(rows);
|
||||
}
|
||||
|
||||
#define SIG_CHECK_SIZE 8
|
||||
|
||||
unsigned char *read_png(FILE *ifp, int *width, int *height) {
|
||||
unsigned char sig_buf [SIG_CHECK_SIZE];
|
||||
png_struct *png_ptr;
|
||||
png_info *info_ptr;
|
||||
png_byte **png_image = NULL;
|
||||
unsigned int linesize, x, y;
|
||||
unsigned char *p, *q;
|
||||
|
||||
if (fread (sig_buf, 1, SIG_CHECK_SIZE, ifp) != SIG_CHECK_SIZE) {
|
||||
fprintf (stderr, "input file empty or too short\n");
|
||||
return 0;
|
||||
}
|
||||
if (png_sig_cmp (sig_buf, (png_size_t) 0, (png_size_t) SIG_CHECK_SIZE) != 0) {
|
||||
fprintf (stderr, "input file not a PNG file\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
|
||||
if (png_ptr == NULL) {
|
||||
fprintf (stderr, "cannot allocate LIBPNG structure\n");
|
||||
return 0;
|
||||
}
|
||||
if (setjmp(png_jmpbuf(png_ptr))) {
|
||||
if (png_image) {
|
||||
for (y = 0 ; y < info_ptr->height ; y++)
|
||||
free (png_image[y]);
|
||||
free (png_image);
|
||||
}
|
||||
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
|
||||
perror("reading file");
|
||||
return 0;
|
||||
}
|
||||
info_ptr = png_create_info_struct (png_ptr);
|
||||
if (info_ptr == NULL) {
|
||||
png_destroy_read_struct (&png_ptr, (png_infopp)NULL, (png_infopp)NULL);
|
||||
fprintf (stderr, "cannot allocate LIBPNG structures\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
png_init_io (png_ptr, ifp);
|
||||
png_set_sig_bytes (png_ptr, SIG_CHECK_SIZE);
|
||||
png_read_info (png_ptr, info_ptr);
|
||||
|
||||
if (8 != info_ptr->bit_depth) {
|
||||
fprintf(stderr, "bit depth type must be 8, not %d.\n",
|
||||
info_ptr->bit_depth);
|
||||
return 0;
|
||||
}
|
||||
|
||||
*width = info_ptr->width;
|
||||
*height = info_ptr->height;
|
||||
p = q = malloc(4 * *width * *height);
|
||||
png_image = (png_byte **)malloc (info_ptr->height * sizeof (png_byte*));
|
||||
|
||||
linesize = info_ptr->width;
|
||||
switch (info_ptr->color_type) {
|
||||
case PNG_COLOR_TYPE_RGB:
|
||||
linesize *= 3;
|
||||
break;
|
||||
case PNG_COLOR_TYPE_RGBA:
|
||||
linesize *= 4;
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "color type must be RGB or RGBA not %d.\n",
|
||||
info_ptr->color_type);
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (y = 0 ; y < info_ptr->height ; y++) {
|
||||
png_image[y] = malloc (linesize);
|
||||
}
|
||||
png_read_image (png_ptr, png_image);
|
||||
png_read_end (png_ptr, info_ptr);
|
||||
|
||||
for (y = 0 ; y < info_ptr->height ; y++) {
|
||||
unsigned char *s = png_image[y];
|
||||
for (x = 0 ; x < info_ptr->width ; x++) {
|
||||
|
||||
switch (info_ptr->color_type) {
|
||||
case PNG_COLOR_TYPE_RGB:
|
||||
p[0] = s[0];
|
||||
p[1] = s[1];
|
||||
p[2] = s[2];
|
||||
p[3] = 255;
|
||||
s += 3;
|
||||
p += 4;
|
||||
break;
|
||||
case PNG_COLOR_TYPE_RGBA:
|
||||
p[0] = s[0];
|
||||
p[1] = s[1];
|
||||
p[2] = s[2];
|
||||
p[3] = s[3];
|
||||
s += 4;
|
||||
p += 4;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (y = 0 ; y < info_ptr->height ; y++)
|
||||
free (png_image[y]);
|
||||
free (png_image);
|
||||
png_destroy_read_struct (&png_ptr, &info_ptr, (png_infopp)NULL);
|
||||
|
||||
return q;
|
||||
}
|
154
src/private.h
Normal file
154
src/private.h
Normal file
@ -0,0 +1,154 @@
|
||||
/*
|
||||
FLAM3 - cosmic recursive fractal flames
|
||||
Copyright (C) 1992-2009 Spotworks LLC
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef private_included
|
||||
#define private_included
|
||||
|
||||
#include "flam3.h"
|
||||
#include "config.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
#include <libxml/parser.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#define basename(x) strdup(x)
|
||||
#define snprintf _snprintf
|
||||
#define _USE_MATH_DEFINES
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#include <libgen.h>
|
||||
#endif
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#ifdef HAVE_LIBPTHREAD
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
#define PREFILTER_WHITE 255
|
||||
#define EPS (1e-10)
|
||||
#define CMAP_SIZE 256
|
||||
#define CMAP_SIZE_M1 255
|
||||
#define rbit() (flam3_random_bit())
|
||||
#define flam3_variation_none (-1)
|
||||
#define max_specified_vars (100)
|
||||
#define vlen(x) (sizeof(x)/sizeof(*x))
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.1415926536
|
||||
#define M_1_PI 0.3183098862
|
||||
#define M_PI_4 0.7853981634
|
||||
#endif
|
||||
#define random() (rand() ^ (rand()<<15))
|
||||
#define srandom(x) (srand(x))
|
||||
extern int getpid();
|
||||
#define rint(A) floor((A)+(((A) < 0)? -0.5 : 0.5))
|
||||
#endif
|
||||
|
||||
#define argi(s,d) ((ai = getenv(s)) ? atoi(ai) : (d))
|
||||
#define argf(s,d) ((ai = getenv(s)) ? atof(ai) : (d))
|
||||
#define args(s,d) ((ai = getenv(s)) ? ai : (d))
|
||||
|
||||
void docstring();
|
||||
|
||||
/* Structures for passing parameters to iteration threads */
|
||||
typedef struct {
|
||||
unsigned short *xform_distrib; /* Distribution of xforms based on weights */
|
||||
flam3_frame *spec; /* Frame contains timing information */
|
||||
double bounds[4]; /* Corner coords of viewable area */
|
||||
double rot[2][2]; /* Rotation transformation */
|
||||
double size[2];
|
||||
int width, height; /* buffer width/height */
|
||||
double ws0, wb0s0, hs1, hb1s1; /* shortcuts for indexing */
|
||||
flam3_palette_entry *dmap; /* palette */
|
||||
double color_scalar; /* <1.0 if non-uniform motion blur is set */
|
||||
void *buckets; /* Points to the first accumulator */
|
||||
double badvals; /* accumulates all badvalue resets */
|
||||
double batch_size;
|
||||
int temporal_sample_num,ntemporal_samples;
|
||||
int batch_num, nbatches, aborted;
|
||||
time_t *progress_timer;
|
||||
time_t *progress_timer_history;
|
||||
double *progress_history;
|
||||
int *progress_history_mark;
|
||||
#ifdef HAVE_LIBPTHREAD
|
||||
/* mutex for bucket accumulator */
|
||||
pthread_mutex_t bucket_mutex;
|
||||
#endif
|
||||
|
||||
} flam3_iter_constants;
|
||||
|
||||
typedef struct {
|
||||
|
||||
double tx,ty; /* Starting coordinates */
|
||||
|
||||
double precalc_atan, precalc_sina; /* Precalculated, if needed */
|
||||
double precalc_cosa, precalc_sqrt;
|
||||
double precalc_sumsq,precalc_atanyx;
|
||||
|
||||
flam3_xform *xform; /* For the important values */
|
||||
|
||||
/* Output Coords */
|
||||
|
||||
double p0, p1;
|
||||
|
||||
/* Pointer to the isaac RNG state */
|
||||
randctx *rc;
|
||||
|
||||
} flam3_iter_helper;
|
||||
|
||||
typedef struct {
|
||||
double *iter_storage; /* Storage for iteration coordinates */
|
||||
randctx rc; /* Thread-unique ISAAC seed */
|
||||
flam3_genome cp; /* Full copy of genome for use by the thread */
|
||||
int first_thread;
|
||||
int timer_initialize;
|
||||
flam3_iter_constants *fic; /* Constants for render */
|
||||
} flam3_thread_helper;
|
||||
|
||||
double flam3_sinc(double x);
|
||||
|
||||
#define flam3_num_spatialfilters 14
|
||||
double flam3_gaussian_filter(double x);
|
||||
double flam3_hermite_filter(double t);
|
||||
double flam3_box_filter(double t);
|
||||
double flam3_triangle_filter(double t);
|
||||
double flam3_bell_filter(double t);
|
||||
double flam3_b_spline_filter(double t);
|
||||
double flam3_lanczos3_filter(double t);
|
||||
double flam3_lanczos2_filter(double t);
|
||||
double flam3_mitchell_filter(double t);
|
||||
double flam3_blackman_filter(double x);
|
||||
double flam3_catrom_filter(double x);
|
||||
double flam3_hamming_filter(double x);
|
||||
double flam3_hanning_filter(double x);
|
||||
double flam3_quadratic_filter(double x);
|
||||
|
||||
double flam3_spatial_filter(int knum, double x);
|
||||
|
||||
#define flam3_mitchell_b (1.0 / 3.0)
|
||||
#define flam3_mitchell_c (1.0 / 3.0)
|
||||
|
||||
|
||||
#endif
|
1268
src/rect.c
Normal file
1268
src/rect.c
Normal file
File diff suppressed because it is too large
Load Diff
143
src/render.dsp
Normal file
143
src/render.dsp
Normal file
@ -0,0 +1,143 @@
|
||||
# Microsoft Developer Studio Project File - Name="hqi" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=hqi - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "render.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "render.mak" CFG="hqi - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "hqi - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "hqi - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "hqi - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /I "c:\src\libpng" /I "c:\src\zlib" /I "c:\src\libxml2\include" /I "c:\src\jpeg" /I "c:\src\iconv\include" /I "c:\src\pthreads" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /Zm1000 /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib c:\src\jpeg\libjpeg.lib c:\src\libpng\libpng.lib c:\src\libxml2\lib\libxml2.lib c:\src\zlib\zlib.lib c:\src\pthreads\pthreadVC2.lib /nologo /subsystem:console /machine:I386 /out:"Release/flam3-render.exe"
|
||||
|
||||
!ELSEIF "$(CFG)" == "hqi - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "c:\src\jpeg" /I "c:\src\libpng" /I "c:\src\zlib" /I "c:\src\libxml2\include" /I "c:\src\iconv\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /Zm1000 /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib c:\src\jpeg\libjpeg.lib c:\src\libpng\libpng.lib c:\src\libxml2\lib\libxml2.lib c:\src\zlib\zlib.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "hqi - Win32 Release"
|
||||
# Name "hqi - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\docstring.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\flam3-palettes.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\flam3-render.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\flam3.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\isaac.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\jpeg.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\png.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=cmap.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\jpeg.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=libifs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=rect.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
14
src/test.flam3
Normal file
14
src/test.flam3
Normal file
@ -0,0 +1,14 @@
|
||||
<test>
|
||||
<flame time="0" palette="15" size="640 480" center="0 0" scale="240" zoom="0" oversample="1" filter="1" quality="10" background="0 0 0" brightness="4" gamma="4" vibrancy="1" hue="0.22851">
|
||||
<xform weight="0.25" color="1" spherical="1" coefs="-0.681206 -0.0779465 0.20769 0.755065 -0.0416126 -0.262334"/>
|
||||
<xform weight="0.25" color="0.66" spherical="1" coefs="0.953766 0.48396 0.43268 -0.0542476 0.642503 -0.995898"/>
|
||||
<xform weight="0.25" color="0.33" spherical="1" coefs="0.840613 -0.816191 0.318971 -0.430402 0.905589 0.909402"/>
|
||||
<xform weight="0.25" color="0" spherical="1" coefs="0.960492 -0.466555 0.215383 -0.727377 -0.126074 0.253509"/>
|
||||
</flame>
|
||||
<flame time="100" palette="29" size="640 480" center="0 0" scale="240" zoom="0" oversample="1" filter="1" quality="10" background="0 0 0" brightness="4" gamma="4" vibrancy="1" hue="0.147038">
|
||||
<xform weight="0.25" color="1" spherical="1" coefs="-0.357523 0.774667 0.397446 0.674359 -0.730708 0.812876"/>
|
||||
<xform weight="0.25" color="0.66" spherical="1" coefs="-0.69942 0.141688 -0.743472 0.475451 -0.336206 0.0958816"/>
|
||||
<xform weight="0.25" color="0.33" spherical="1" coefs="0.0738451 -0.349212 -0.635205 0.262572 -0.398985 -0.736904"/>
|
||||
<xform weight="0.25" color="0" spherical="1" coefs="0.992697 0.433488 -0.427202 -0.339112 -0.507145 0.120765"/>
|
||||
</flame>
|
||||
</test>
|
2521
src/variations.c
Normal file
2521
src/variations.c
Normal file
File diff suppressed because it is too large
Load Diff
140
src/variations.h
Normal file
140
src/variations.h
Normal file
@ -0,0 +1,140 @@
|
||||
/*
|
||||
FLAM3 - cosmic recursive fractal flames
|
||||
Copyright (C) 1992-2009 Spotworks LLC
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef variations_included
|
||||
#define variations_included
|
||||
|
||||
#include "private.h"
|
||||
|
||||
|
||||
|
||||
/* Variation functions */
|
||||
void var0_linear(flam3_iter_helper *, double);
|
||||
void var1_sinusoidal(flam3_iter_helper *, double);
|
||||
void var2_spherical(flam3_iter_helper *, double);
|
||||
void var3_swirl(flam3_iter_helper *, double);
|
||||
void var4_horseshoe(flam3_iter_helper *, double);
|
||||
void var5_polar(flam3_iter_helper *, double);
|
||||
void var6_handkerchief(flam3_iter_helper *, double);
|
||||
void var7_heart(flam3_iter_helper *, double);
|
||||
void var8_disc(flam3_iter_helper *, double);
|
||||
void var9_spiral(flam3_iter_helper *, double);
|
||||
void var10_hyperbolic(flam3_iter_helper *, double);
|
||||
void var11_diamond(flam3_iter_helper *, double);
|
||||
void var12_ex(flam3_iter_helper *, double);
|
||||
void var13_julia(flam3_iter_helper *, double);
|
||||
void var14_bent(flam3_iter_helper *, double);
|
||||
void var15_waves(flam3_iter_helper *, double);
|
||||
void var16_fisheye(flam3_iter_helper *, double);
|
||||
void var17_popcorn(flam3_iter_helper *, double);
|
||||
void var18_exponential(flam3_iter_helper *, double);
|
||||
void var19_power(flam3_iter_helper *, double);
|
||||
void var20_cosine(flam3_iter_helper *, double);
|
||||
void var21_rings(flam3_iter_helper *, double);
|
||||
void var22_fan(flam3_iter_helper *, double);
|
||||
void var23_blob(flam3_iter_helper *, double);
|
||||
void var24_pdj(flam3_iter_helper *, double);
|
||||
void var25_fan2(flam3_iter_helper *, double);
|
||||
void var26_rings2(flam3_iter_helper *, double);
|
||||
void var27_eyefish(flam3_iter_helper *, double);
|
||||
void var28_bubble(flam3_iter_helper *, double);
|
||||
void var29_cylinder(flam3_iter_helper *, double);
|
||||
void var30_perspective(flam3_iter_helper *, double);
|
||||
void var31_noise(flam3_iter_helper *, double);
|
||||
void var32_juliaN_generic(flam3_iter_helper *, double);
|
||||
void var33_juliaScope_generic(flam3_iter_helper *, double);
|
||||
void var34_blur(flam3_iter_helper *, double);
|
||||
void var35_gaussian(flam3_iter_helper *, double);
|
||||
void var36_radial_blur(flam3_iter_helper *, double);
|
||||
void var37_pie(flam3_iter_helper *, double);
|
||||
void var38_ngon(flam3_iter_helper *, double);
|
||||
void var39_curl(flam3_iter_helper *, double);
|
||||
void var40_rectangles(flam3_iter_helper *, double);
|
||||
void var41_arch(flam3_iter_helper *, double);
|
||||
void var42_tangent(flam3_iter_helper *, double);
|
||||
void var43_square(flam3_iter_helper *, double);
|
||||
void var44_rays(flam3_iter_helper *, double);
|
||||
void var45_blade(flam3_iter_helper *, double);
|
||||
void var46_secant2(flam3_iter_helper *, double);
|
||||
void var47_twintrian(flam3_iter_helper *, double);
|
||||
void var48_cross(flam3_iter_helper *, double);
|
||||
void var49_disc2(flam3_iter_helper *, double);
|
||||
void var50_supershape(flam3_iter_helper *, double);
|
||||
void var51_flower(flam3_iter_helper *, double);
|
||||
void var52_conic(flam3_iter_helper *, double);
|
||||
void var53_parabola(flam3_iter_helper *, double);
|
||||
void var54_bent2(flam3_iter_helper *, double);
|
||||
void var55_bipolar(flam3_iter_helper *, double);
|
||||
void var56_boarders(flam3_iter_helper *, double);
|
||||
void var57_butterfly(flam3_iter_helper *, double);
|
||||
void var58_cell(flam3_iter_helper *, double);
|
||||
void var59_cpow(flam3_iter_helper *, double);
|
||||
void var60_curve(flam3_iter_helper *, double);
|
||||
void var61_edisc(flam3_iter_helper *, double);
|
||||
void var62_elliptic(flam3_iter_helper *, double);
|
||||
void var63_escher(flam3_iter_helper *, double);
|
||||
void var64_foci(flam3_iter_helper *, double);
|
||||
void var65_lazysusan(flam3_iter_helper *, double);
|
||||
void var66_loonie(flam3_iter_helper *, double);
|
||||
void var67_pre_blur(flam3_iter_helper *, double);
|
||||
void var68_modulus(flam3_iter_helper *, double);
|
||||
void var69_oscope(flam3_iter_helper *, double);
|
||||
void var70_polar2(flam3_iter_helper *, double);
|
||||
void var71_popcorn2(flam3_iter_helper *, double);
|
||||
void var72_scry(flam3_iter_helper *, double);
|
||||
void var73_separation(flam3_iter_helper *, double);
|
||||
void var74_split(flam3_iter_helper *, double);
|
||||
void var75_splits(flam3_iter_helper *, double);
|
||||
void var76_stripes(flam3_iter_helper *, double);
|
||||
void var77_wedge(flam3_iter_helper *, double);
|
||||
void var78_wedge_julia(flam3_iter_helper *, double);
|
||||
void var79_wedge_sph(flam3_iter_helper *, double);
|
||||
void var80_whorl(flam3_iter_helper *, double);
|
||||
void var81_waves2(flam3_iter_helper *, double);
|
||||
void var82_exp (flam3_iter_helper *f, double weight);
|
||||
void var83_log (flam3_iter_helper *f, double weight);
|
||||
void var84_sin (flam3_iter_helper *f, double weight);
|
||||
void var85_cos (flam3_iter_helper *f, double weight);
|
||||
void var86_tan (flam3_iter_helper *f, double weight);
|
||||
void var87_sec (flam3_iter_helper *f, double weight);
|
||||
void var88_csc (flam3_iter_helper *f, double weight);
|
||||
void var89_cot (flam3_iter_helper *f, double weight);
|
||||
void var90_sinh (flam3_iter_helper *f, double weight);
|
||||
void var91_cosh (flam3_iter_helper *f, double weight);
|
||||
void var92_tanh (flam3_iter_helper *f, double weight);
|
||||
void var93_sech (flam3_iter_helper *f, double weight);
|
||||
void var94_csch (flam3_iter_helper *f, double weight);
|
||||
void var95_coth (flam3_iter_helper *f, double weight);
|
||||
void var96_auger (flam3_iter_helper *f, double weight);
|
||||
|
||||
/* Precalculation functions */
|
||||
void perspective_precalc(flam3_xform *xf);
|
||||
void juliaN_precalc(flam3_xform *xf);
|
||||
void juliaScope_precalc(flam3_xform *xf);
|
||||
void radial_blur_precalc(flam3_xform *xf);
|
||||
void waves_precalc(flam3_xform *xf);
|
||||
void disc2_precalc(flam3_xform *xf);
|
||||
void supershape_precalc(flam3_xform *xf);
|
||||
void wedgeJulia_precalc(flam3_xform *xf);
|
||||
|
||||
void xform_precalc(flam3_genome *cp, int xi);
|
||||
int prepare_xform_fn_ptrs(flam3_genome *, randctx *);
|
||||
|
||||
int apply_xform(flam3_genome *cp, int fn, double *p, double *q, randctx *rc);
|
||||
void initialize_xforms(flam3_genome *thiscp, int start_here);
|
||||
#endif
|
12
src/vidres.flam3
Executable file
12
src/vidres.flam3
Executable file
@ -0,0 +1,12 @@
|
||||
<flame size="640 480"
|
||||
center="0 0"
|
||||
scale="240"
|
||||
zoom="0"
|
||||
oversample="1"
|
||||
filter="1"
|
||||
quality="10"
|
||||
background="0 0 0"
|
||||
brightness="4"
|
||||
gamma="4"
|
||||
vibrancy="1"
|
||||
/>
|
Loading…
Reference in New Issue
Block a user