|
def | sDF (r, xc, yc, zc, x, y, z) |
|
def | gradSdf (xc, yc, zc, x, y, z) |
|
def | hessSdf (xc, yc, zc, x, y, z) |
|
Definition at line 20 of file sdf_sphere.py.
◆ gradSdf()
def sdf_sphere.Sphere.gradSdf |
( |
|
xc, |
|
|
|
yc, |
|
|
|
zc, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Definition at line 29 of file sdf_sphere.py.
29 def gradSdf(xc, yc, zc, x, y, z):
30 a = (x-xc)**2 + (y-yc)**2 + (z-zc)**2
33 c_val_dx = c_val_A * (x-xc)
34 c_val_dy = c_val_A * (y-yc)
35 c_val_dz = c_val_A * (z-zc)
37 c_val_dx = c_val_dx.reshape((-1,1))
38 c_val_dy = c_val_dy.reshape((-1,1))
39 c_val_dz = c_val_dz.reshape((-1,1))
40 grad_array = np.hstack([c_val_dx,c_val_dy,c_val_dz])
◆ hessSdf()
def sdf_sphere.Sphere.hessSdf |
( |
|
xc, |
|
|
|
yc, |
|
|
|
zc, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Definition at line 43 of file sdf_sphere.py.
43 def hessSdf(xc, yc, zc, x, y, z):
47 Hxx = -x**2/(x**2 + y**2 + z**2)**(3/2) + 1/np.sqrt(x**2 + y**2 + z**2)
48 Hzx = -x*z/(x**2 + y**2 + z**2)**(3/2)
49 Hxy = -x*y/(x**2 + y**2 + z**2)**(3/2)
50 Hyy = -y**2/(x**2 + y**2 + z**2)**(3/2) + 1/np.sqrt(x**2 + y**2 + z**2)
51 Hzy = -y*z/(x**2 + y**2 + z**2)**(3/2)
52 Hzz = -z**2/(x**2 + y**2 + z**2)**(3/2) + 1/np.sqrt(x**2 + y**2 + z**2)
54 Hxx = Hxx.reshape((-1,1))
55 Hzx = Hzx.reshape((-1,1))
56 Hxy = Hxy.reshape((-1,1))
57 Hyy = Hyy.reshape((-1,1))
58 Hzy = Hzy.reshape((-1,1))
59 Hzz = Hzz.reshape((-1,1))
60 hess_array = np.hstack([Hxx, Hxy, Hzx, Hyy, Hzy, Hzz])
◆ sDF()
def sdf_sphere.Sphere.sDF |
( |
|
r, |
|
|
|
xc, |
|
|
|
yc, |
|
|
|
zc, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Definition at line 21 of file sdf_sphere.py.
21 def sDF(r, xc, yc, zc, x, y, z):
22 dx = np.subtract(x, xc)
23 dy = np.subtract(y, yc)
24 dz = np.subtract(z, zc)
25 a = dx**2 + dy**2 + dz**2
The documentation for this class was generated from the following file: