# Threshold on slice using an ellipse

**URL:** https://discourse.paraview.org/t/threshold-on-slice-using-an-ellipse/4532
**Category:** ParaView Support
**Created:** [June 7, 2020, 4:16pm UTC](https://discourse.paraview.org/t/threshold-on-slice-using-an-ellipse/4532 "2020-06-07T16:16:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![yek\_irani](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/y/f07891/32.png) [@yek\_irani](https://discourse.paraview.org/u/yek_irani)
#### Post date: [June 7, 2020, 4:16pm UTC](https://discourse.paraview.org/t/threshold-on-slice-using-an-ellipse/4532/1 "2020-06-07T16:16:37Z")

</div>

Hello,

I am making a slice along the Y-normal plane. However, I would like to look at results confined to a region bounded by an elliptical surface. The region I want to visualize is restricted to where x^2/a^2 + z^2/b^2 \< 1 (i.e. inside the elliptical region). I am assuming I need to leverage the Threshold filter, but I I just don’t know how to make it happen.

I tried a quick search in the Support group but could not find a relevant thread. I am somewhat of a beginner, I don’t do python programming. Help would be greatly appreciated.  
Thank you.

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [June 7, 2020, 10:18pm UTC](https://discourse.paraview.org/t/threshold-on-slice-using-an-ellipse/4532/2 "2020-06-07T22:18:10Z")

</div>

You can follow the **Slice** filter with a **Clip** filter, setting the **Slice Type** property to “Sphere” to get a spherical region.

For an elliptical region, you might first need to define a distance field using either the **Calculator** filter or **Python Calculator**. You can use an implicit elliptical equation in the calculator expression to do this. Then, use the **Clip** filter, but set the **Clip Type** to **Scalar** and set the **Scalars** to the new array computed by the calculator filter.

---

<div class="post-metadata">

### Author: ![yek\_irani](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/y/f07891/32.png) [@yek\_irani](https://discourse.paraview.org/u/yek_irani)
#### Post date: [June 8, 2020, 6:33pm UTC](https://discourse.paraview.org/t/threshold-on-slice-using-an-ellipse/4532/3 "2020-06-08T18:33:03Z")

</div>

Hello again,

Many thanks for your response. The clip filter with a sphere worked and it was very straightforward. I am having trouble with the Calculator filter. The equation for the ellipse which I am interested in, I entered as follows in the calculator: X^2/(13.8e-3)^2+Z^2/(9.1007e-3)^2=1. But, when I enter Apply, I get error messages which I have pasted below.

I then used:

coordsX^2/(13.8e-3)^2+coordsZ^2/(9.1007e-3)^2=1

That didn’t generate error messages. But the result does not look like anything I expected.  
I also found the following thread. I am not sure how relevant it is to the problem at hand: [slice along polyline](https://discourse.paraview.org/t/slice-along-polyline/1633)

Just to clarify: Am I supposed to do a clip at Y-normal, and then create the calculator with the elliptical equation, followed by the scalar clip?  
[sphere.tiff](https://discourse.paraview.org/uploads/short-url/m39kSlfa1eYjlJogRjCkCWChX8n.tiff) (2.6 MB)  
What I want to see is the elliptical equitvalent of the attached plot.

Thank you.  
Maziar.
