Coder Social home page Coder Social logo

euler_spiral's Introduction

Euler Spiral

An Euler spiral (clothoid) is a curve whose curvature changes linearly with its curve length.

This libraly provides two functions.

  • calculate the endpoint of Euler spiral at given length with given curveture deviation.

    struct SpiralPoint {
      double x, y, t;
    };
    
    SpiralPoint getEndPoint(double length, double dCurv, double initCurv = 0.0, double initX = 0.0, double initY = 0.0, double initTheta = 0.0);
  • estimate suitable parameters for Euler spiral, length, initial curvature and curvature deviation from given two points and directions at them.

    struct SpiralParameter {
      double length;
      double initCurv;
      double dCurv;
    };
    
    SpiralParameter getParameter(const SpiralPoint& start, const SpiralPoint& goal, SpiralParameter* init = NULL);

    <demo>

    demo demo

build & run demo

$ mkdir build
$ cd build
$ cmake ../test
$ make

reference

  • Euler Spiral for Shape Completion.
    Benjamin B. Kimia, Ilana Frankel, and Ana-Maria Popescu. 2003.
    Int. J. Comput. Vision 54, 1โ€“3 (August-September 2003), 157โ€“180.
    DOI:https://doi.org/10.1023/A:1023713602895

euler_spiral's People

Contributors

coffeekumazaki 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

Watchers

 avatar  avatar  avatar

euler_spiral's Issues

License

Thank you for sharing your project.

I would appreciate if you could add a license :)

There is a bug in euler_spiral.cpp !!!!

hello, thank you for your opensource code. solve my question.
however, I found the bug in the process of using.

the origin code:
pos.x = M_PI * a * (x * cos(theta) - y * sin(theta));
pos.y = M_PI * a * (x * sin(theta) + y * cos(theta));
if (dCurv < 0.0) pos.x *= -1.0;

the fix code:
if (dCurv < 0.0) x *= -1.0;
pos.x = M_PI * a * (x * cos(theta) - y * sin(theta));
pos.y = M_PI * a * (x * sin(theta) + y * cos(theta));

because in the paper sign is for the x not the pos.x.

make only output the libeuler_spiral_lib.a file

I executed the command but only get the libeuler_spiral_lib.a. No executable file generated. Could any one teach me the following step to get the plot shown in ReadMe? Thanks very much!

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.