Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

how to generate path.json file? #1

Open
loveAtFirstSightA opened this issue May 28, 2022 · 1 comment
Open

how to generate path.json file? #1

loveAtFirstSightA opened this issue May 28, 2022 · 1 comment

Comments

@loveAtFirstSightA
Copy link

Hi, I am learning this algorithm. I would like to know how the ‘path.json’ file is generated in which way. thank u.

@AmirmohammadZarif
Copy link

Hello,

Based on the code, what I tried was by just creating the JSON file and wrapping the path points [x, y] inside an array, so the path.json file will look something like the following, and it will work.

path.json

[
    [0, 0],
    [5, 1],
    [10, 5],
    [12, 10],
    [10, 15],
    [5, 19],
    [0, 20],
    [-5, 19],
    [-10, 15],
    [-12, 10],
    [-10, 5],
    [-5, 1],
    [0, 0]
]

And in that example, the output path for those points is a simple polygon like in the image below:

Screen Shot 2023-07-28 at 6 21 06 PM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants