# [Scilab-users] A plane intersecting a surface

10 messages
Open this post in threaded view
|

## [Scilab-users] A plane intersecting a surface

 Dear All I’ve not been using scilab for a while, but I’ve a good opportunity to dive into it once again ;-) Is there a tool implemented into Scilab to determine the cross section of a 3D (experimental) surface and a plane? Note that : -          the curve has not a Cartesian equation and it is composed of a point cloud coming for experimental measurement, -          ideally the tool looks for the closest out of plane points in order to perform interpolations Before reinventing the wheel, I’m wondering if something exists. Nb: I built a saddle surface, but of course only points (not necessary equally spaced) exist in the real life. Thanks for any advice and suggestion Paul function [z]=saddle(x, y)     z = x^2 - y^2 endfunction   // surface making ... of course in the real life the surface comes from exprimental data (no cartesian equation is attached on)) n = 50; x = linspace(-2,2,n)'; y = linspace(-1,3,n)'; z = feval(x,y,saddle); plot3d(x,y,z);   // plane equation: ax + by + cz + d = 0       EXPORT CONTROL : Cet email ne contient pas de donnĂ©es techniques This email does not contain technical data   _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

## Re: A plane intersecting a surface

 Hi Paul,   I am not aware of such tool.   To extract the points in the experimental cloud that are within a given distance from the plane, use equation in:   If your cloud of points behaves well enough, you can interpolate it first into a dense grid (for instance using cshep2d) and then extract only the points that are very close to the plane.   What would you like to do next with those points on the 2D plane? If you just need to highlight them in 3D view, then scatter3 is your buddy.   Regards, Rafael   _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

## Re: A plane intersecting a surface

 In reply to this post by Carrico, Paul Hello PaulDo you have an example of typical 3D data ? Can it be safely projected on a principal plane ? Is it noisy ? S.Le 6 sept. 2018 Ă  21:50, Carrico, Paul <[hidden email]> a Ă©crit : Dear All Iâ€™ve not been using scilab for a while, but Iâ€™ve a good opportunity to dive into it once again ;-) Is there a tool implemented into Scilab to determine the cross section of a 3D (experimental) surface and a plane? Note that : -          the curve has not a Cartesian equation and it is composed of a point cloud coming for experimental measurement, -          ideally the tool looks for the closest out of plane points in order to perform interpolations Before reinventing the wheel, Iâ€™m wondering if something exists. Nb: I built a saddle surface, but of course only points (not necessary equally spaced) exist in the real life. Thanks for any advice and suggestion Paul function [z]=saddle(x, y)     z = x^2 - y^2 endfunction   // surface making ... of course in the real life the surface comes from exprimental data (no cartesian equation is attached on)) n = 50; x = linspace(-2,2,n)'; y = linspace(-1,3,n)'; z = feval(x,y,saddle); plot3d(x,y,z);   // plane equation: ax + by + cz + d = 0       EXPORT CONTROL : Cet email ne contient pas de donnĂ©es techniques This email does not contain technical data   _______________________________________________users mailing list[hidden email]https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users_______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

## Re: A plane intersecting a surface

 In reply to this post by Carrico, Paul Hello, > De : users [mailto:[hidden email]] De la part de Rafael Guerra > EnvoyĂ© : samedi 8 septembre 2018 14:52 > > If your cloud of points behaves well enough, you can interpolate it first into a dense If nobody is expert in this field, then I could invoke a memory when I was a student. I've heard about an algorithm using intercept with tetrahedrons, it was used for surface rendering. So you might perform a Delaunay tessellation of your cloud, determine which tetrahedrons are cut and determine the coordinates of the intercepts. Or ask some CGI  specialists. HTH Regards -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

## Re: A plane intersecting a surface

Open this post in threaded view
|

## Re: A plane intersecting a surface

 In reply to this post by Christophe Dang Ngoc Chan Paul, The attached home-made example illustrates the very simple procedure that I have suggested earlier (i.e., using distance to plane + cshep2d function). PS: if you have multi-valued input data points then cshep2d will not work. Regards, Rafael -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html_______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

## Re: A plane intersecting a surface

 In reply to this post by Carrico, Paul Hello Paul, Le 10/09/2018 Ă  09:29, Carrico, Paul a Ă©critÂ : Dear all Â  Thanks Christophe, Rafael and StĂ©phane for the first feedback; Â  Only obvious things in the code hereafter, but it highlights I guess what I would like to do (to cross section the surface); the results are not really noisy and their number is of about few hundred. Â  Concerning the Delaunay approach, I thought about it but I've been thinking a simplest solution may exist if I can plot the surface (interpolation from the grid) ? in your set of (x_i,y_i,z_i) 3D points, are the (x_i,y_i) organized on a grid, i.e. cartesian product [discrete values of x] times [discrete values of y] ? S. Â  Paul Â  ########################################### mode(0) Â  function [z]=saddle(x, y) Â Â Â  z = x^2 - y^2 endfunction Â  function [z]=x_square(x, d) Â Â Â  z = x^2 - d^2 endfunction Â  function [z]=y_square(y, d) Â Â Â  z = y^2 - d^2 endfunction Â  // surface making ... of course in the real life the surface comes from experimental data (no Cartesian equation is attached on)) n = 50; x = linspace(-2,2,n)'; y = linspace(-1,3,n)'; z = feval(x,y,saddle); scf(0); plot3d(x,y,z); Â  // obvious cases // n = (0 1 0) then z = x^2 - d^2 d = 0; z1 = x_square(x,d); scf(1); plot(x,z1); Â  // n = (1 0 0) then z = d^2 - y^2 d = 0; z2 = y_square(y,d); scf(2); plot(x,z2); Â  Â  Â  Â  -----Message d'origine----- DeÂ : users [[hidden email]] De la part de Dang Ngoc Chan, Christophe EnvoyĂ©Â : lundi 10 septembre 2018 09:15 Ă€Â : Users mailing list for Scilab ObjetÂ : [EXTERNAL] Re: [Scilab-users] A plane intersecting a surface Â  Hello, Â  > De : users [[hidden email]] De la part de Rafael Guerra > EnvoyĂ© : samedi 8 septembre 2018 14:52 >Â  > If your cloud of points behaves well enough, you can interpolate it first into a dense Â  If nobody is expert in this field, then I could invoke a memory when I was a student. I've heard about an algorithm using intercept with tetrahedrons, it was used for surface rendering. Â  So you might perform a Delaunay tessellation of your cloud, determine which tetrahedrons are cut and determine the coordinates of the intercepts. Â  Or ask some CGIÂ  specialists. Â  HTH Â  Regards Â  Â  -- Christophe Dang Ngoc Chan Mechanical calculation engineer Â  This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. _______________________________________________ users mailing list EXPORT CONTROL : Cet email ne contient pas de donnĂ©es techniques This email does not contain technical data Â  ```-- StĂ©phane Mottelet IngĂ©nieur de recherche EA 4297 Transformations IntĂ©grĂ©es de la MatiĂ¨re Renouvelable DĂ©partement GĂ©nie des ProcĂ©dĂ©s Industriels Sorbonne UniversitĂ©s - UniversitĂ© de Technologie de CompiĂ¨gne CS 60319, 60203 CompiĂ¨gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet``` _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

## Re: A plane intersecting a surface

 In reply to this post by Rafael Guerra The new attached snapshot is taken from a better angle to illustrate the plane cutting the 3D data cloud. PS: The Scilab 3D plots all use orthographic views. An option to include perspective is missing.   _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users Scilab_plane_intersection_with_point_cloud_RG.png (94K) Download Attachment