Code Monkey home page Code Monkey logo

spice's People

Contributors

janhett avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

fossabot

spice's Issues

Implement basic compositing utilities

spice needs a way to compose images together. An interface akin to this is to be implemented:

image<float> bg;
image<float> fg;

// ... load data into background and foreground images ...

// create transformation matrix using one of these methods:
// very explicit:
auto tx1 = transform_2d().translate(2, 5).rotate(42).scale(2, 1);
// more concise:
auto tx2 = translate(2, 5).rotate(42).scale(2, 1);
// or all in one:
transform_2d tx3(2, 5, 42, 2, 1);

// copy the foreground, transformed by `tx1` into the background
compose(bg, fg, tx1);

Blend modes and interpolation methods would also be useful parameters for this function. Those can be implemented at a later time, though.

add arithmetic operations between nd_vectors and their underlying primitives

nd_vectors should be able to be added/multiplied/subtracted/divided with their underlying primitive type.

E.g.
nd_vector (op) primitive: spice::nd_vector<T, dimensions> operator/(spice::nd_vector<T, dimensions>, T)
primitive (op) nd_vector: spice::nd_vector<T, dimensions> operator/(T, spice::nd_vector<T, dimensions>)

The first case is already implemented, the second is still to-do.

Fix the performance of spice

As it stands, spice is slowed down by inefficient and frequent allocations, occasionally inefficient algorithms and the lack of any kind of hardware optimisation.

This is starting to become untenable, so it's time to fix it.

Rename `nd_vector_impl` variants to `nd_vector` and `nd_span`

Currently nd_vector and nd_span are aliases for different instances of the same template (even worse, nd_vector extends nd_span by non-virtual inheritance, and derivatives of the two also implement this pattern). This saved implementation time but this approach is unintuitive and making maintenance difficult.

To solve this, the two are to be separated and common functionality is to be extracted into helper functions. A similar approach applies to their derivatives.

This requires #8.

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.