|
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 37 of file sdf_flat.py.
◆ gradSdf()
def sdf_flat.Sphere.gradSdf |
( |
|
xc, |
|
|
|
yc, |
|
|
|
zc, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Definition at line 46 of file sdf_flat.py.
46 def gradSdf(xc, yc, zc, x, y, z):
47 a = (x-xc)**2 + (y-yc)**2 + (z-zc)**2
50 c_val_dx = c_val_A * (x-xc)
51 c_val_dy = c_val_A * (y-yc)
52 c_val_dz = c_val_A * (z-zc)
54 c_val_dx = c_val_dx.reshape((-1,1))
55 c_val_dy = c_val_dy.reshape((-1,1))
56 c_val_dz = c_val_dz.reshape((-1,1))
57 grad_array = np.hstack([c_val_dx,c_val_dy,c_val_dz])
◆ hessSdf()
def sdf_flat.Sphere.hessSdf |
( |
|
xc, |
|
|
|
yc, |
|
|
|
zc, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Definition at line 60 of file sdf_flat.py.
60 def hessSdf(xc, yc, zc, x, y, z):
64 Hxx = -x**2/(x**2 + y**2 + z**2)**(3/2) + 1/np.sqrt(x**2 + y**2 + z**2)
65 Hzx = -x*z/(x**2 + y**2 + z**2)**(3/2)
66 Hxy = -x*y/(x**2 + y**2 + z**2)**(3/2)
67 Hyy = -y**2/(x**2 + y**2 + z**2)**(3/2) + 1/np.sqrt(x**2 + y**2 + z**2)
68 Hzy = -y*z/(x**2 + y**2 + z**2)**(3/2)
69 Hzz = -z**2/(x**2 + y**2 + z**2)**(3/2) + 1/np.sqrt(x**2 + y**2 + z**2)
71 Hxx = Hxx.reshape((-1,1))
72 Hzx = Hzx.reshape((-1,1))
73 Hxy = Hxy.reshape((-1,1))
74 Hyy = Hyy.reshape((-1,1))
75 Hzy = Hzy.reshape((-1,1))
76 Hzz = Hzz.reshape((-1,1))
77 hess_array = np.hstack([Hxx, Hxy, Hzx, Hyy, Hzy, Hzz])
◆ sDF()
def sdf_flat.Sphere.sDF |
( |
|
r, |
|
|
|
xc, |
|
|
|
yc, |
|
|
|
zc, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Definition at line 38 of file sdf_flat.py.
38 def sDF(r, xc, yc, zc, x, y, z):
39 dx = np.subtract(x, xc)
40 dy = np.subtract(y, yc)
41 dz = np.subtract(z, zc)
42 a = dx**2 + dy**2 + dz**2
The documentation for this class was generated from the following file: