Writing equations that represent 3D and 2D objects

145 Views Asked by At

I want to represent a speed-breaker that I find in road in the form of an equation. Let's call it 3D speed-breaker. 3-Dimensions

The following is the speed-breaker that I can draw on a piece of a paper. Let's call it 2D speed-breaker. 2-Dimensions

The 2D speed-breaker can be built by inputting numbers into a function which is in terms of 'x'. y = f(x) lets me represent 2-dimensional speed-breakers in the form of an equation. 'x' is input. 'y' is output to build a 2D speed-breaker.

How to represent a 3-dimensional speed-breaker in the form of an equation?
I want to represent a 3D speed-breaker in the form of an equation. Should I have 'x' as input and y,z as output to form this 3D speed-breaker? In 2D speed-breaker I have only 'y' as unknown. In 3D speed-breaker I have two unknowns and 1 known?

Hence the question - how to represent a 3-dimensional speed-breaker in the form of an equation? Out of x,y,z how many are known and how many are unknown? What is the variable into which I need to plugin numbers to form 3D speed-breakers?

2

There are 2 best solutions below

0
On

Let $f$ the function representing the $2$D speed-breaker. Then define $$g(x,y)=\begin{cases} f(x) & \text{if } |y| \le L \\ 0 & \text{otherwise}\end{cases}$$

With $L$ the width of the $3$D speed-breaker. Then just draw $z=g(x,y)$.

1
On

There are some different options. For example:

  1. You can try to fit a function to your speed-breaker $$z=f(x,y)$$
  2. Or you can write it as a level set of some function $$f(x,y,z)=0$$

The second one is the most general one, but it is also often the most difficult one.

An example of 1) is $z =f(x,y)= \cases{1-\sqrt{(x^2+y^2)}, \text{ if } x^2+y^2<1\\0\phantom{1-\sqrt{(x^2+y^2)}}, otherwise}$

which will be a cone.