Browse Source

Patches to get it to work on OSX

master
Nick Overdijk 14 years ago
parent
commit
db9bba79ac
  1. 2
      AttractorKernel.cpp
  2. 16
      AttractorKernel.hpp
  3. 290
      AwesomeAttract0r.xcodeproj/project.pbxproj
  4. 324
      AwesomeAttractor.xcodeproj/project.pbxproj
  5. 2
      canvae/PNG.hpp
  6. 9
      main.cpp
  7. 61
      pngwriter/pngwriter.cc

2
AttractorKernel.cpp

@ -3,7 +3,7 @@
* AwesomeAttractor
*
* Created by Joshua Moerman on 07-08-10.
* Copyright 2010 Rodo. All rights reserved.
* Copyright 2010 Joshua Moerman. All rights reserved.
*
*/

16
AttractorKernel.hpp

@ -5,6 +5,7 @@
#include <string>
#include <algorithm>
#include <cstdlib>
#include <sstream>
#include "stfu/stf.hpp"
@ -59,12 +60,19 @@ public:
stfu::node stf_output() {
stfu::node output;
output.value("type") = type();
output.value("dimension") = std::to_string((long long unsigned)dimension);
stf_other(output);
{
std::stringstream dimStream;
dimStream << dimension;
output.value("dimension") = dimStream.str();
stf_other(output);
}
stfu::node parameters_node;
for(unsigned int i = 0; i < numberOfParameters; ++i)
parameters_node.value(i) = std::to_string((long double)parameters[i]);
for(unsigned int i = 0; i < numberOfParameters; ++i){
std::stringstream ss;
ss << parameters[i];
parameters_node.value(i) = ss.str();
}
output.addChild("parameters", parameters_node);
return output;

290
AwesomeAttract0r.xcodeproj/project.pbxproj

@ -0,0 +1,290 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 45;
objects = {
/* Begin PBXBuildFile section */
01C5701213B63AF0009D151B /* Projector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 01C5700713B63AF0009D151B /* Projector.cpp */; };
01C5701313B63AF0009D151B /* Canvas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 01C5700D13B63AF0009D151B /* Canvas.cpp */; };
01C5701413B63AF0009D151B /* AttractorKernel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 01C5700F13B63AF0009D151B /* AttractorKernel.cpp */; };
01C5701513B63AF0009D151B /* Attractor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 01C5701113B63AF0009D151B /* Attractor.cpp */; };
01C5702913B63B56009D151B /* Raw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 01C5702813B63B56009D151B /* Raw.cpp */; };
01C5703213B63B78009D151B /* stf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 01C5703113B63B78009D151B /* stf.cpp */; };
01C5703813B63B90009D151B /* pngwriter.cc in Sources */ = {isa = PBXBuildFile; fileRef = 01C5703713B63B90009D151B /* pngwriter.cc */; };
01C5704313B63BBE009D151B /* Projection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 01C5704013B63BBE009D151B /* Projection.cpp */; };
01C5704413B63BBE009D151B /* Normalizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 01C5704213B63BBE009D151B /* Normalizer.cpp */; };
01C5707E13B63CF9009D151B /* libpng.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 01C5707D13B63CF9009D151B /* libpng.a */; };
8DD76F650486A84900D96B5E /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* main.cpp */; settings = {ATTRIBUTES = (); }; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
8DD76F690486A84900D96B5E /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 8;
dstPath = /usr/share/man/man1/;
dstSubfolderSpec = 0;
files = (
);
runOnlyForDeploymentPostprocessing = 1;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
01C5700513B63AF0009D151B /* AttractorKernel.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = AttractorKernel.hpp; sourceTree = "<group>"; };
01C5700613B63AF0009D151B /* Projector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Projector.hpp; sourceTree = "<group>"; };
01C5700713B63AF0009D151B /* Projector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Projector.cpp; sourceTree = "<group>"; };
01C5700813B63AF0009D151B /* ostream_helpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ostream_helpers.h; sourceTree = "<group>"; };
01C5700913B63AF0009D151B /* myMath.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = myMath.hpp; sourceTree = "<group>"; };
01C5700A13B63AF0009D151B /* Logger.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Logger.hpp; sourceTree = "<group>"; };
01C5700B13B63AF0009D151B /* defines.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = defines.hpp; sourceTree = "<group>"; };
01C5700C13B63AF0009D151B /* Canvas.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Canvas.hpp; sourceTree = "<group>"; };
01C5700D13B63AF0009D151B /* Canvas.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Canvas.cpp; sourceTree = "<group>"; };
01C5700E13B63AF0009D151B /* AwesomeAttractorConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AwesomeAttractorConfig.h; sourceTree = "<group>"; };
01C5700F13B63AF0009D151B /* AttractorKernel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AttractorKernel.cpp; sourceTree = "<group>"; };
01C5701013B63AF0009D151B /* Attractor.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Attractor.hpp; sourceTree = "<group>"; };
01C5701113B63AF0009D151B /* Attractor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Attractor.cpp; sourceTree = "<group>"; };
01C5701613B63AF0009D151B /* AwesomeAttract0r */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = AwesomeAttract0r; sourceTree = BUILT_PRODUCTS_DIR; };
01C5702613B63B56009D151B /* PNG.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = PNG.hpp; path = canvae/PNG.hpp; sourceTree = "<group>"; };
01C5702713B63B56009D151B /* Raw.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Raw.hpp; path = canvae/Raw.hpp; sourceTree = "<group>"; };
01C5702813B63B56009D151B /* Raw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Raw.cpp; path = canvae/Raw.cpp; sourceTree = "<group>"; };
01C5703013B63B78009D151B /* stf.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = stf.hpp; path = stfu/stf.hpp; sourceTree = "<group>"; };
01C5703113B63B78009D151B /* stf.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = stf.cpp; path = stfu/stf.cpp; sourceTree = "<group>"; };
01C5703713B63B90009D151B /* pngwriter.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = pngwriter.cc; path = pngwriter/pngwriter.cc; sourceTree = "<group>"; };
01C5703913B63BA3009D151B /* Unravel3D.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Unravel3D.hpp; path = kernels/Unravel3D.hpp; sourceTree = "<group>"; };
01C5703A13B63BA3009D151B /* PolynomialA3D.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = PolynomialA3D.hpp; path = kernels/PolynomialA3D.hpp; sourceTree = "<group>"; };
01C5703B13B63BA3009D151B /* Polynomial.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Polynomial.hpp; path = kernels/Polynomial.hpp; sourceTree = "<group>"; };
01C5703C13B63BA3009D151B /* Lorenz3D.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Lorenz3D.hpp; path = kernels/Lorenz3D.hpp; sourceTree = "<group>"; };
01C5703D13B63BA3009D151B /* Logistic.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Logistic.hpp; path = kernels/Logistic.hpp; sourceTree = "<group>"; };
01C5703E13B63BA3009D151B /* Ikeda3D.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Ikeda3D.hpp; path = kernels/Ikeda3D.hpp; sourceTree = "<group>"; };
01C5703F13B63BBE009D151B /* Projection.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Projection.hpp; path = projectors/Projection.hpp; sourceTree = "<group>"; };
01C5704013B63BBE009D151B /* Projection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Projection.cpp; path = projectors/Projection.cpp; sourceTree = "<group>"; };
01C5704113B63BBE009D151B /* Normalizer.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Normalizer.hpp; path = projectors/Normalizer.hpp; sourceTree = "<group>"; };
01C5704213B63BBE009D151B /* Normalizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Normalizer.cpp; path = projectors/Normalizer.cpp; sourceTree = "<group>"; };
01C5707D13B63CF9009D151B /* libpng.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpng.a; path = /usr/local/lib/libpng.a; sourceTree = "<absolute>"; };
08FB7796FE84155DC02AAC07 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
8DD76F660486A84900D96B5E /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
01C5707E13B63CF9009D151B /* libpng.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
08FB7794FE84155DC02AAC07 /* AwesomeAttract0r */ = {
isa = PBXGroup;
children = (
01C5703F13B63BBE009D151B /* Projection.hpp */,
01C5704013B63BBE009D151B /* Projection.cpp */,
01C5704113B63BBE009D151B /* Normalizer.hpp */,
01C5704213B63BBE009D151B /* Normalizer.cpp */,
01C5703913B63BA3009D151B /* Unravel3D.hpp */,
01C5703A13B63BA3009D151B /* PolynomialA3D.hpp */,
01C5703B13B63BA3009D151B /* Polynomial.hpp */,
01C5703C13B63BA3009D151B /* Lorenz3D.hpp */,
01C5703D13B63BA3009D151B /* Logistic.hpp */,
01C5703E13B63BA3009D151B /* Ikeda3D.hpp */,
08FB7795FE84155DC02AAC07 /* Source */,
C6859E8C029090F304C91782 /* Documentation */,
1AB674ADFE9D54B511CA2CBB /* Products */,
01C5707D13B63CF9009D151B /* libpng.a */,
);
name = AwesomeAttract0r;
sourceTree = "<group>";
};
08FB7795FE84155DC02AAC07 /* Source */ = {
isa = PBXGroup;
children = (
01C5703013B63B78009D151B /* stf.hpp */,
01C5703113B63B78009D151B /* stf.cpp */,
01C5702613B63B56009D151B /* PNG.hpp */,
01C5702713B63B56009D151B /* Raw.hpp */,
01C5702813B63B56009D151B /* Raw.cpp */,
01C5700513B63AF0009D151B /* AttractorKernel.hpp */,
01C5700613B63AF0009D151B /* Projector.hpp */,
01C5700713B63AF0009D151B /* Projector.cpp */,
01C5700813B63AF0009D151B /* ostream_helpers.h */,
01C5700913B63AF0009D151B /* myMath.hpp */,
01C5700A13B63AF0009D151B /* Logger.hpp */,
01C5700B13B63AF0009D151B /* defines.hpp */,
01C5700C13B63AF0009D151B /* Canvas.hpp */,
01C5700D13B63AF0009D151B /* Canvas.cpp */,
01C5700E13B63AF0009D151B /* AwesomeAttractorConfig.h */,
01C5700F13B63AF0009D151B /* AttractorKernel.cpp */,
01C5701013B63AF0009D151B /* Attractor.hpp */,
01C5701113B63AF0009D151B /* Attractor.cpp */,
01C5703713B63B90009D151B /* pngwriter.cc */,
08FB7796FE84155DC02AAC07 /* main.cpp */,
);
name = Source;
sourceTree = "<group>";
};
1AB674ADFE9D54B511CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
01C5701613B63AF0009D151B /* AwesomeAttract0r */,
);
name = Products;
sourceTree = "<group>";
};
C6859E8C029090F304C91782 /* Documentation */ = {
isa = PBXGroup;
children = (
);
name = Documentation;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
8DD76F620486A84900D96B5E /* AwesomeAttract0r */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "AwesomeAttract0r" */;
buildPhases = (
8DD76F640486A84900D96B5E /* Sources */,
8DD76F660486A84900D96B5E /* Frameworks */,
8DD76F690486A84900D96B5E /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = AwesomeAttract0r;
productInstallPath = "$(HOME)/bin";
productName = AwesomeAttract0r;
productReference = 01C5701613B63AF0009D151B /* AwesomeAttract0r */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "AwesomeAttract0r" */;
compatibilityVersion = "Xcode 3.1";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
Japanese,
French,
German,
);
mainGroup = 08FB7794FE84155DC02AAC07 /* AwesomeAttract0r */;
projectDirPath = "";
projectRoot = "";
targets = (
8DD76F620486A84900D96B5E /* AwesomeAttract0r */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
8DD76F640486A84900D96B5E /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8DD76F650486A84900D96B5E /* main.cpp in Sources */,
01C5701213B63AF0009D151B /* Projector.cpp in Sources */,
01C5701313B63AF0009D151B /* Canvas.cpp in Sources */,
01C5701413B63AF0009D151B /* AttractorKernel.cpp in Sources */,
01C5701513B63AF0009D151B /* Attractor.cpp in Sources */,
01C5702913B63B56009D151B /* Raw.cpp in Sources */,
01C5703213B63B78009D151B /* stf.cpp in Sources */,
01C5703813B63B90009D151B /* pngwriter.cc in Sources */,
01C5704313B63BBE009D151B /* Projection.cpp in Sources */,
01C5704413B63BBE009D151B /* Normalizer.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
1DEB923208733DC60010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
INSTALL_PATH = /usr/local/bin;
PRODUCT_NAME = AwesomeAttract0r;
};
name = Debug;
};
1DEB923308733DC60010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_MODEL_TUNING = G5;
INSTALL_PATH = /usr/local/bin;
PRODUCT_NAME = AwesomeAttract0r;
};
name = Release;
};
1DEB923608733DC60010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = "/usr/local/include//**";
LIBRARY_SEARCH_PATHS = "/usr/local/lib//**";
ONLY_ACTIVE_ARCH = YES;
PREBINDING = NO;
SDKROOT = macosx10.6;
};
name = Debug;
};
1DEB923708733DC60010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = "/usr/local/include//**";
LIBRARY_SEARCH_PATHS = "/usr/local/lib//**";
PREBINDING = NO;
SDKROOT = macosx10.6;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "AwesomeAttract0r" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB923208733DC60010E9CD /* Debug */,
1DEB923308733DC60010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "AwesomeAttract0r" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB923608733DC60010E9CD /* Debug */,
1DEB923708733DC60010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
}

324
AwesomeAttractor.xcodeproj/project.pbxproj

@ -1,324 +0,0 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 45;
objects = {
/* Begin PBXBuildFile section */
4231201A11A4948B00C2F8D1 /* Attractor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4231200411A4948B00C2F8D1 /* Attractor.cpp */; };
4231201B11A4948B00C2F8D1 /* Canvas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4231200711A4948B00C2F8D1 /* Canvas.cpp */; };
4231202211A4948B00C2F8D1 /* Projector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4231201811A4948B00C2F8D1 /* Projector.cpp */; };
4271C3E8120D743D00D64B9A /* AttractorKernel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4271C3E7120D743D00D64B9A /* AttractorKernel.cpp */; };
429CA8FF11E75C70005E35C2 /* libpng.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 429CA8FE11E75C70005E35C2 /* libpng.dylib */; };
429CA96B11E75E89005E35C2 /* Logistic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 429CA94E11E75E89005E35C2 /* Logistic.cpp */; };
429CA97111E75E89005E35C2 /* pngwriter.cc in Sources */ = {isa = PBXBuildFile; fileRef = 429CA95A11E75E89005E35C2 /* pngwriter.cc */; };
429CA97311E75E89005E35C2 /* stf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 429CA96411E75E89005E35C2 /* stf.cpp */; };
42C3029B11F3AA6A00DCCC1D /* Lorenz3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 429CA95011E75E89005E35C2 /* Lorenz3D.cpp */; };
42C3029C11F3AA7100DCCC1D /* Polynomial.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 429CA95211E75E89005E35C2 /* Polynomial.cpp */; };
42C3029D11F3AA7100DCCC1D /* PolynomialA3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 429CA95411E75E89005E35C2 /* PolynomialA3D.cpp */; };
42C3029E11F3AA7100DCCC1D /* Unravel3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 429CA95611E75E89005E35C2 /* Unravel3D.cpp */; };
8DD76F650486A84900D96B5E /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* main.cpp */; settings = {ATTRIBUTES = (); }; };
8DD76F6A0486A84900D96B5E /* AwesomeAttractor.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = C6859E8B029090EE04C91782 /* AwesomeAttractor.1 */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
8DD76F690486A84900D96B5E /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 8;
dstPath = /usr/share/man/man1/;
dstSubfolderSpec = 0;
files = (
8DD76F6A0486A84900D96B5E /* AwesomeAttractor.1 in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 1;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
08FB7796FE84155DC02AAC07 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
4231200411A4948B00C2F8D1 /* Attractor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Attractor.cpp; sourceTree = "<group>"; };
4231200511A4948B00C2F8D1 /* Attractor.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Attractor.hpp; sourceTree = "<group>"; };
4231200611A4948B00C2F8D1 /* AttractorKernel.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = AttractorKernel.hpp; sourceTree = "<group>"; };
4231200711A4948B00C2F8D1 /* Canvas.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Canvas.cpp; sourceTree = "<group>"; };
4231200811A4948B00C2F8D1 /* Canvas.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Canvas.hpp; sourceTree = "<group>"; };
4231200911A4948B00C2F8D1 /* defines.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = defines.hpp; sourceTree = "<group>"; };
4231201711A4948B00C2F8D1 /* myMath.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = myMath.hpp; sourceTree = "<group>"; };
4231201811A4948B00C2F8D1 /* Projector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Projector.cpp; sourceTree = "<group>"; };
4231201911A4948B00C2F8D1 /* Projector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Projector.hpp; sourceTree = "<group>"; };
4271C3E7120D743D00D64B9A /* AttractorKernel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AttractorKernel.cpp; sourceTree = "<group>"; };
429CA8FE11E75C70005E35C2 /* libpng.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpng.dylib; path = /Developer/SDKs/MacOSX10.6.sdk/usr/X11/lib/libpng.dylib; sourceTree = "<absolute>"; };
429CA94E11E75E89005E35C2 /* Logistic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Logistic.cpp; sourceTree = "<group>"; };
429CA94F11E75E89005E35C2 /* Logistic.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Logistic.hpp; sourceTree = "<group>"; };
429CA95011E75E89005E35C2 /* Lorenz3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Lorenz3D.cpp; sourceTree = "<group>"; };
429CA95111E75E89005E35C2 /* Lorenz3D.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Lorenz3D.hpp; sourceTree = "<group>"; };
429CA95211E75E89005E35C2 /* Polynomial.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Polynomial.cpp; sourceTree = "<group>"; };
429CA95311E75E89005E35C2 /* Polynomial.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Polynomial.hpp; sourceTree = "<group>"; };
429CA95411E75E89005E35C2 /* PolynomialA3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolynomialA3D.cpp; sourceTree = "<group>"; };
429CA95511E75E89005E35C2 /* PolynomialA3D.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = PolynomialA3D.hpp; sourceTree = "<group>"; };
429CA95611E75E89005E35C2 /* Unravel3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Unravel3D.cpp; sourceTree = "<group>"; };
429CA95711E75E89005E35C2 /* Unravel3D.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Unravel3D.hpp; sourceTree = "<group>"; };
429CA95A11E75E89005E35C2 /* pngwriter.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = pngwriter.cc; sourceTree = "<group>"; };
429CA95B11E75E89005E35C2 /* pngwriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pngwriter.h; sourceTree = "<group>"; };
429CA96411E75E89005E35C2 /* stf.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = stf.cpp; sourceTree = "<group>"; };
429CA96511E75E89005E35C2 /* stf.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = stf.hpp; sourceTree = "<group>"; };
8DD76F6C0486A84900D96B5E /* AwesomeAttractor */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = AwesomeAttractor; sourceTree = BUILT_PRODUCTS_DIR; };
C6859E8B029090EE04C91782 /* AwesomeAttractor.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = AwesomeAttractor.1; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
8DD76F660486A84900D96B5E /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
429CA8FF11E75C70005E35C2 /* libpng.dylib in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
08FB7794FE84155DC02AAC07 /* AwesomeAttractor */ = {
isa = PBXGroup;
children = (
08FB7795FE84155DC02AAC07 /* Source */,
C6859E8C029090F304C91782 /* Documentation */,
1AB674ADFE9D54B511CA2CBB /* Products */,
429CA8FE11E75C70005E35C2 /* libpng.dylib */,
);
name = AwesomeAttractor;
sourceTree = "<group>";
};
08FB7795FE84155DC02AAC07 /* Source */ = {
isa = PBXGroup;
children = (
4271C3E7120D743D00D64B9A /* AttractorKernel.cpp */,
4231200611A4948B00C2F8D1 /* AttractorKernel.hpp */,
429CA94B11E75E89005E35C2 /* kernels */,
429CA95811E75E89005E35C2 /* pngwriter */,
429CA95C11E75E89005E35C2 /* stfu */,
4231200411A4948B00C2F8D1 /* Attractor.cpp */,
4231200511A4948B00C2F8D1 /* Attractor.hpp */,
4231200711A4948B00C2F8D1 /* Canvas.cpp */,
4231200811A4948B00C2F8D1 /* Canvas.hpp */,
4231200911A4948B00C2F8D1 /* defines.hpp */,
4231201711A4948B00C2F8D1 /* myMath.hpp */,
4231201811A4948B00C2F8D1 /* Projector.cpp */,
4231201911A4948B00C2F8D1 /* Projector.hpp */,
08FB7796FE84155DC02AAC07 /* main.cpp */,
);
name = Source;
sourceTree = "<group>";
};
1AB674ADFE9D54B511CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
8DD76F6C0486A84900D96B5E /* AwesomeAttractor */,
);
name = Products;
sourceTree = "<group>";
};
429CA94B11E75E89005E35C2 /* kernels */ = {
isa = PBXGroup;
children = (
429CA94E11E75E89005E35C2 /* Logistic.cpp */,
429CA94F11E75E89005E35C2 /* Logistic.hpp */,
429CA95011E75E89005E35C2 /* Lorenz3D.cpp */,
429CA95111E75E89005E35C2 /* Lorenz3D.hpp */,
429CA95211E75E89005E35C2 /* Polynomial.cpp */,
429CA95311E75E89005E35C2 /* Polynomial.hpp */,
429CA95411E75E89005E35C2 /* PolynomialA3D.cpp */,
429CA95511E75E89005E35C2 /* PolynomialA3D.hpp */,
429CA95611E75E89005E35C2 /* Unravel3D.cpp */,
429CA95711E75E89005E35C2 /* Unravel3D.hpp */,
);
path = kernels;
sourceTree = "<group>";
};
429CA95811E75E89005E35C2 /* pngwriter */ = {
isa = PBXGroup;
children = (
429CA95A11E75E89005E35C2 /* pngwriter.cc */,
429CA95B11E75E89005E35C2 /* pngwriter.h */,
);
path = pngwriter;
sourceTree = "<group>";
};
429CA95C11E75E89005E35C2 /* stfu */ = {
isa = PBXGroup;
children = (
429CA96411E75E89005E35C2 /* stf.cpp */,
429CA96511E75E89005E35C2 /* stf.hpp */,
);
path = stfu;
sourceTree = "<group>";
};
C6859E8C029090F304C91782 /* Documentation */ = {
isa = PBXGroup;
children = (
C6859E8B029090EE04C91782 /* AwesomeAttractor.1 */,
);
name = Documentation;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
8DD76F620486A84900D96B5E /* AwesomeAttractor */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "AwesomeAttractor" */;
buildPhases = (
8DD76F640486A84900D96B5E /* Sources */,
8DD76F660486A84900D96B5E /* Frameworks */,
8DD76F690486A84900D96B5E /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = AwesomeAttractor;
productInstallPath = "$(HOME)/bin";
productName = AwesomeAttractor;
productReference = 8DD76F6C0486A84900D96B5E /* AwesomeAttractor */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "AwesomeAttractor" */;
compatibilityVersion = "Xcode 3.1";
hasScannedForEncodings = 1;
mainGroup = 08FB7794FE84155DC02AAC07 /* AwesomeAttractor */;
projectDirPath = "";
projectRoot = "";
targets = (
8DD76F620486A84900D96B5E /* AwesomeAttractor */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
8DD76F640486A84900D96B5E /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8DD76F650486A84900D96B5E /* main.cpp in Sources */,
4231201A11A4948B00C2F8D1 /* Attractor.cpp in Sources */,
4231201B11A4948B00C2F8D1 /* Canvas.cpp in Sources */,
4231202211A4948B00C2F8D1 /* Projector.cpp in Sources */,
429CA96B11E75E89005E35C2 /* Logistic.cpp in Sources */,
429CA97111E75E89005E35C2 /* pngwriter.cc in Sources */,
429CA97311E75E89005E35C2 /* stf.cpp in Sources */,
42C3029B11F3AA6A00DCCC1D /* Lorenz3D.cpp in Sources */,
42C3029C11F3AA7100DCCC1D /* Polynomial.cpp in Sources */,
42C3029D11F3AA7100DCCC1D /* PolynomialA3D.cpp in Sources */,
42C3029E11F3AA7100DCCC1D /* Unravel3D.cpp in Sources */,
4271C3E8120D743D00D64B9A /* AttractorKernel.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
1DEB923208733DC60010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
HEADER_SEARCH_PATHS = "\"$(SDKROOT)/usr/X11/include\"";
INSTALL_PATH = /usr/local/bin;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SDKROOT)/usr/X11/lib\"",
);
PRODUCT_NAME = AwesomeAttractor;
};
name = Debug;
};
1DEB923308733DC60010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_FAST_MATH = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 2;
HEADER_SEARCH_PATHS = "\"$(SDKROOT)/usr/X11/include\"";
INSTALL_PATH = /usr/local/bin;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SDKROOT)/usr/X11/lib\"",
);
PRODUCT_NAME = AwesomeAttractor;
};
name = Release;
};
1DEB923608733DC60010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
PREBINDING = NO;
SDKROOT = macosx10.6;
};
name = Debug;
};
1DEB923708733DC60010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_AUTO_VECTORIZATION = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = YES;
GCC_ENABLE_SSE3_EXTENSIONS = YES;
GCC_ENABLE_SSE41_EXTENSIONS = YES;
GCC_ENABLE_SSE42_EXTENSIONS = YES;
GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = YES;
GCC_MODEL_TUNING = "";
GCC_OPTIMIZATION_LEVEL = 3;
GCC_UNROLL_LOOPS = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
PREBINDING = NO;
SDKROOT = macosx10.6;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "AwesomeAttractor" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB923208733DC60010E9CD /* Debug */,
1DEB923308733DC60010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "AwesomeAttractor" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB923608733DC60010E9CD /* Debug */,
1DEB923708733DC60010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
}

2
canvae/PNG.hpp

@ -27,7 +27,7 @@ public:
//int_array = std::make_shared<vstd::vector<unsigned int>>(width*height*num_colors);
int_array = new unsigned int[width*height*num_colors];
assert(int_array != nullptr);
assert(int_array != 0);
clear();

9
main.cpp

@ -128,8 +128,13 @@ int main(int argc, char* argv[]) {
LogInfo("Total clock time for writing png: %f\n", totalTime);
std::ofstream file(std::string(filename)+".stf");
file << myAttractor.stf_output() << std::endl;
{
std::string path(filename);
path += ".stf";
std::ofstream file(path.c_str());
file << myAttractor.stf_output() << std::endl;
}
delete my_attractor_ptr;

61
pngwriter/pngwriter.cc

@ -879,7 +879,7 @@ void pngwriter::close() {
text_ptr[2].text = textdescription_;
text_ptr[2].compression = PNG_TEXT_COMPRESSION_NONE;
text_ptr[3].key = "Creation Time";
text_ptr[3].text = png_convert_to_rfc1123(png_ptr, &mod_time);
text_ptr[3].text = const_cast<char*>(png_convert_to_rfc1123(png_ptr, &mod_time));
text_ptr[3].compression = PNG_TEXT_COMPRESSION_NONE;
text_ptr[4].key = "Software";
text_ptr[4].text = textsoftware_;
@ -1050,7 +1050,7 @@ void pngwriter::readfromfile(char* name) {
png_structp png_ptr;
png_infop info_ptr;
unsigned char** image;
unsigned long width, height;
png_uint_32 width, height;
int bit_depth, color_type, interlace_type;
// png_uint_32 i;
//
@ -1150,8 +1150,8 @@ void pngwriter::readfromfile(char* name) {
// Transforms grescale images of less than 8 bits to 8 bits.
if(color_type == PNG_COLOR_TYPE_GRAY && bit_depth<8) {
// png_set_expand(png_ptr);
png_set_gray_1_2_4_to_8(png_ptr); // Just an alias of the above.
png_set_expand(png_ptr);
//png_set_gray_1_2_4_to_8(png_ptr); // Just an alias of the above.
transformation_ = 1;
}
@ -1337,32 +1337,33 @@ int pngwriter::check_if_png(char* file_name, FILE** fp) {
///////////////////////////////////////////////////////
int pngwriter::read_png_info(FILE* fp, png_structp* png_ptr, png_infop* info_ptr) {
*png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
if(*png_ptr == NULL) {
std::cerr << " PNGwriter::read_png_info - ERROR **: Could not create read_struct." << std::endl;
fclose(fp);
return 0;
//exit(EXIT_FAILURE);
}
*info_ptr = png_create_info_struct(*png_ptr);
if(*info_ptr == NULL) {
png_destroy_read_struct(png_ptr, (png_infopp)NULL, (png_infopp)NULL);
std::cerr << " PNGwriter::read_png_info - ERROR **: Could not create info_struct." << std::endl;
//exit(EXIT_FAILURE);
fclose(fp);
return 0;
}
if(setjmp((*png_ptr)->jmpbuf)) /*(setjmp(png_jmpbuf(*png_ptr)) )*/ /////////////////////////////////////
{
png_destroy_read_struct(png_ptr, info_ptr, (png_infopp)NULL);
std::cerr << " PNGwriter::read_png_info - ERROR **: This file may be a corrupted PNG file. (setjmp(*png_ptr)->jmpbf) failed)." << std::endl;
fclose(fp);
return 0;
//exit(EXIT_FAILURE);
}
png_init_io(*png_ptr, fp);
png_set_sig_bytes(*png_ptr, PNG_BYTES_TO_CHECK);
png_read_info(*png_ptr, *info_ptr);
//NOTE: This wouldn't compile on my mac, so I took the liberty of disabling it. --Nick
// *png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
// if(*png_ptr == NULL) {
// std::cerr << " PNGwriter::read_png_info - ERROR **: Could not create read_struct." << std::endl;
// fclose(fp);
// return 0;
// //exit(EXIT_FAILURE);
// }
// *info_ptr = png_create_info_struct(*png_ptr);
// if(*info_ptr == NULL) {
// png_destroy_read_struct(png_ptr, (png_infopp)NULL, (png_infopp)NULL);
// std::cerr << " PNGwriter::read_png_info - ERROR **: Could not create info_struct." << std::endl;
// //exit(EXIT_FAILURE);
// fclose(fp);
// return 0;
// }
// if(setjmp((*png_ptr)->jmpbuf)) /*(setjmp(png_jmpbuf(*png_ptr)) )*/ /////////////////////////////////////
// {
// png_destroy_read_struct(png_ptr, info_ptr, (png_infopp)NULL);
// std::cerr << " PNGwriter::read_png_info - ERROR **: This file may be a corrupted PNG file. (setjmp(*png_ptr)->jmpbf) failed)." << std::endl;
// fclose(fp);
// return 0;
// //exit(EXIT_FAILURE);
// }
// png_init_io(*png_ptr, fp);
// png_set_sig_bytes(*png_ptr, PNG_BYTES_TO_CHECK);
// png_read_info(*png_ptr, *info_ptr);
return 1;
}