From b267fd173d5ab7a18a631443779e8bd1892f51bd Mon Sep 17 00:00:00 2001 From: David Coeurjolly Date: Tue, 2 Feb 2021 12:45:32 +0100 Subject: [PATCH] 3 --- 3-modeling/python/.polyscope.ini | 6 ++++++ 3-modeling/python/demo.py | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 3-modeling/python/.polyscope.ini create mode 100644 3-modeling/python/demo.py diff --git a/3-modeling/python/.polyscope.ini b/3-modeling/python/.polyscope.ini new file mode 100644 index 0000000..86d9d70 --- /dev/null +++ b/3-modeling/python/.polyscope.ini @@ -0,0 +1,6 @@ +{ + "windowHeight": 720, + "windowPosX": 20, + "windowPosY": 53, + "windowWidth": 1280 +} diff --git a/3-modeling/python/demo.py b/3-modeling/python/demo.py new file mode 100644 index 0000000..2f0d61f --- /dev/null +++ b/3-modeling/python/demo.py @@ -0,0 +1,20 @@ +# Demo polyscope + python +# +# make sure to have `pip install polyscope numpy` +# + +import polyscope +import numpy as np + +pts = np.array([[0,0,0], [0,0,1], [0,1,0], [1,0,0], [1,1,0],[0,1,1],[1,0,1],[1,1,1]]) +val = np.array([ 0.3, 3.4, 0.2, 0.4, 1.2, 4.0,3.6,5.0]) + + +polyscope.init() + +polyscope.register_point_cloud("My Points", pts) + +polyscope.get_point_cloud("My Points").add_scalar_quantity("Some values",val) + +polyscope.show() +