(radius=3.0, maxz=3.0, minz=0.0)
| 153 | |
| 154 | |
| 155 | def sample_spherical(radius=3.0, maxz=3.0, minz=0.0): |
| 156 | correct = False |
| 157 | while not correct: |
| 158 | vec = np.random.uniform(-1, 1, 3) |
| 159 | vec[2] = np.abs(vec[2]) |
| 160 | vec = vec / np.linalg.norm(vec, axis=0) * radius |
| 161 | if maxz > vec[2] > minz: |
| 162 | correct = True |
| 163 | return vec |
| 164 | |
| 165 | |
| 166 | # def sample_spherical(radius_min=1.5, radius_max=2.0, maxz=1.6, minz=-0.75): |
nothing calls this directly
no outgoing calls
no test coverage detected