# How to define a sloping boundary?

As we know, if I want to define a boundary of a box, I can use some codes like"wherezero(x[0])"

On this basis, if I want to define a sloping boundary like the hypotenuse of the triangle，how can I do that?

## Question information

Language:
English Edit question
Status:
Solved
For:
esys-escript Edit question
Assignee:
No assignee Edit question
Solved by:
Solved:
Last query:
 Revision history for this message Adam Ellery (aellery) said on 2020-10-05: #1

Hi Jingchi,

For a line defined by the equation y=a*x+b, you can use the expression along the lines "whereZero(x[1]-(a*x[0]+b))".