Plotting equally space grid points within a complex boundary

2 views (last 30 days)
I have created a plot of a configuration space of a two-segment soft robotic finger. The plot consists of a boundary with (roughly placed) dot points of possible end effector locations.
What I want to do now is, instead of having unevenly spaced dots where many are already clumped together, I want to have equally spaced dots of existing points (if possible) that act as grid points to allow easier path planning.
One method I have considered is to add another code that define a desired distance and then calculate the distance of each point to see if they match the desired distance and tell the program to keep/remove points depending on the condition. However I think this will cause a great amount of run time as the program already takes up to 5 minutes to plot the current configuration space.
Is there an easy and quick way to establish such grid points within such boundary?
I have attached the code and an image for convenience.

Answers (1)

KSSV
KSSV on 1 Jun 2016
I will take the problem in the following way. You have four boundaries and you want to make mesh with the given boundaries. If the boundaries are curves, it is tough to expect smooth structured grid. I suggest you to follow Transfinite Interpolation. On the other hand, meshing it with triangles i.e an unstructured grid would be easy.

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!