3D-Surface between 2 lines.

2 views (last 30 days)
Hi all,
Previously with one of the Mathwork community users' (darova) suggestion we created 3D surfaces on the sphere.
Please find the script below.
Here I have 3 surfaces the one of which (green) is below the other 2 surfaces.
Now, I aim to fill the gap between the top (red) and bottom (green) surfaces by creating an additional surface (i.e. an oblique surface (a slightly tilted surface)).
To make it clearer, in the output image of the attached code one can see 2 lines between the top (red) and bottom (green) surfaces.
I aim to create a surface between those 2 lines in order to close the gap.
I've tried several ways, and also a triangulation method, however, was not successfull.
Could you please make a suggestion on this.
I appreciate the time you spend.

Accepted Answer

darova on 4 Jul 2020
what about this?
xf = [xl2(1) xl2(5) xl1(4) xl1(5)];
yf = [yl2(1) yl2(5) yl1(4) yl1(5)];
Mammadbaghir Baghirzade
Mammadbaghir Baghirzade on 5 Jul 2020
Thank you Darova,
I appreciate!
Kind regards

Sign in to comment.

More Answers (1)

Mehmed Saad
Mehmed Saad on 4 Jul 2020
Edited: Mehmed Saad on 4 Jul 2020
I have a layman approach for this (The dumb method)
get co-ordinates by cursor
export them to workspace
save it in a variable
Now access all the co-ords
apos = [cursor_info.Position];
hold on,fill3(apos(1:3:end),apos(2:3:end),apos(3:3:end),'r','EdgeColor','none')
  1 Comment
Mammadbaghir Baghirzade
Mammadbaghir Baghirzade on 4 Jul 2020
Hi Mehmed,
Thank you for your reply.
I will check this method, actually at the same time I want to generate triangular meshes on the surface.
However, if that won't work your suggested approach will be the solution.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by