Creating a Discontinuous 3D Function for Quantum Dots

  • Context: Undergrad 
  • Thread starter Thread starter Ben Wilson
  • Start date Start date
  • Tags Tags
    3d Function
Click For Summary

Discussion Overview

The discussion revolves around creating a discontinuous 3D function to describe quantum dots, specifically focusing on a function defined by an ellipse in the x-y plane. Participants explore how to implement this function computationally, particularly in programming languages like MATLAB or Fortran.

Discussion Character

  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant proposes a function defined by the ellipse equation, suggesting that inside the ellipse, z=+1, and outside, z=0, resulting in a discontinuous function.
  • Another participant reiterates the proposed function using a piecewise definition, expressing satisfaction with the formulation.
  • There is a request for guidance on implementing the function in programming languages, specifically asking how to handle vectors representing the x and y space.
  • A later reply suggests a method for implementation by calculating a specific expression based on the ellipse parameters and returning values based on the comparison to a threshold.

Areas of Agreement / Disagreement

Participants generally agree on the formulation of the function, but there is no consensus on the implementation details, as different programming approaches are suggested.

Contextual Notes

Implementation details remain unresolved, particularly regarding the specific coding techniques in MATLAB or Fortran, and the assumptions about the vectors representing the x and y space are not fully clarified.

Ben Wilson
Messages
90
Reaction score
16
I have, say, an ellipse in the x-y plane: (x^2/a^2) + (y^2/b^2) = 1

I want a 3d (e.g. z) function where inside the ellipse z=+1, outside z=0; the function is not continuous.

so in effect what I'm left with is a large plane where z= 0, and a small ellipse cut out raised to z=1.

How do I write what I want in terms that i can implement it in computations.

%this problem comes from describing quantum dots in 2 and 3 dimensions.
 
Mathematics news on Phys.org
Ben Wilson said:
I have, say, an ellipse in the x-y plane: (x^2/a^2) + (y^2/b^2) = 1

I want a 3d (e.g. z) function where inside the ellipse z=+1, outside z=0; the function is not continuous.

so in effect what I'm left with is a large plane where z= 0, and a small ellipse cut out raised to z=1.

How do I write what I want in terms that i can implement it in computations.

%this problem comes from describing quantum dots in 2 and 3 dimensions.
How about this?
$$f(x, y) = \begin{cases} 1, & \frac{x^2}{a^2} + \frac{y^2}{b^2} \le 1 \\
0, & \frac{x^2}{a^2} + \frac{y^2}{b^2} > 1\end{cases}$$
 
Mark44 said:
How about this?
$$f(x, y) = \begin{cases} 1, & \frac{x^2}{a^2} + \frac{y^2}{b^2} \le 1 \\
0, & \frac{x^2}{a^2} + \frac{y^2}{b^2} > 1\end{cases}$$

that looks perfect tbh. Do you have any idea how i could implement that into a program?
for instance if i have two vectors representing my x and y space, how would i go about describing this function in MATLAB or fortran or something?
 
Ben Wilson said:
that looks perfect tbh. Do you have any idea how i could implement that into a program?
for instance if i have two vectors representing my x and y space, how would i go about describing this function in MATLAB or fortran or something?
Your vectors are really points in the x-y plane. For a given point (x, y), calculate ##b^2x^2 + a^2y^2##. If this is greater than ##a^2b^2##, your function should return 0. Otherwise, it should return 0.
 
thanks you have been an amazing help
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K