|
def | __init__ (self, Xc, Yc, Zc, diameter) |
|
def | sDF (self, x, y, z) |
|
def | gradSdf (self, x, y, z) |
|
def | hessSdf (self, x, y, z) |
|
def | __init__ (self, Xc, Yc, Zc, diameter) |
|
def | sDF (self, x, y, z) |
|
def | gradSdf (self, x, y, z) |
|
def | hessSdf (self, x, y, z) |
|
def | __init__ (self, Xc, Yc, Zc, diameter) |
|
def | sDF (self, x, y, z) |
|
def | gradSdf (self, x, y, z) |
|
def | hessSdf (self, x, y, z) |
|
Definition at line 141 of file sdf.py.
◆ __init__() [1/3]
def sdf.Sphere.__init__ |
( |
|
self, |
|
|
|
Xc, |
|
|
|
Yc, |
|
|
|
Zc, |
|
|
|
diameter |
|
) |
| |
Definition at line 142 of file sdf.py.
142 def __init__(self, Xc, Yc, Zc, diameter):
154 self.radius = diameter/2
◆ __init__() [2/3]
def sdf.Sphere.__init__ |
( |
|
self, |
|
|
|
Xc, |
|
|
|
Yc, |
|
|
|
Zc, |
|
|
|
diameter |
|
) |
| |
Definition at line 93 of file sdf.py.
93 def __init__(self, Xc, Yc, Zc, diameter):
105 self.radius = diameter/2
◆ __init__() [3/3]
def sdf.Sphere.__init__ |
( |
|
self, |
|
|
|
Xc, |
|
|
|
Yc, |
|
|
|
Zc, |
|
|
|
diameter |
|
) |
| |
Definition at line 142 of file sdf.py.
142 def __init__(self, Xc, Yc, Zc, diameter):
154 self.radius = diameter/2
◆ gradSdf() [1/3]
def sdf.Sphere.gradSdf |
( |
|
self, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Definition at line 110 of file sdf.py.
110 def gradSdf(self, x, y, z):
111 a = (x-self.xc)**2 + (y-self.yc)**2 + (z-self.zc)**2
112 c_val_A = 1./np.sqrt(a)
113 c_val_dx = c_val_A * (x-self.xc)
114 c_val_dy = c_val_A * (y-self.yc)
115 c_val_dz = c_val_A * (z-self.zc)
117 return np.hstack([c_val_dx.reshape((-1,1)), c_val_dy.reshape((-1,1)), c_val_dz.reshape((-1,1))])
◆ gradSdf() [2/3]
def sdf.Sphere.gradSdf |
( |
|
self, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Definition at line 165 of file sdf.py.
165 def gradSdf(self,x, y, z):
166 a = (x-self.xc)**2 + (y-self.yc)**2 + (z-self.zc)**2
169 c_val_dx = c_val_A * (x-self.xc)
170 c_val_dy = c_val_A * (y-self.yc)
171 c_val_dz = c_val_A * (z-self.zc)
175 c_val_dx = c_val_dx.reshape((-1,1))
176 c_val_dy = c_val_dy.reshape((-1,1))
177 c_val_dz = c_val_dz.reshape((-1,1))
178 grad_array = np.hstack([c_val_dx,c_val_dy,c_val_dz])
◆ gradSdf() [3/3]
def sdf.Sphere.gradSdf |
( |
|
self, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Definition at line 165 of file sdf.py.
165 def gradSdf(self,x, y, z):
166 a = (x-self.xc)**2 + (y-self.yc)**2 + (z-self.zc)**2
169 c_val_dx = c_val_A * (x-self.xc)
170 c_val_dy = c_val_A * (y-self.yc)
171 c_val_dz = c_val_A * (z-self.zc)
175 c_val_dx = c_val_dx.reshape((-1,1))
176 c_val_dy = c_val_dy.reshape((-1,1))
177 c_val_dz = c_val_dz.reshape((-1,1))
178 grad_array = np.hstack([c_val_dx,c_val_dy,c_val_dz])
◆ hessSdf() [1/3]
def sdf.Sphere.hessSdf |
( |
|
self, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Definition at line 119 of file sdf.py.
119 def hessSdf(self, x, y, z):
120 x, y, z = x-self.xc, y-self.yc, z-self.zc
121 denom = (x**2 + y**2 + z**2)**(3/2)
122 sqrt_denom = np.sqrt(x**2 + y**2 + z**2)
123 Hxx = -x**2/denom + 1/sqrt_denom
126 Hyy = -y**2/denom + 1/sqrt_denom
128 Hzz = -z**2/denom + 1/sqrt_denom
130 return np.hstack([Hxx.reshape((-1,1)), Hxy.reshape((-1,1)), Hzx.reshape((-1,1)), Hyy.reshape((-1,1)), Hzy.reshape((-1,1)), Hzz.reshape((-1,1))])
◆ hessSdf() [2/3]
def sdf.Sphere.hessSdf |
( |
|
self, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Definition at line 181 of file sdf.py.
181 def hessSdf(self,x, y, z):
185 Hxx = -x**2/(x**2 + y**2 + z**2)**(3/2) + 1/np.sqrt(x**2 + y**2 + z**2)
186 Hzx = -x*z/(x**2 + y**2 + z**2)**(3/2)
187 Hxy = -x*y/(x**2 + y**2 + z**2)**(3/2)
188 Hyy = -y**2/(x**2 + y**2 + z**2)**(3/2) + 1/np.sqrt(x**2 + y**2 + z**2)
189 Hzy = -y*z/(x**2 + y**2 + z**2)**(3/2)
190 Hzz = -z**2/(x**2 + y**2 + z**2)**(3/2) + 1/np.sqrt(x**2 + y**2 + z**2)
192 Hxx = Hxx.reshape((-1,1))
193 Hzx = Hzx.reshape((-1,1))
194 Hxy = Hxy.reshape((-1,1))
195 Hyy = Hyy.reshape((-1,1))
196 Hzy = Hzy.reshape((-1,1))
197 Hzz = Hzz.reshape((-1,1))
198 hess_array = np.hstack([Hxx, Hxy, Hzx, Hyy, Hzy, Hzz])
◆ hessSdf() [3/3]
def sdf.Sphere.hessSdf |
( |
|
self, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Definition at line 181 of file sdf.py.
181 def hessSdf(self,x, y, z):
185 Hxx = -x**2/(x**2 + y**2 + z**2)**(3/2) + 1/np.sqrt(x**2 + y**2 + z**2)
186 Hzx = -x*z/(x**2 + y**2 + z**2)**(3/2)
187 Hxy = -x*y/(x**2 + y**2 + z**2)**(3/2)
188 Hyy = -y**2/(x**2 + y**2 + z**2)**(3/2) + 1/np.sqrt(x**2 + y**2 + z**2)
189 Hzy = -y*z/(x**2 + y**2 + z**2)**(3/2)
190 Hzz = -z**2/(x**2 + y**2 + z**2)**(3/2) + 1/np.sqrt(x**2 + y**2 + z**2)
192 Hxx = Hxx.reshape((-1,1))
193 Hzx = Hzx.reshape((-1,1))
194 Hxy = Hxy.reshape((-1,1))
195 Hyy = Hyy.reshape((-1,1))
196 Hzy = Hzy.reshape((-1,1))
197 Hzz = Hzz.reshape((-1,1))
198 hess_array = np.hstack([Hxx, Hxy, Hzx, Hyy, Hzy, Hzz])
◆ sDF() [1/3]
def sdf.Sphere.sDF |
( |
|
self, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Definition at line 107 of file sdf.py.
107 def sDF(self, x, y, z):
108 return np.sqrt((x - self.xc)**2 + (y - self.yc)**2 + (z - self.zc)**2) - self.radius
◆ sDF() [2/3]
def sdf.Sphere.sDF |
( |
|
self, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Definition at line 156 of file sdf.py.
156 def sDF(self, x, y, z):
157 dx = np.subtract(x, self.xc)
158 dy = np.subtract(y, self.yc)
159 dz = np.subtract(z, self.zc)
160 a = (dx)**2+(dy)**2 + (dz)**2
161 gap = np.sqrt(a) - self.radius
◆ sDF() [3/3]
def sdf.Sphere.sDF |
( |
|
self, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Definition at line 156 of file sdf.py.
156 def sDF(self, x, y, z):
157 dx = np.subtract(x, self.xc)
158 dy = np.subtract(y, self.yc)
159 dz = np.subtract(z, self.zc)
160 a = (dx)**2+(dy)**2 + (dz)**2
161 gap = np.sqrt(a) - self.radius
◆ radius
◆ Xc
◆ xc
◆ Yc
◆ yc
◆ Zc
◆ zc
The documentation for this class was generated from the following file: