GithubHelp home page GithubHelp logo

godelbrot's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

technicalities

godelbrot's Issues

Use go 1.6 math.big.Float.Text method

I wrote my own big Float serialization method since math.big.Float.Text did not allow precision detection in go 1.5. This has been implemented in math.big.Float.Text in Go 1.6, so we can delete some source code.

Zoombrot

Command line zoom config tool.

Means, for a start, we can remove zoom arithmetic from webdelbrot's javascript.

Moving forward, clients won't have to do math.

RESTful webservice

The webservice described under johnny-morrice/webdelbrot#7 is to be moved to the godelbrot project.

This will enable other clients to have a ready made frontend service for rendering, zooming, controlling concurrency etc.

Portable restclient

Refactor clientbrot into a portable restclient library.

It must be portable in that it compiles to a reusable static archive and gopherjs library. The properties it must obey:

  • Delegates network call to clients (Hollywood principle)
  • Does not use OS-specific features

restclient lib should communicate its HTTP needs with loose coupling

The restclient lib should communicate its needs to GET and POST with loose coupling.

This is because certain types of clients may need to handle their requests in a manner that cannot be accomplished with a single method call. E.g. a javascript wrapper should use the standard ajax methods, which are async and have their own callbacks.

I feel like this should be done with channels, for input and output. These receive and send simple data-only structs. E.g.

Output:

{
"method": "POST",
"url": "blah",
"content-type": "application/json",
"data": "blahblahblah"
}

Input:

{
"output": as per above,
"error": null,
"http-response": {
"status": 200
}
}

CORS support in restfulbrot

As a middleware, restfulbrot is sometimes invoked on a different port than the port used by its frontend.

Therefore it should support CORS, with a basic command line flag to set permitted origins.

Use internal packages

Most of these packages are split up to enable ease of development. They aren't intended for end-users. As such, they should be in an "internal" folder.

Automovie

Command line app to automatically create zoom movies. References to Movie Maker are per #4

Automovie

Takes input:

  • Godelconfig

Sends output:
(none)

Side effects:

  • As per Movie Maker

Operation:

  • Loop Autozoom
  • Send Autozoom output to Movie Maker

Autozoom

Takes input:

  • Godelconfig
  • Fractal .PNG

Sends output:

  • Zoomed godelconfig

Side effects:
(none)

Operation:

  • Find interesting area in the Fractal
  • Update godelconfig with found area

Levelled logging

As work on the nascent middleware REST service (check the webservice branch) continues, it would be very handy to adopt levelled logging across the infrastructure.

Cobra frontend

While we are deliberately using a multi-process, multi-binary architecture as part of a study into UNIX-styling programming, there is no need to inconvenience our users by having them learn all these commands. So we should develop a simple wrapper using the Cobra that provides a familiar CLI usage.

Integer region subdivision to fix glitch

It occurs that subdividing the plane is fraught, and we should instead subdivide integers i.e. image region

Do this after plugins are implemented, for quicker turnaround.

Plugin - Downsample for higher precision

When running out of precision, it occurs that one could garner more precision by a render to a larger output image and then downsample to the correct size.

This is relatively easy e.g. compared to permutations.

Optimize arbitrary precision sequence render

Arbitrary precision render is so slow that it is unusable in anything but the smallest bit-precision.

Look into dividing the bit-precision by a constant "fudge" factor.

Profile the big sequence algorithm and find out why it is so slow.

If after eliminating garbage and other clumsiness, it is still too slow, we can look into doing the Mandelbrot Escape algorithm with bit-level composition of operations over an array.

Intermittent zoom defect

There is an intermittent zoom defect. The problem has been tracked down to a memory aliasing issue in our arbitrary precision plane projections.

Full library documentation

All public functions, methods, and types need documented.

Pre 0.0.1, a lot of things are changing internally but the main library should not expose too much.

User Palettes in backend

Easy feature and big boon.

All we need for this is to support a list of RGB values in the config file. Producing such a list is the hard part.

Note I am not planning GUI support for 0.0.1.

Nice field names in config

json config files currently use numeric identifiers when we are referring to const enums in libgodelbrot.

We should instead use strings that describe what we expect.

Since there is a new config packag, this can be done in an obvious place without any real changes to the backend proper.

User defined formulae

We should define or use an existing formula specification language in order to interpret and compile user formula for fractals.

Targets (not expecting to get all of these done in the first implementation):

  • Bytecode for interpreter
  • Native CPU via LLVM
  • GPU via CUDA or OpenCL

Must integrate with plugins and clustering.

Note that plugins allow users to write highly optimised algorithms, so it's not vital that formulae be optimised or transformed in any way. A straightforward pixel by pixel iteration would be easier for users to understand too.

Wurstbrot: desktop GUI

I am planning a graphical (desktop) client to enable movie generation for the next release. It will consist of several tiny apps that communicate through pipes. It will begin life in a new package, but I have to document this somewhere.

Viewer

Takes input:

  • Stream of Godelconfig
  • Stream of fractal .PNG (greyscale)

Sends output:

  • Stream of selection state (highlighted area for zoom)

Side effects:

  • GUI manipulation

Operation:

  • Colours greyscale fractal and puts it on screen.
  • Mouse is used to highlight new zoom regions.

Zoomer

Takes input:

  • Stream of selection state

Sends output:

  • Stream of Godelconfig
  • Stream of fractal .PNG (greyscale)

Side effects:
(None)

Operation:

  • Renders each frame.

Saver

Takes input:

  • Stream of Godelconfig
  • Stream of fractal .PNG (greyscale)

Sends output:

  • Stream of Godelconfig
  • Stream of fractal .PNG (greyscale)

Side effects:

  • GUI manipulation

Operation:

  • Allows user to save current frame into movie.

Movie Maker

Takes input:

  • Stream of Godelconfig
  • Stream of fractal .PNG (greyscale)

Sends output:
(None)

Side effects

  • Writes Godelconfig files
  • Writes fractal .PNG files (greyscale)

Operation

  • Interpolates between user selected frames
  • Saves interpolated frames to disk.

Cluster support

For really fast renders, we should run on a computer cluster.

This is pretty easy. Restfulbrot, when rendering a movie, could pass work onto other machines.

This does call for a new program clusterbrot, to instantiate machines on cloud architecture.

Plugins

While godelbrot is flexible in terms of its internal engineering, for true flexibility fractal render algorithms ought to be external code that implement a plugin interface.

A likely plugin provider is

https://github.com/hashicorp/go-plugin

We assume in any case where the user is getting bored, the complexity of rendering a fractal dwarfs the time to copy output over the loopback interface. :)

Autozoom

Automatic zooming into interesting areas. Backend already supports zoom movies (pre 0.0.1).

bigfloat region algorithm is broken

Getting visual defects with bigfloat+region. Looks like it takes place below the Y axis, but I haven't really investigated.

I tracked a similar problem with bigfloat+sequence down to unintended reuse of a math.big.Float object.

I can see a number of places where we don't explicitly Copy(). I didn't think it would be a problem, since they weren't used past that point (in terms of writing to the receiver). Perhaps it would be best to Copy() every time (premature optimization being the root of all evil and all).

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.