-
-
Save ochoto/7f3b6f4baac08bfa57b0f0094e4a853a to your computer and use it in GitHub Desktop.
Hackit 3 2022
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import numpy as np | |
import matplotlib.pyplot as plt | |
dt = np.dtype([('x',np.float32),('y',np.float32),('z',np.float32)]) | |
with open("obj_150138c000.bin", 'rb') as f: | |
data = np.fromfile(f,dtype=dt) | |
filter = (data['x'] != 0.) & (data['y'] != 0.) & (data['z'] != 0.) | |
filtered = data[filter] | |
xs = filtered['x'] | |
ys = filtered['y'] | |
#zs = filtered['z'] # las descartamos por estar todas en el mismo plano -> len(np.unique(zs)) == 1 | |
plt.plot(xs,ys) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Muy elegante!