Giter Club home page Giter Club logo

ef-gy / topologic Goto Github PK

View Code? Open in Web Editor NEW
40.0 9.0 3.0 8.58 MB

Visualiser for basic geometric primitives and fractals in arbitrary-dimensional spaces

Home Page: http://ef.gy/documentation/topologic

License: MIT License

C++ 55.21% Objective-C 13.34% Objective-C++ 26.48% Makefile 0.43% Roff 4.54%
fractals cocoa-touch math webgl linear-algebra opengl opengl-es 4d 4d-hypercube hypercube hypersphere cocoa ifs fractal-images fractal-flame

topologic's Introduction

Topologic-11

Topologic is a programme that visualises basic primitives and fractals in arbitrary dimensional spaces. Primitives include simplices, cubes and spheres, and fractals include basic affine IFSs as well as fractal flames.

Supported output methods include simple SVGs and OpenGL 3.2 and up. The actual calculations as well as most of the render tasks are performed by libefgy, a header-only C++ template library for maths.

WEBGL CLIENT

Since compiling tends to be a pain in the neck, you might want to consider using the WebGL client instead. A ready-to-run version that'll run straight in your browser without any need to install anything whatsoever - that is, if you happen to have a WebGL-enabled browser - is available at:

https://dee.pe/r

Just type that in your browser's address bar and enjoy :3.

OBTAINING TOPOLOGIC

The Free/Open Source Software version of this programme is available free of charge via git at https://github.com/ef-gy/topologic.git - to check out a local copy of that repository, use the git command line tool like this:

$ git clone --recursive https://github.com/ef-gy/topologic.git

Additionally, there's a pre-compiled version available on the Mac App Store at https://itunes.apple.com/us/app/topologic/id558300160 - this version is functionally identical to the F/OSS version, except that you don't have to compile it yourself.

Oh, and if you're not on a Mac but you happen to have an iPod/iPhone/iPad, there's an app for those, too: https://itunes.apple.com/us/app/topologic/id737310913 - I've really tried to make good use of the touch controls on those devices, promise :).

Topologic is designed so that almost all of the code is template-y C++ in header files, much like libefgy. The API documentation for this is available at: https://ef.gy/documentation/topologic - the documentation may not always be quite up to date, so, if push comes to shove just read the sources.

INSTALLATION

You'll need to have libxml2 with development files and a recent version of clang++ available on your system.

Furthermore, you'll need a recent version of libefgy - a header-only C++ template library for maths. If you don't want to install the library system-wide, you could instead just create a symlink at include/ef.gy that would point to the directory of the same name in libefgy's sources.

To compile the binary, run:

$ make

To install the programme, run:

# make PREFIX=/usr install

Adjust PREFIX as appropriate.

THE WEBGL FRONTEND

If you'd like to compile the WebGL frontend yourself instead of using the publicly available one at https://dee.pe/r you'll need to install emscripten and run the following on a command line:

$ make topologic-web.html

The WebGL client is based on a simple SDL client. Once emscripten has finished compiling you can run the client by opening the file topologic-web.html in your favourite WebGL-enabled browser.

THE COCOA/OSX FRONTEND

Since version 9, Topologic's formerly closed-source Cocoa frontend is now included in the source bundle. I'm not entirely sure why I used to keep that closed-source, but now that it's open you can just open up the "Topologic.xcodeproj" project in Xcode on your Mac and compile the frontend like any other Xcode project.

THE COCOA TOUCH/iOS FRONTEND

The "Topologic.xcodeproj" also includes the Cocoa Touch client for iOS. To compile this, use the same procedure as for the Cocoa frontend, but choose an iOS target in Xcode.

On iOS, Topologic uses futuretap's InAppSettingsKit to provide a smooth interface to choose model and rendering options. You will need to clone the InAppSettingsKit repository at https://github.com/futuretap/InAppSettingsKit and then copy or link the "InAppSettingsKit" directory from that repository to Topologic's root directory. The process is analogous to setting up the libefgy header symlink described in the Cocoa section.

COMPILE-TIME OPTIONS

The rather unusual design of this programme allows you to set an arbitrary limit to the number of dimensions supported by the projection code. This is set at compile time with the MAXDEPTH constant. The default value of this constant - if not set otherwise - is 7, meaning that the default topologic binary will be able to generate, process and render primitives in up to 7 spatial dimensions.

This limit applies to both the model depth as well as the render depth. I.e. with MAXDEPTH set to 7, then the deepest cube you can render is a 7-cube, in 7-space. But at the same time you couldn't render a 7-sphere, because that would have to be rendered in 8-space - but a 6-sphere in 7-space will work.

To set a compile-time constant, use the -D flag in your CFLAGS, like so:

$ make "CFLAGS=-g -D MAXDEPTH=8"

To confirm the number of dimensions that a topologic binary supports, use the --version flag:

$ ./topologic --version
Topologic CLI; Version 5
Maximum render depth of this binary is 8 dimensions.

LICENCE

Topologic is distributed under an MIT/X style licence. For all practical intents and purposes that means that you can do pretty much whatever you want with the code, except claim that you wrote it yourself, as long as you point out somewhere in your documentation that you used Topologic.

See the file COPYING in the repository for the exact licence terms.

topologic's People

Contributors

effinmaggie avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

topologic's Issues

Animation support

Topologic cannot currently do automatic animations. This could be scripted for SVGs on the command line, but it would be good to have proper support for things like continuous rotations and the like in the frontends.

Question about source code

Sorry to disturb you, could you please tell me where can I found the source codes of dee.pe/r for reading and learning? Thank you so much.

Step-by-step exports

The apps cannot currently export things like one image per iteration of IFSs. Or animations for that matter.

Like #1 this is a pure frontend change, and could be scripted with the CLI application, but the frontends really should have support for this.

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.