Giter Club home page Giter Club logo

bezier's People

Contributors

atsju avatar oysteinmyrmo 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  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  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

bezier's Issues

compile error

bezier/include/bezier/bezier.h:62:9: error: array must be initialized with a brace-enclosed initializer

readme slip of the pen

p = cubicBezier.valueAt(0); // (120, 60)
should be
p = cubicBezier.valueAt(0); // (120, 160)

Tests won't compile.

Tests won't compile!
(I am new to C++. Am I doing something wrong?)

nacl@laptop:~/thinz/bezier-master$ cmake .
-- The C compiler identification is GNU 10.1.0
-- The CXX compiler identification is GNU 10.1.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/nacl/thinz/bezier-master
nacl@laptop:~/thinz/bezier-master$ make
Scanning dependencies of target derivative-tests
[ 25%] Building CXX object tests/CMakeFiles/derivative-tests.dir/derivative-tests.cpp.o
In file included from /home/nacl/thinz/bezier-master/tests/derivative-tests.cpp:22:
/home/nacl/thinz/bezier-master/include/bezier.h: In member function ‘float Bezier::Vec2::operator[](size_t) const’:
/home/nacl/thinz/bezier-master/include/bezier.h:255:29: error: ‘stderr’ was not declared in this scope
  255 |                     fprintf(stderr, "Erroneous axis: " BEZIER_SIZE_T_FORMAT ". Returning 0.\n", axis);
      |                             ^~~~~~
/home/nacl/thinz/bezier-master/include/bezier.h:28:1: note: ‘stderr’ is defined in header ‘<cstdio>’; did you forget to ‘#include <cstdio>’?
   27 | #include <array>
  +++ |+#include <cstdio>
   28 | 
/home/nacl/thinz/bezier-master/include/bezier.h:255:21: error: ‘fprintf’ was not declared in this scope; did you mean ‘rintf’?
  255 |                     fprintf(stderr, "Erroneous axis: " BEZIER_SIZE_T_FORMAT ". Returning 0.\n", axis);
      |                     ^~~~~~~
      |                     rintf
/home/nacl/thinz/bezier-master/include/bezier.h: In member function ‘float& Bezier::Vec2::operator[](size_t)’:
/home/nacl/thinz/bezier-master/include/bezier.h:270:29: error: ‘stderr’ was not declared in this scope
  270 |                     fprintf(stderr, "Erroneous axis: " BEZIER_SIZE_T_FORMAT ". Returning x.\n", axis);
      |                             ^~~~~~
/home/nacl/thinz/bezier-master/include/bezier.h:270:29: note: ‘stderr’ is defined in header ‘<cstdio>’; did you forget to ‘#include <cstdio>’?
/home/nacl/thinz/bezier-master/include/bezier.h:270:21: error: ‘fprintf’ was not declared in this scope; did you mean ‘rintf’?
  270 |                     fprintf(stderr, "Erroneous axis: " BEZIER_SIZE_T_FORMAT ". Returning x.\n", axis);
      |                     ^~~~~~~
      |                     rintf
/home/nacl/thinz/bezier-master/include/bezier.h: At global scope:
/home/nacl/thinz/bezier-master/include/bezier.h:632:19: error: declaration of template parameter ‘N’ shadows template parameter
  632 |         template <size_t N>
      |                   ^~~~~~
/home/nacl/thinz/bezier-master/include/bezier.h:628:15: note: template parameter ‘N’ declared here
  628 |     template <size_t N>
      |               ^~~~~~
tests/CMakeFiles/derivative-tests.dir/build.make:62: recipe for target 'tests/CMakeFiles/derivative-tests.dir/derivative-tests.cpp.o' failed
make[2]: *** [tests/CMakeFiles/derivative-tests.dir/derivative-tests.cpp.o] Error 1
CMakeFiles/Makefile2:87: recipe for target 'tests/CMakeFiles/derivative-tests.dir/all' failed
make[1]: *** [tests/CMakeFiles/derivative-tests.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2

When adding #include <cstdio> to bezier.h :

nacl@laptop:~/thinz/bezier-master$ make
Scanning dependencies of target derivative-tests
[ 25%] Building CXX object tests/CMakeFiles/derivative-tests.dir/derivative-tests.cpp.o
In file included from /home/nacl/thinz/bezier-master/tests/derivative-tests.cpp:22:
/home/nacl/thinz/bezier-master/include/bezier.h:633:19: error: declaration of template parameter ‘N’ shadows template parameter
  633 |         template <size_t N>
      |                   ^~~~~~
/home/nacl/thinz/bezier-master/include/bezier.h:629:15: note: template parameter ‘N’ declared here
  629 |     template <size_t N>
      |               ^~~~~~
tests/CMakeFiles/derivative-tests.dir/build.make:62: recipe for target 'tests/CMakeFiles/derivative-tests.dir/derivative-tests.cpp.o' failed
make[2]: *** [tests/CMakeFiles/derivative-tests.dir/derivative-tests.cpp.o] Error 1
CMakeFiles/Makefile2:87: recipe for target 'tests/CMakeFiles/derivative-tests.dir/all' failed
make[1]: *** [tests/CMakeFiles/derivative-tests.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2

Hvordan Finner Jeg Midtpunkten?

Hei Øystein!

Unnskyld, jeg vet dette er et gammelt prosjekt, man hvordan finner jeg midpointten av kurven?

If this functionality is not yet available, I'll figure it out and send a PR!

(Please excuse my Norsk, I am still learning!)
Rich

Add documentation?

It doesn't seem like there is any documentation for this library. I guess I'll just try to figure it out, but it would be great if you could add some documentation.

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.