Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
threevis
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
11
Issues
11
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
threevis
threevis
Commits
f66f0105
Commit
f66f0105
authored
Feb 01, 2018
by
Dario Seyb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added example model file
parent
7d45e17e
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7552 additions
and
78 deletions
+7552
-78
examples/.ipynb_checkpoints/Untitled-checkpoint.ipynb
examples/.ipynb_checkpoints/Untitled-checkpoint.ipynb
+39
-39
examples/Untitled.ipynb
examples/Untitled.ipynb
+39
-39
examples/models/bunny.obj
examples/models/bunny.obj
+7474
-0
No files found.
examples/.ipynb_checkpoints/Untitled-checkpoint.ipynb
View file @
f66f0105
...
...
@@ -10,7 +10,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "
4070011fb1214209bacf3ffd7b6a094d
",
"model_id": "
d78baa643f694c9a8dfe4b107fa23140
",
"version_major": 2,
"version_minor": 0
},
...
...
@@ -30,49 +30,49 @@
"</p>\n"
],
"text/plain": [
"Renderer(background='#dddddd', camera=PerspectiveCamera(aspect=1.3333333333333333, children=(DirectionalLight(position=(-30.0, 50.0, 10.0), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)),), fov=20.0, position=(3.0, 3.0, 3.0), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), controls=[OrbitControls(controlling=PerspectiveCamera(aspect=1.3333333333333333, children=(DirectionalLight(position=(-30.0, 50.0, 10.0), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)),), fov=20.0, position=(3.0, 3.0, 3.0), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)))], scene=Scene(background=u'#dddddd', children=(AmbientLight(color=u'#aaaaaa', quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), PerspectiveCamera(aspect=1.3333333333333333, children=(DirectionalLight(position=(-30.0, 50.0, 10.0), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)),), fov=20.0, position=(3.0, 3.0, 3.0), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), Mesh(geometry=BufferGeometry(attributes={'color': BufferAttribute(array=array([[0.
7048854 , 0.19333012, 0.83984125
],\n",
" [0.
7048854 , 0.19333012, 0.83984125
],\n",
" [0.
7048854 , 0.19333012, 0.83984125
],\n",
"Renderer(background='#dddddd', camera=PerspectiveCamera(aspect=1.3333333333333333, children=(DirectionalLight(position=(-30.0, 50.0, 10.0), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)),), fov=20.0, position=(3.0, 3.0, 3.0), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), controls=[OrbitControls(controlling=PerspectiveCamera(aspect=1.3333333333333333, children=(DirectionalLight(position=(-30.0, 50.0, 10.0), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)),), fov=20.0, position=(3.0, 3.0, 3.0), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)))], scene=Scene(background=u'#dddddd', children=(AmbientLight(color=u'#aaaaaa', quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), PerspectiveCamera(aspect=1.3333333333333333, children=(DirectionalLight(position=(-30.0, 50.0, 10.0), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)),), fov=20.0, position=(3.0, 3.0, 3.0), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), Mesh(geometry=BufferGeometry(attributes={'color': BufferAttribute(array=array([[0.
23248161, 0.6580202 , 0.67279756
],\n",
" [0.
23248161, 0.6580202 , 0.67279756
],\n",
" [0.
23248161, 0.6580202 , 0.67279756
],\n",
" ...,\n",
" [0.
8403377 , 0.21791874, 0.98012495
],\n",
" [0.
8403377 , 0.21791874, 0.98012495
],\n",
" [0.
8403377 , 0.21791874, 0.98012495]], dtype=float32)), 'index': BufferAttribute(array=array([ 0, 1, 2, ..., 20457, 20458, 20459], dtype=uint16), normalized=False), 'normal': BufferAttribute(array=array([[ 0.29923597, 0.209352 , -0.9309294
],\n",
" [
0.34789708, 0.10039929, -0.9321414
],\n",
" [
0.15907033, 0.06733694, -0.9849682
],\n",
" [0.
74864453, 0.61769456, 0.59280473
],\n",
" [0.
74864453, 0.61769456, 0.59280473
],\n",
" [0.
74864453, 0.61769456, 0.59280473]], dtype=float32)), 'index': BufferAttribute(array=array([ 0, 1, 2, ..., 14901, 14902, 14903], dtype=uint16), normalized=False), 'normal': BufferAttribute(array=array([[-0.8607535 , 0.1269212 , -0.4929447
],\n",
" [
-0.8924592 , -0.02002691, -0.45068336
],\n",
" [
-0.8525913 , -0.13340487, -0.50526357
],\n",
" ...,\n",
" [-0.
13178219, 0.90176684, -0.4116430
3],\n",
" [-0.
12657353, 0.92504686, -0.35814443
],\n",
" [-0.
12895663, 0.91968286, -0.37088218]], dtype=float32)), 'position': BufferAttribute(array=array([[-0.283628, 2.931106, -0.140772
],\n",
" [-0.
22873 , 2.855558, -0.135154
],\n",
" [-0.
34671 , 2.856239, -0.160498
],\n",
" [-0.
69263035, -0.7083079 , 0.1362464
3],\n",
" [-0.
2737271 , -0.8989508 , 0.34199542
],\n",
" [-0.
35207012, -0.91879463, 0.17850235]], dtype=float32)), 'position': BufferAttribute(array=array([[-0.08656194, 0.14249188, 0.00843268
],\n",
" [-0.
08969839, 0.13971257, 0.01377476
],\n",
" [-0.
08949102, 0.14392582, 0.01248849
],\n",
" ...,\n",
" [
0.280426, 0.4863 , -0.003152
],\n",
" [
0.332014, 0.467158, -0.059092
],\n",
" [
0.216602, 0.471758, -0.014108]], dtype=float32), normalized=False)}), material=MeshLambertMaterial(alphaMap=None, aoMap=None, color=u'white', emissiveMap=None, envMap=None, lightMap=None, map=None, polygonOffset=True, polygonOffsetFactor=0.5, polygonOffsetUnits=0.1, specularMap=None, vertexColors='VertexColors'), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), LineSegments(geometry=BufferGeometry(attributes={'color': BufferAttribute(array=array([[0.8298772 , 0.3087851 , 0.42418373
],\n",
" [0.
8298772 , 0.3087851 , 0.42418373
],\n",
" [0.
24034402, 0.9740283 , 0.01827334
],\n",
" [
-0.05290982, 0.05704307, 0.02098841
],\n",
" [
-0.05816759, 0.05998519, 0.02260606
],\n",
" [
-0.0550398 , 0.0573097 , 0.0169909 ]], dtype=float32), normalized=False)}), material=MeshLambertMaterial(alphaMap=None, aoMap=None, color=u'white', emissiveMap=None, envMap=None, lightMap=None, map=None, polygonOffset=True, polygonOffsetFactor=0.5, polygonOffsetUnits=0.1, specularMap=None, vertexColors='VertexColors'), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), LineSegments(geometry=BufferGeometry(attributes={'color': BufferAttribute(array=array([[0.41986996, 0.5942799 , 0.44914556
],\n",
" [0.
41986996, 0.5942799 , 0.44914556
],\n",
" [0.
1897525 , 0.11455698, 0.6038935
],\n",
" ...,\n",
" [0.
9811828 , 0.08381105, 0.98115414
],\n",
" [0.
06608333, 0.54907537, 0.93927246
],\n",
" [0.
06608333, 0.54907537, 0.93927246]], dtype=float32)), 'index': BufferAttribute(array=array([ 0, 1, 2, ..., 20569, 20570, 20571], dtype=uint16), normalized=False), 'position': BufferAttribute(array=array([[-0.283628, 2.931106, -0.140772
],\n",
" [-0.
22873 , 2.855558, -0.135154
],\n",
" [-0.
22873 , 2.855558, -0.135154
],\n",
" [0.
07761359, 0.5742296 , 0.32884943
],\n",
" [0.
18359563, 0.20241594, 0.10445441
],\n",
" [0.
18359563, 0.20241594, 0.10445441]], dtype=float32)), 'index': BufferAttribute(array=array([ 0, 1, 2, ..., 14943, 14944, 14945], dtype=uint16), normalized=False), 'position': BufferAttribute(array=array([[-0.08656194, 0.14249188, 0.00843268
],\n",
" [-0.
08969839, 0.13971257, 0.01377476
],\n",
" [-0.
08969839, 0.13971257, 0.01377476
],\n",
" ...,\n",
" [
0.157628, 0.430178, -0.130118
],\n",
" [
0.216602, 0.471758, -0.014108
],\n",
" [
0.332014, 0.467158, -0.059092]], dtype=float32), normalized=False)}), material=LineBasicMaterial(color=u'white', linewidth=3.0, vertexColors='VertexColors'), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), LineSegments(geometry=BufferGeometry(attributes={'index': BufferAttribute(array=array([ 0, 1, 2, ..., 40917, 40918, 40919], dtype=uint16), normalized=False), 'position': BufferAttribute(array=array([[-0.283628 , 2.931106 , -0.140772
],\n",
" [-0.
26866618, 2.9415736 , -0.18731847
],\n",
" [-0.
22873 , 2.855558 , -0.135154
],\n",
" [
-0.0550398 , 0.0573097 , 0.0169909
],\n",
" [
-0.05290982, 0.05704307, 0.02098841
],\n",
" [
-0.0550398 , 0.0573097 , 0.0169909 ]], dtype=float32), normalized=False)}), material=LineBasicMaterial(color=u'white', linewidth=3.0, vertexColors='VertexColors'), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), LineSegments(geometry=BufferGeometry(attributes={'index': BufferAttribute(array=array([ 0, 1, 2, ..., 29805, 29806, 29807], dtype=uint16), normalized=False), 'position': BufferAttribute(array=array([[-0.08656194, 0.14249188, 0.00843268
],\n",
" [-0.
09516948, 0.14376108, 0.00350323
],\n",
" [-0.
08969839, 0.13971257, 0.01377476
],\n",
" ...,\n",
" [
0.32568532, 0.51341033, -0.07699922
],\n",
" [
0.216602 , 0.471758 , -0.014108
],\n",
" [
0.21015416, 0.51774216, -0.03265211]], dtype=float32), normalized=False)}), material=LineBasicMaterial(color=u'#000000'), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), Points(geometry=BufferGeometry(attributes={'position': BufferAttribute(array=array([[-0.283628, 2.931106, -0.140772
],\n",
" [-0.
22873 , 2.855558, -0.135154
],\n",
" [-0.
34671 , 2.856239, -0.160498
],\n",
" [
-0.06090486, 0.05099568, 0.02602601
],\n",
" [
-0.0550398 , 0.0573097 , 0.0169909
],\n",
" [
-0.0585605 , 0.04812175, 0.01877592]], dtype=float32), normalized=False)}), material=LineBasicMaterial(color=u'#000000'), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), Points(geometry=BufferGeometry(attributes={'position': BufferAttribute(array=array([[-0.00341018, 0.13031957, 0.02175437
],\n",
" [-0.
08171916, 0.15250145, 0.02965609
],\n",
" [-0.
03054348, 0.12477885, 0.00109834
],\n",
" ...,\n",
" [-0.
675122, 1.403736, -0.094798
],\n",
" [-0.
700144, 1.367866, -0.036312
],\n",
" [-0.
708084, 1.391306, -0.0961
]], dtype=float32), normalized=False)}), material=PointsMaterial(color=u'red', map=None, size=4.0, sizeAttenuation=False), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0))), fog=None, overrideMaterial=None, quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), shadowMap=WebGLShadowMap())"
" [-0.
01389549, 0.16787168, -0.02189723
],\n",
" [-0.
069413 , 0.15121847, -0.04453854
],\n",
" [-0.
0550398 , 0.0573097 , 0.0169909
]], dtype=float32), normalized=False)}), material=PointsMaterial(color=u'red', map=None, size=4.0, sizeAttenuation=False), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0))), fog=None, overrideMaterial=None, quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), shadowMap=WebGLShadowMap())"
]
},
"metadata": {},
...
...
@@ -84,7 +84,7 @@
"import openmesh as om\n",
"import numpy as np\n",
"m = om.TriMesh()\n",
"om.read_mesh(m, \"
C:/Users/dario/OneDrive/Dokumente/ANIMVR/Import/Models/Mickey_Mouse
.obj\")\n",
"om.read_mesh(m, \"
models/bunny
.obj\")\n",
"\n",
"ctx = meshvis.Context(width=640, height=480)\n",
"\n",
...
...
@@ -102,7 +102,7 @@
" colors = meshvis.FaceAttribute(np.random.rand(len(m.ev_indices()), 3)),\n",
" linewidth=3)\n",
"\n",
"normal_vis_verts, normal_vis_edges = meshvis.calculateNormalEdges(m.points(), m.face_vertex_indices(), normals, 0.05)\n",
"normal_vis_verts, normal_vis_edges = meshvis.calculateNormalEdges(m.points(), m.face_vertex_indices(), normals, 0.0
0
5)\n",
"\n",
"ctx.draw_edges(normal_vis_verts, normal_vis_edges)\n",
"\n",
...
...
examples/Untitled.ipynb
View file @
f66f0105
...
...
@@ -10,7 +10,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "
4070011fb1214209bacf3ffd7b6a094d
",
"model_id": "
d78baa643f694c9a8dfe4b107fa23140
",
"version_major": 2,
"version_minor": 0
},
...
...
@@ -30,49 +30,49 @@
"</p>\n"
],
"text/plain": [
"Renderer(background='#dddddd', camera=PerspectiveCamera(aspect=1.3333333333333333, children=(DirectionalLight(position=(-30.0, 50.0, 10.0), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)),), fov=20.0, position=(3.0, 3.0, 3.0), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), controls=[OrbitControls(controlling=PerspectiveCamera(aspect=1.3333333333333333, children=(DirectionalLight(position=(-30.0, 50.0, 10.0), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)),), fov=20.0, position=(3.0, 3.0, 3.0), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)))], scene=Scene(background=u'#dddddd', children=(AmbientLight(color=u'#aaaaaa', quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), PerspectiveCamera(aspect=1.3333333333333333, children=(DirectionalLight(position=(-30.0, 50.0, 10.0), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)),), fov=20.0, position=(3.0, 3.0, 3.0), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), Mesh(geometry=BufferGeometry(attributes={'color': BufferAttribute(array=array([[0.
7048854 , 0.19333012, 0.83984125
],\n",
" [0.
7048854 , 0.19333012, 0.83984125
],\n",
" [0.
7048854 , 0.19333012, 0.83984125
],\n",
"Renderer(background='#dddddd', camera=PerspectiveCamera(aspect=1.3333333333333333, children=(DirectionalLight(position=(-30.0, 50.0, 10.0), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)),), fov=20.0, position=(3.0, 3.0, 3.0), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), controls=[OrbitControls(controlling=PerspectiveCamera(aspect=1.3333333333333333, children=(DirectionalLight(position=(-30.0, 50.0, 10.0), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)),), fov=20.0, position=(3.0, 3.0, 3.0), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)))], scene=Scene(background=u'#dddddd', children=(AmbientLight(color=u'#aaaaaa', quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), PerspectiveCamera(aspect=1.3333333333333333, children=(DirectionalLight(position=(-30.0, 50.0, 10.0), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)),), fov=20.0, position=(3.0, 3.0, 3.0), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), Mesh(geometry=BufferGeometry(attributes={'color': BufferAttribute(array=array([[0.
23248161, 0.6580202 , 0.67279756
],\n",
" [0.
23248161, 0.6580202 , 0.67279756
],\n",
" [0.
23248161, 0.6580202 , 0.67279756
],\n",
" ...,\n",
" [0.
8403377 , 0.21791874, 0.98012495
],\n",
" [0.
8403377 , 0.21791874, 0.98012495
],\n",
" [0.
8403377 , 0.21791874, 0.98012495]], dtype=float32)), 'index': BufferAttribute(array=array([ 0, 1, 2, ..., 20457, 20458, 20459], dtype=uint16), normalized=False), 'normal': BufferAttribute(array=array([[ 0.29923597, 0.209352 , -0.9309294
],\n",
" [
0.34789708, 0.10039929, -0.9321414
],\n",
" [
0.15907033, 0.06733694, -0.9849682
],\n",
" [0.
74864453, 0.61769456, 0.59280473
],\n",
" [0.
74864453, 0.61769456, 0.59280473
],\n",
" [0.
74864453, 0.61769456, 0.59280473]], dtype=float32)), 'index': BufferAttribute(array=array([ 0, 1, 2, ..., 14901, 14902, 14903], dtype=uint16), normalized=False), 'normal': BufferAttribute(array=array([[-0.8607535 , 0.1269212 , -0.4929447
],\n",
" [
-0.8924592 , -0.02002691, -0.45068336
],\n",
" [
-0.8525913 , -0.13340487, -0.50526357
],\n",
" ...,\n",
" [-0.
13178219, 0.90176684, -0.4116430
3],\n",
" [-0.
12657353, 0.92504686, -0.35814443
],\n",
" [-0.
12895663, 0.91968286, -0.37088218]], dtype=float32)), 'position': BufferAttribute(array=array([[-0.283628, 2.931106, -0.140772
],\n",
" [-0.
22873 , 2.855558, -0.135154
],\n",
" [-0.
34671 , 2.856239, -0.160498
],\n",
" [-0.
69263035, -0.7083079 , 0.1362464
3],\n",
" [-0.
2737271 , -0.8989508 , 0.34199542
],\n",
" [-0.
35207012, -0.91879463, 0.17850235]], dtype=float32)), 'position': BufferAttribute(array=array([[-0.08656194, 0.14249188, 0.00843268
],\n",
" [-0.
08969839, 0.13971257, 0.01377476
],\n",
" [-0.
08949102, 0.14392582, 0.01248849
],\n",
" ...,\n",
" [
0.280426, 0.4863 , -0.003152
],\n",
" [
0.332014, 0.467158, -0.059092
],\n",
" [
0.216602, 0.471758, -0.014108]], dtype=float32), normalized=False)}), material=MeshLambertMaterial(alphaMap=None, aoMap=None, color=u'white', emissiveMap=None, envMap=None, lightMap=None, map=None, polygonOffset=True, polygonOffsetFactor=0.5, polygonOffsetUnits=0.1, specularMap=None, vertexColors='VertexColors'), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), LineSegments(geometry=BufferGeometry(attributes={'color': BufferAttribute(array=array([[0.8298772 , 0.3087851 , 0.42418373
],\n",
" [0.
8298772 , 0.3087851 , 0.42418373
],\n",
" [0.
24034402, 0.9740283 , 0.01827334
],\n",
" [
-0.05290982, 0.05704307, 0.02098841
],\n",
" [
-0.05816759, 0.05998519, 0.02260606
],\n",
" [
-0.0550398 , 0.0573097 , 0.0169909 ]], dtype=float32), normalized=False)}), material=MeshLambertMaterial(alphaMap=None, aoMap=None, color=u'white', emissiveMap=None, envMap=None, lightMap=None, map=None, polygonOffset=True, polygonOffsetFactor=0.5, polygonOffsetUnits=0.1, specularMap=None, vertexColors='VertexColors'), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), LineSegments(geometry=BufferGeometry(attributes={'color': BufferAttribute(array=array([[0.41986996, 0.5942799 , 0.44914556
],\n",
" [0.
41986996, 0.5942799 , 0.44914556
],\n",
" [0.
1897525 , 0.11455698, 0.6038935
],\n",
" ...,\n",
" [0.
9811828 , 0.08381105, 0.98115414
],\n",
" [0.
06608333, 0.54907537, 0.93927246
],\n",
" [0.
06608333, 0.54907537, 0.93927246]], dtype=float32)), 'index': BufferAttribute(array=array([ 0, 1, 2, ..., 20569, 20570, 20571], dtype=uint16), normalized=False), 'position': BufferAttribute(array=array([[-0.283628, 2.931106, -0.140772
],\n",
" [-0.
22873 , 2.855558, -0.135154
],\n",
" [-0.
22873 , 2.855558, -0.135154
],\n",
" [0.
07761359, 0.5742296 , 0.32884943
],\n",
" [0.
18359563, 0.20241594, 0.10445441
],\n",
" [0.
18359563, 0.20241594, 0.10445441]], dtype=float32)), 'index': BufferAttribute(array=array([ 0, 1, 2, ..., 14943, 14944, 14945], dtype=uint16), normalized=False), 'position': BufferAttribute(array=array([[-0.08656194, 0.14249188, 0.00843268
],\n",
" [-0.
08969839, 0.13971257, 0.01377476
],\n",
" [-0.
08969839, 0.13971257, 0.01377476
],\n",
" ...,\n",
" [
0.157628, 0.430178, -0.130118
],\n",
" [
0.216602, 0.471758, -0.014108
],\n",
" [
0.332014, 0.467158, -0.059092]], dtype=float32), normalized=False)}), material=LineBasicMaterial(color=u'white', linewidth=3.0, vertexColors='VertexColors'), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), LineSegments(geometry=BufferGeometry(attributes={'index': BufferAttribute(array=array([ 0, 1, 2, ..., 40917, 40918, 40919], dtype=uint16), normalized=False), 'position': BufferAttribute(array=array([[-0.283628 , 2.931106 , -0.140772
],\n",
" [-0.
26866618, 2.9415736 , -0.18731847
],\n",
" [-0.
22873 , 2.855558 , -0.135154
],\n",
" [
-0.0550398 , 0.0573097 , 0.0169909
],\n",
" [
-0.05290982, 0.05704307, 0.02098841
],\n",
" [
-0.0550398 , 0.0573097 , 0.0169909 ]], dtype=float32), normalized=False)}), material=LineBasicMaterial(color=u'white', linewidth=3.0, vertexColors='VertexColors'), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), LineSegments(geometry=BufferGeometry(attributes={'index': BufferAttribute(array=array([ 0, 1, 2, ..., 29805, 29806, 29807], dtype=uint16), normalized=False), 'position': BufferAttribute(array=array([[-0.08656194, 0.14249188, 0.00843268
],\n",
" [-0.
09516948, 0.14376108, 0.00350323
],\n",
" [-0.
08969839, 0.13971257, 0.01377476
],\n",
" ...,\n",
" [
0.32568532, 0.51341033, -0.07699922
],\n",
" [
0.216602 , 0.471758 , -0.014108
],\n",
" [
0.21015416, 0.51774216, -0.03265211]], dtype=float32), normalized=False)}), material=LineBasicMaterial(color=u'#000000'), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), Points(geometry=BufferGeometry(attributes={'position': BufferAttribute(array=array([[-0.283628, 2.931106, -0.140772
],\n",
" [-0.
22873 , 2.855558, -0.135154
],\n",
" [-0.
34671 , 2.856239, -0.160498
],\n",
" [
-0.06090486, 0.05099568, 0.02602601
],\n",
" [
-0.0550398 , 0.0573097 , 0.0169909
],\n",
" [
-0.0585605 , 0.04812175, 0.01877592]], dtype=float32), normalized=False)}), material=LineBasicMaterial(color=u'#000000'), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), Points(geometry=BufferGeometry(attributes={'position': BufferAttribute(array=array([[-0.00341018, 0.13031957, 0.02175437
],\n",
" [-0.
08171916, 0.15250145, 0.02965609
],\n",
" [-0.
03054348, 0.12477885, 0.00109834
],\n",
" ...,\n",
" [-0.
675122, 1.403736, -0.094798
],\n",
" [-0.
700144, 1.367866, -0.036312
],\n",
" [-0.
708084, 1.391306, -0.0961
]], dtype=float32), normalized=False)}), material=PointsMaterial(color=u'red', map=None, size=4.0, sizeAttenuation=False), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0))), fog=None, overrideMaterial=None, quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), shadowMap=WebGLShadowMap())"
" [-0.
01389549, 0.16787168, -0.02189723
],\n",
" [-0.
069413 , 0.15121847, -0.04453854
],\n",
" [-0.
0550398 , 0.0573097 , 0.0169909
]], dtype=float32), normalized=False)}), material=PointsMaterial(color=u'red', map=None, size=4.0, sizeAttenuation=False), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0))), fog=None, overrideMaterial=None, quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), shadowMap=WebGLShadowMap())"
]
},
"metadata": {},
...
...
@@ -84,7 +84,7 @@
"import openmesh as om\n",
"import numpy as np\n",
"m = om.TriMesh()\n",
"om.read_mesh(m, \"
C:/Users/dario/OneDrive/Dokumente/ANIMVR/Import/Models/Mickey_Mouse
.obj\")\n",
"om.read_mesh(m, \"
models/bunny
.obj\")\n",
"\n",
"ctx = meshvis.Context(width=640, height=480)\n",
"\n",
...
...
@@ -102,7 +102,7 @@
" colors = meshvis.FaceAttribute(np.random.rand(len(m.ev_indices()), 3)),\n",
" linewidth=3)\n",
"\n",
"normal_vis_verts, normal_vis_edges = meshvis.calculateNormalEdges(m.points(), m.face_vertex_indices(), normals, 0.05)\n",
"normal_vis_verts, normal_vis_edges = meshvis.calculateNormalEdges(m.points(), m.face_vertex_indices(), normals, 0.0
0
5)\n",
"\n",
"ctx.draw_edges(normal_vis_verts, normal_vis_edges)\n",
"\n",
...
...
examples/models/bunny.obj
0 → 100644
View file @
f66f0105
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment