Skip to content

Possible Issue about curvature calculation [levelset.py/line151]Β #1

@kakushiryou

Description

@kakushiryou

Hi Rocchi

Thank you for creating this project - it's been really helpful for me since I am a beginer in Level-Set method! πŸ™Œ

While working with the code in the function levelset.py/motion_under_curvature, I noticed an possible bug in calculating the curvature.

As far as I know, the curvature is calculated as follows:

Image

The denominator should be the cube of the gradient of phi (||βˆ‡Ο†||Β³), but the current implementation uses squared (||βˆ‡Ο†||Β²) .
I don't know whether the Ο† is the signed distance function. If we assume the signed distance function always have ||βˆ‡Ο†|| = 1, it is OK. But in the simulation, ||βˆ‡Ο†|| = 1 is not always guaranteed because of the numerical discretization and calculation error.

So maybe it is better to change it to :
agrad2 = math.pow(px ** 2 + py ** 2, 1.5) + 0.001

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions