Clip 3D suface with surf

Consider plotting a parameterized surface where . I am using the surf command to plot S.
This surface spans a certain region in the 3D cartesian coordinates system and I wish to clip the surface with respect to plane parrallel to the (xOy) plane (or (yOz) or (xOz) planes). This is equivalent to find the correct subset U to achieve such clipping but this could be diffucult given any S.
I am thinking to write an event function that plot the point of the surface in this point is in the given region but I didn't suceed.
Example: Consider the sphere , , where .
If I want to remove the part of the sphere where ( so the sphere has is cut : it has a disk hole at ). I can compute U to plot this cut surface but I would like a pure matlab way for any general surface. I don't want to clip the axis using for instance because I may have other surfaces in the region that I want to plot also.
If I am using the fimplicit3 command, we can achieve this using the yrange setting, but what is I can't use this implicit function because my surface can be only given in a parameterized form ?

Answers (1)

smilia
smilia on 6 Dec 2019
I tried and it seems to work ;)

Products

Asked:

on 6 Dec 2019

Answered:

on 6 Dec 2019

Community Treasure Hunt

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

Start Hunting!