smile
smile

Reputation: 169

Discrete Curve evolution algorithm

i am trying to implement discrete curve evolution algorithm in c++ do any one help me with psudo code or c code or some simple steps of your understanding

Upvotes: 0

Views: 3103

Answers (2)

Seth Berrier
Seth Berrier

Reputation: 31

Discrete Curve Evolution is an algorithm to compute an everywhere convex curve from one that is concave. It moves concave sections of the curve outward along their normal in discrete steps until all concavities are eliminated. It is not a genetic algorithm, the term evolution refers to 'evolving' the position of the curve over time.

Having searched on this for quite some time the best source on the internet is here: https://cis.temple.edu/~latecki/Software/Evo.zip

This is matlab code so it's not quite what you are looking for but you have three good options:

  1. Port it to C++ (usually not to hard with matlab as long as it doesn't use matrix prims.)
  2. Wrap the matlab code so you can call it from C (matlab provides libraries to do this)
  3. Compile it to an executable and call that from C (matlab also allows this)

Option 2 would require anyone that want's to run it to have a copy of the matlab dynamic library on their computer which may be undesirable. I'm guessing option 3 would require this too, but I only have experience with options 1 and 2. Porting matlab to c++ is usually not that bad; it depends on how much the code utilizes matrix primitives and matrix operations which are easy to use in matlab and hard to use in C++ (because they aren't built-in). Still, I'd recommend giving it the old college try!

If you're just looking for DCE, check out the file evolution.m. That's the function that implements DCE. The full skeleton pruning algorithm this comes from can only be described simply at a high level. The individual steps and parts are QUITE complicated and DCE is only a small piece of that.

Hope this helps! I will be working with this code myself so if I do end up using it in C++ in some way that might help you I will let you know.

Upvotes: 3

Inverse
Inverse

Reputation: 4476

I'm not exactly sure what you mean by Discrete Curve evolutionary algorithm, but if you mean a Symbolic regression algorithm, you can start by reading about symbolic regression (or genetic programming in general):

http://en.wikipedia.org/wiki/Symbolic_Regression

There's also some nice existing programs. The Eureqa one has an open API:

http://code.google.com/p/eureqa-api/

Upvotes: 0

Related Questions