# ffmatlib3D and matlab

**URL:** https://community.freefem.org/t/ffmatlib3d-and-matlab/2321
**Category:** General Discussion
**Created:** [March 8, 2023, 3:20pm UTC](https://community.freefem.org/t/ffmatlib3d-and-matlab/2321 "2023-03-08T15:20:41Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![wanglongfei](https://avatars.discourse-cdn.com/v4/letter/w/ea666f/32.png) [@wanglongfei](https://community.freefem.org/u/wanglongfei)
#### Post date: [March 8, 2023, 3:20pm UTC](https://community.freefem.org/t/ffmatlib3d-and-matlab/2321/1 "2023-03-08T15:20:41Z")

</div>

Hello  
I’m sorry to bother you, I want to use ffmatlib3D to draw a cross-section of a 3D function, but I don’t know how to select the section. I want to know which parameters are used to select the section. Is it S1, S2, S3 in the figure below?

 ![MP7RWC$VCO0SU_4G4W6~Q3F](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/a/a47b9b7e8805545065c3f58d209d140042df17be.png)  
Thank you very much.

---

<div class="post-metadata">

### Author: ![jsmacd](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@jsmacd](https://community.freefem.org/u/jsmacd)
#### Post date: [March 9, 2023, 5:24pm UTC](https://community.freefem.org/t/ffmatlib3d-and-matlab/2321/2 "2023-03-09T17:24:18Z")

</div>

yes that’s right, S1, S2, and S3 all contain three points (which shouldn’t be colinear).

---

<div class="post-metadata">

### Author: ![wanglongfei](https://avatars.discourse-cdn.com/v4/letter/w/ea666f/32.png) [@wanglongfei](https://community.freefem.org/u/wanglongfei)
#### Post date: [March 10, 2023, 2:46am UTC](https://community.freefem.org/t/ffmatlib3d-and-matlab/2321/3 "2023-03-10T02:46:30Z")

</div>

Thank you very much. What do the parameters in S1, S2 and S3 mean respectively? How do you adjust the parameters?

---

<div class="post-metadata">

### Author: ![wanglongfei](https://avatars.discourse-cdn.com/v4/letter/w/ea666f/32.png) [@wanglongfei](https://community.freefem.org/u/wanglongfei)
#### Post date: [March 10, 2023, 2:58am UTC](https://community.freefem.org/t/ffmatlib3d-and-matlab/2321/4 "2023-03-10T02:58:45Z")

</div>

For example,  
u=x_y_z\*(1-exp(-(1-x)/epsilon))_(1-exp(-(1-y)/epsilon))_(1-exp(-(1-z)/epsilon))  
I want to draw the figure of z=1 in the numerical solution of u. How should I adjust the parameters in S1, S2 and S3?

---

<div class="post-metadata">

### Author: ![cmd](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/cmd/32/67_2.png) [@cmd](https://community.freefem.org/u/cmd)
#### Post date: [March 10, 2023, 5:39am UTC](https://community.freefem.org/t/ffmatlib3d-and-matlab/2321/5 "2023-03-10T05:39:37Z")

</div>

It sounds like they are three points that define the plane containing the cross section? So you should define three non-colinear points in your plane of interest. Note that this is a guess since I haven’t actually used this function

---

<div class="post-metadata">

### Author: ![wanglongfei](https://avatars.discourse-cdn.com/v4/letter/w/ea666f/32.png) [@wanglongfei](https://community.freefem.org/u/wanglongfei)
#### Post date: [March 10, 2023, 3:13pm UTC](https://community.freefem.org/t/ffmatlib3d-and-matlab/2321/6 "2023-03-10T15:13:34Z")

</div>

Thank you very much for your answer.I got it, and I’ll try it later.

---

<div class="post-metadata">

### Author: ![jsmacd](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@jsmacd](https://community.freefem.org/u/jsmacd)
#### Post date: [March 13, 2023, 4:47pm UTC](https://community.freefem.org/t/ffmatlib3d-and-matlab/2321/7 "2023-03-13T16:47:12Z")

</div>

The way Chris described is how I understand it, I hope it is working for you!
