Commit 56b72c8d authored by Dario Seyb's avatar Dario Seyb

added texture map to quad in example

parent 3aabfb0f
......@@ -2,44 +2,15 @@
"cells": [
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 19,
"metadata": {
"scrolled": false
"scrolled": true
},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "cb7a80ba6f35401e9e25250af0ba1f11",
"version_major": 2,
"version_minor": 0
},
"text/html": [
"<p>Failed to display Jupyter Widget of type <code>Preview</code>.</p>\n",
"<p>\n",
" If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n",
" that the widgets JavaScript is still loading. If this message persists, it\n",
" likely means that the widgets JavaScript library is either not installed or\n",
" not enabled. See the <a href=\"https://ipywidgets.readthedocs.io/en/stable/user_install.html\">Jupyter\n",
" Widgets Documentation</a> for setup instructions.\n",
"</p>\n",
"<p>\n",
" If you're reading this message in another frontend (for example, a static\n",
" rendering on GitHub or <a href=\"https://nbviewer.jupyter.org/\">NBViewer</a>),\n",
" it may mean that your frontend doesn't currently support widgets.\n",
"</p>\n"
],
"text/plain": [
"Preview(child=ImageTexture(imageUri=u'textures/checkerboard.png', repeat=(1.0, 1.0)), shadowMap=WebGLShadowMap())"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "07a4763e3e814270a7b66e93e0be51e5",
"model_id": "bfede5fc21a145578b05f2ae795248e6",
"version_major": 2,
"version_minor": 0
},
......@@ -59,19 +30,19 @@
"</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=(0.6647806977667302, 0.6647806977667302, 0.6647806977667302), 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=(0.6647806977667302, 0.6647806977667302, 0.6647806977667302), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), target=(-0.016805611188265124, 0.10981325821101032, -0.0013969168554233066)), Picker(controlling=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=(0.6647806977667302, 0.6647806977667302, 0.6647806977667302), 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.29060814, 0.0531738 , 0.73882395],\n",
" [0.29060814, 0.0531738 , 0.73882395],\n",
" [0.29060814, 0.0531738 , 0.73882395],\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=(0.6647806977667302, 0.6647806977667302, 0.6647806977667302), 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=(0.6647806977667302, 0.6647806977667302, 0.6647806977667302), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), target=(-0.016805611188265124, 0.10981325821101032, -0.0013969168554233066)), Picker(controlling=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=(0.6647806977667302, 0.6647806977667302, 0.6647806977667302), 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.45077944, 0.3677988 , 0.75951713],\n",
" [0.45077944, 0.3677988 , 0.75951713],\n",
" [0.45077944, 0.3677988 , 0.75951713],\n",
" ...,\n",
" [0.11056597, 0.5459648 , 0.3199318 ],\n",
" [0.11056597, 0.5459648 , 0.3199318 ],\n",
" [0.11056597, 0.5459648 , 0.3199318 ]], dtype=float32)), 'index': BufferAttribute(array=array([ 0, 1, 2, ..., 14901, 14902, 14903], dtype=uint16), normalized=False), 'uv': BufferAttribute(array=array([[0., 0.],\n",
" [0., 0.],\n",
" [0., 0.],\n",
" [0.7766238 , 0.9185119 , 0.8154292 ],\n",
" [0.7766238 , 0.9185119 , 0.8154292 ],\n",
" [0.7766238 , 0.9185119 , 0.8154292 ]], dtype=float32)), 'index': BufferAttribute(array=array([ 0, 1, 2, ..., 14901, 14902, 14903], dtype=uint16), normalized=False), 'uv': BufferAttribute(array=array([[ 0. , 0. ],\n",
" [ 0. , 0. ],\n",
" [ 0. , 0. ],\n",
" ...,\n",
" [0., 0.],\n",
" [0., 0.],\n",
" [0., 0.]], dtype=float32)), 'normal': BufferAttribute(array=array([[-0.8607535 , 0.1269212 , -0.4929447 ],\n",
" [ 0. , 0. ],\n",
" [ 0.00803294, -0.0471043 ],\n",
" [ 0.02723481, -0.08777347]], dtype=float32)), '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",
......@@ -83,13 +54,13 @@
" ...,\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.41804713, 0.3630384 , 0.55066955],\n",
" [0.41804713, 0.3630384 , 0.55066955],\n",
" [0.3918132 , 0.5544737 , 0.18690161],\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.01003403, 0.45385548, 0.7758159 ],\n",
" [0.01003403, 0.45385548, 0.7758159 ],\n",
" [0.7655369 , 0.3169551 , 0.85059947],\n",
" ...,\n",
" [0.78927505, 0.7185339 , 0.9068611 ],\n",
" [0.71406925, 0.7876062 , 0.39225307],\n",
" [0.71406925, 0.7876062 , 0.39225307]], 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.27643302, 0.85323256, 0.719638 ],\n",
" [0.7488284 , 0.2272273 , 0.37840167],\n",
" [0.7488284 , 0.2272273 , 0.37840167]], 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",
......@@ -107,19 +78,19 @@
" ...,\n",
" [-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)), event=u'dblclick', object=None)], 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=(0.6647806977667302, 0.6647806977667302, 0.6647806977667302), 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.29060814, 0.0531738 , 0.73882395],\n",
" [0.29060814, 0.0531738 , 0.73882395],\n",
" [0.29060814, 0.0531738 , 0.73882395],\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)), event=u'dblclick', object=None)], 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=(0.6647806977667302, 0.6647806977667302, 0.6647806977667302), 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.45077944, 0.3677988 , 0.75951713],\n",
" [0.45077944, 0.3677988 , 0.75951713],\n",
" [0.45077944, 0.3677988 , 0.75951713],\n",
" ...,\n",
" [0.11056597, 0.5459648 , 0.3199318 ],\n",
" [0.11056597, 0.5459648 , 0.3199318 ],\n",
" [0.11056597, 0.5459648 , 0.3199318 ]], dtype=float32)), 'index': BufferAttribute(array=array([ 0, 1, 2, ..., 14901, 14902, 14903], dtype=uint16), normalized=False), 'uv': BufferAttribute(array=array([[0., 0.],\n",
" [0., 0.],\n",
" [0., 0.],\n",
" [0.7766238 , 0.9185119 , 0.8154292 ],\n",
" [0.7766238 , 0.9185119 , 0.8154292 ],\n",
" [0.7766238 , 0.9185119 , 0.8154292 ]], dtype=float32)), 'index': BufferAttribute(array=array([ 0, 1, 2, ..., 14901, 14902, 14903], dtype=uint16), normalized=False), 'uv': BufferAttribute(array=array([[ 0. , 0. ],\n",
" [ 0. , 0. ],\n",
" [ 0. , 0. ],\n",
" ...,\n",
" [0., 0.],\n",
" [0., 0.],\n",
" [0., 0.]], dtype=float32)), 'normal': BufferAttribute(array=array([[-0.8607535 , 0.1269212 , -0.4929447 ],\n",
" [ 0. , 0. ],\n",
" [ 0.00803294, -0.0471043 ],\n",
" [ 0.02723481, -0.08777347]], dtype=float32)), '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",
......@@ -131,13 +102,13 @@
" ...,\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.41804713, 0.3630384 , 0.55066955],\n",
" [0.41804713, 0.3630384 , 0.55066955],\n",
" [0.3918132 , 0.5544737 , 0.18690161],\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.01003403, 0.45385548, 0.7758159 ],\n",
" [0.01003403, 0.45385548, 0.7758159 ],\n",
" [0.7655369 , 0.3169551 , 0.85059947],\n",
" ...,\n",
" [0.78927505, 0.7185339 , 0.9068611 ],\n",
" [0.71406925, 0.7876062 , 0.39225307],\n",
" [0.71406925, 0.7876062 , 0.39225307]], 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.27643302, 0.85323256, 0.719638 ],\n",
" [0.7488284 , 0.2272273 , 0.37840167],\n",
" [0.7488284 , 0.2272273 , 0.37840167]], 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",
......@@ -201,13 +172,13 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 20,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "fdd4e66717484e1d9d5a29f716bcae14",
"model_id": "5688f785b1a141d0b4d52bd30c0a66ab",
"version_major": 2,
"version_minor": 0
},
......@@ -227,7 +198,13 @@
"</p>\n"
],
"text/plain": [
"Renderer(background='#dddddd', camera=PerspectiveCamera(aspect=1.5, 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.5, 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.5, 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)), LineSegments(geometry=BufferGeometry(attributes={'color': BufferAttribute(array=array([[1., 0., 0.],\n",
"Renderer(background='#dddddd', camera=PerspectiveCamera(aspect=1.5, 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.5355339059327378, 3.5355339059327378, 3.5355339059327378), 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.5, 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.5355339059327378, 3.5355339059327378, 3.5355339059327378), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), target=(0.5, 0.5, 0.0)), Picker(controlling=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.5, 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.5355339059327378, 3.5355339059327378, 3.5355339059327378), 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([[1., 0., 0.],\n",
" [0., 1., 0.],\n",
" [0., 0., 1.],\n",
" [1., 0., 1.]], dtype=float32)), 'index': BufferAttribute(array=array([0, 1, 2, 3], dtype=uint16), normalized=False), 'position': BufferAttribute(array=array([[0., 0., 0.],\n",
" [1., 0., 0.],\n",
" [1., 1., 0.],\n",
" [0., 1., 0.]], dtype=float32), normalized=False)}), material=LineBasicMaterial(color=u'white', 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))), 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)), event=u'dblclick', object=None)], 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.5, 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.5355339059327378, 3.5355339059327378, 3.5355339059327378), 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([[1., 0., 0.],\n",
" [0., 1., 0.],\n",
" [0., 0., 1.],\n",
" [1., 0., 1.]], dtype=float32)), 'index': BufferAttribute(array=array([0, 1, 2, 3], dtype=uint16), normalized=False), 'position': BufferAttribute(array=array([[0., 0., 0.],\n",
......@@ -261,13 +238,13 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "75933c25d9d14a68ba0154cf016f01a7",
"model_id": "0547730d134f47eeb6309c376f9bad1e",
"version_major": 2,
"version_minor": 0
},
......@@ -287,7 +264,8 @@
"</p>\n"
],
"text/plain": [
"Renderer(background='#dddddd', camera=PerspectiveCamera(aspect=1.5, 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.5, 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.5, 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)), Points(geometry=BufferGeometry(attributes={'position': BufferAttribute(array=array([[0., 0., 0.],\n",
"Renderer(background='#dddddd', camera=PerspectiveCamera(aspect=1.5, 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=(2.5, 2.5, 2.5), 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.5, 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=(2.5, 2.5, 2.5), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), target=(0.5, 0.0, 0.0)), Picker(controlling=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.5, 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=(2.5, 2.5, 2.5), 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., 0., 0.],\n",
" [1., 0., 0.]], dtype=float32), normalized=False)}), material=PointsMaterial(color=u'blue', map=None, size=10.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)), event=u'dblclick', object=None)], 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.5, 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=(2.5, 2.5, 2.5), 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., 0., 0.],\n",
" [1., 0., 0.]], dtype=float32), normalized=False)}), material=PointsMaterial(color=u'blue', map=None, size=10.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())"
]
},
......@@ -301,13 +279,13 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 23,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "2e1d5a77841b4557b1ce7a81d5359f97",
"model_id": "a3d7dfec9eb642c28b75eb86c1ed0a8f",
"version_major": 2,
"version_minor": 0
},
......@@ -327,22 +305,43 @@
"</p>\n"
],
"text/plain": [
"Renderer(background='#dddddd', camera=PerspectiveCamera(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(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(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([[1., 0., 0.],\n",
"Renderer(background='#dddddd', camera=PerspectiveCamera(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=(7.0710678118654755, 7.0710678118654755, 7.0710678118654755), 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(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=(7.0710678118654755, 7.0710678118654755, 7.0710678118654755), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), target=(0.0, 0.0, 1.0)), Picker(controlling=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(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=(7.0710678118654755, 7.0710678118654755, 7.0710678118654755), 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([[1., 0., 0.],\n",
" [0., 1., 0.],\n",
" [0., 0., 1.],\n",
" [1., 0., 0.],\n",
" [0., 0., 1.],\n",
" [1., 0., 1.]], dtype=float32)), 'index': BufferAttribute(array=array([0, 1, 2, 3, 4, 5], dtype=uint16), normalized=False), 'normal': BufferAttribute(array=array([[0., 0., 1.],\n",
" [0., 0., 1.],\n",
" [1., 0., 1.]], dtype=float32)), 'index': BufferAttribute(array=array([0, 1, 2, 3, 4, 5], dtype=uint16), normalized=False), 'uv': BufferAttribute(array=array([[0., 0.],\n",
" [1., 0.],\n",
" [1., 1.],\n",
" [0., 0.],\n",
" [1., 1.],\n",
" [0., 1.]], dtype=float32)), 'position': BufferAttribute(array=array([[-1., -1., 1.],\n",
" [ 1., -1., 1.],\n",
" [ 1., 1., 1.],\n",
" [-1., -1., 1.],\n",
" [ 1., 1., 1.],\n",
" [-1., 1., 1.]], dtype=float32), normalized=False)}), material=MeshLambertMaterial(alphaMap=None, aoMap=None, color=u'white', emissiveMap=None, envMap=None, lightMap=None, map=ImageTexture(imageUri=u'textures/checkerboard.png', repeat=(1.0, 1.0)), 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)), Points(geometry=BufferGeometry(attributes={'color': BufferAttribute(array=array([[1., 0., 0.],\n",
" [0., 1., 0.],\n",
" [0., 0., 1.],\n",
" [1., 0., 1.]], dtype=float32)), 'position': BufferAttribute(array=array([[-1., -1., 1.],\n",
" [ 1., -1., 1.],\n",
" [ 1., 1., 1.],\n",
" [-1., 1., 1.]], dtype=float32), normalized=False)}), material=PointsMaterial(color=u'#dddddd', map=None, size=5.0, sizeAttenuation=False, 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))), 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)), event=u'dblclick', object=None)], 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(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=(7.0710678118654755, 7.0710678118654755, 7.0710678118654755), 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([[1., 0., 0.],\n",
" [0., 1., 0.],\n",
" [0., 0., 1.],\n",
" [1., 0., 0.],\n",
" [0., 0., 1.],\n",
" [0., 0., 1.]], dtype=float32)), 'position': BufferAttribute(array=array([[-1., -1., 1.],\n",
" [1., 0., 1.]], dtype=float32)), 'index': BufferAttribute(array=array([0, 1, 2, 3, 4, 5], dtype=uint16), normalized=False), 'uv': BufferAttribute(array=array([[0., 0.],\n",
" [1., 0.],\n",
" [1., 1.],\n",
" [0., 0.],\n",
" [1., 1.],\n",
" [0., 1.]], dtype=float32)), 'position': BufferAttribute(array=array([[-1., -1., 1.],\n",
" [ 1., -1., 1.],\n",
" [ 1., 1., 1.],\n",
" [-1., -1., 1.],\n",
" [ 1., 1., 1.],\n",
" [-1., 1., 1.]], 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)), Points(geometry=BufferGeometry(attributes={'color': BufferAttribute(array=array([[1., 0., 0.],\n",
" [-1., 1., 1.]], dtype=float32), normalized=False)}), material=MeshLambertMaterial(alphaMap=None, aoMap=None, color=u'white', emissiveMap=None, envMap=None, lightMap=None, map=ImageTexture(imageUri=u'textures/checkerboard.png', repeat=(1.0, 1.0)), 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)), Points(geometry=BufferGeometry(attributes={'color': BufferAttribute(array=array([[1., 0., 0.],\n",
" [0., 1., 0.],\n",
" [0., 0., 1.],\n",
" [1., 0., 1.]], dtype=float32)), 'position': BufferAttribute(array=array([[-1., -1., 1.],\n",
......@@ -380,9 +379,19 @@
" [0, 0, 1]\n",
"]\n",
"\n",
"uvs = [\n",
" [0, 0],\n",
" [1, 0],\n",
" [1, 1],\n",
" [0, 1]\n",
"]\n",
"\n",
"ctx = meshvis.Context(width=300, height=300)\n",
"\n",
"ctx.draw_faces(verts, indices, colors= meshvis.PointAttribute(vcolors))\n",
"ctx.draw_faces(verts, indices, \n",
" colors = meshvis.PointAttribute(vcolors),\n",
" uvs = meshvis.PointAttribute(uvs),\n",
" texture = meshvis.ImageTexture(imageUri='textures/checkerboard.png'))\n",
"\n",
"ctx.draw_vertices(verts, point_size=5, colors=vcolors)\n",
"\n",
......
......@@ -2,44 +2,15 @@
"cells": [
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 19,
"metadata": {
"scrolled": false
"scrolled": true
},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "cb7a80ba6f35401e9e25250af0ba1f11",
"version_major": 2,
"version_minor": 0
},
"text/html": [
"<p>Failed to display Jupyter Widget of type <code>Preview</code>.</p>\n",
"<p>\n",
" If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n",
" that the widgets JavaScript is still loading. If this message persists, it\n",
" likely means that the widgets JavaScript library is either not installed or\n",
" not enabled. See the <a href=\"https://ipywidgets.readthedocs.io/en/stable/user_install.html\">Jupyter\n",
" Widgets Documentation</a> for setup instructions.\n",
"</p>\n",
"<p>\n",
" If you're reading this message in another frontend (for example, a static\n",
" rendering on GitHub or <a href=\"https://nbviewer.jupyter.org/\">NBViewer</a>),\n",
" it may mean that your frontend doesn't currently support widgets.\n",
"</p>\n"
],
"text/plain": [
"Preview(child=ImageTexture(imageUri=u'textures/checkerboard.png', repeat=(1.0, 1.0)), shadowMap=WebGLShadowMap())"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "07a4763e3e814270a7b66e93e0be51e5",
"model_id": "bfede5fc21a145578b05f2ae795248e6",
"version_major": 2,
"version_minor": 0
},
......@@ -59,19 +30,19 @@
"</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=(0.6647806977667302, 0.6647806977667302, 0.6647806977667302), 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=(0.6647806977667302, 0.6647806977667302, 0.6647806977667302), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), target=(-0.016805611188265124, 0.10981325821101032, -0.0013969168554233066)), Picker(controlling=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=(0.6647806977667302, 0.6647806977667302, 0.6647806977667302), 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.29060814, 0.0531738 , 0.73882395],\n",
" [0.29060814, 0.0531738 , 0.73882395],\n",
" [0.29060814, 0.0531738 , 0.73882395],\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=(0.6647806977667302, 0.6647806977667302, 0.6647806977667302), 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=(0.6647806977667302, 0.6647806977667302, 0.6647806977667302), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), target=(-0.016805611188265124, 0.10981325821101032, -0.0013969168554233066)), Picker(controlling=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=(0.6647806977667302, 0.6647806977667302, 0.6647806977667302), 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.45077944, 0.3677988 , 0.75951713],\n",
" [0.45077944, 0.3677988 , 0.75951713],\n",
" [0.45077944, 0.3677988 , 0.75951713],\n",
" ...,\n",
" [0.11056597, 0.5459648 , 0.3199318 ],\n",
" [0.11056597, 0.5459648 , 0.3199318 ],\n",
" [0.11056597, 0.5459648 , 0.3199318 ]], dtype=float32)), 'index': BufferAttribute(array=array([ 0, 1, 2, ..., 14901, 14902, 14903], dtype=uint16), normalized=False), 'uv': BufferAttribute(array=array([[0., 0.],\n",
" [0., 0.],\n",
" [0., 0.],\n",
" [0.7766238 , 0.9185119 , 0.8154292 ],\n",
" [0.7766238 , 0.9185119 , 0.8154292 ],\n",
" [0.7766238 , 0.9185119 , 0.8154292 ]], dtype=float32)), 'index': BufferAttribute(array=array([ 0, 1, 2, ..., 14901, 14902, 14903], dtype=uint16), normalized=False), 'uv': BufferAttribute(array=array([[ 0. , 0. ],\n",
" [ 0. , 0. ],\n",
" [ 0. , 0. ],\n",
" ...,\n",
" [0., 0.],\n",
" [0., 0.],\n",
" [0., 0.]], dtype=float32)), 'normal': BufferAttribute(array=array([[-0.8607535 , 0.1269212 , -0.4929447 ],\n",
" [ 0. , 0. ],\n",
" [ 0.00803294, -0.0471043 ],\n",
" [ 0.02723481, -0.08777347]], dtype=float32)), '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",
......@@ -83,13 +54,13 @@
" ...,\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.41804713, 0.3630384 , 0.55066955],\n",
" [0.41804713, 0.3630384 , 0.55066955],\n",
" [0.3918132 , 0.5544737 , 0.18690161],\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.01003403, 0.45385548, 0.7758159 ],\n",
" [0.01003403, 0.45385548, 0.7758159 ],\n",
" [0.7655369 , 0.3169551 , 0.85059947],\n",
" ...,\n",
" [0.78927505, 0.7185339 , 0.9068611 ],\n",
" [0.71406925, 0.7876062 , 0.39225307],\n",
" [0.71406925, 0.7876062 , 0.39225307]], 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.27643302, 0.85323256, 0.719638 ],\n",
" [0.7488284 , 0.2272273 , 0.37840167],\n",
" [0.7488284 , 0.2272273 , 0.37840167]], 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",
......@@ -107,19 +78,19 @@
" ...,\n",
" [-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)), event=u'dblclick', object=None)], 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=(0.6647806977667302, 0.6647806977667302, 0.6647806977667302), 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.29060814, 0.0531738 , 0.73882395],\n",
" [0.29060814, 0.0531738 , 0.73882395],\n",
" [0.29060814, 0.0531738 , 0.73882395],\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)), event=u'dblclick', object=None)], 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=(0.6647806977667302, 0.6647806977667302, 0.6647806977667302), 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.45077944, 0.3677988 , 0.75951713],\n",
" [0.45077944, 0.3677988 , 0.75951713],\n",
" [0.45077944, 0.3677988 , 0.75951713],\n",
" ...,\n",
" [0.11056597, 0.5459648 , 0.3199318 ],\n",
" [0.11056597, 0.5459648 , 0.3199318 ],\n",
" [0.11056597, 0.5459648 , 0.3199318 ]], dtype=float32)), 'index': BufferAttribute(array=array([ 0, 1, 2, ..., 14901, 14902, 14903], dtype=uint16), normalized=False), 'uv': BufferAttribute(array=array([[0., 0.],\n",
" [0., 0.],\n",
" [0., 0.],\n",
" [0.7766238 , 0.9185119 , 0.8154292 ],\n",
" [0.7766238 , 0.9185119 , 0.8154292 ],\n",
" [0.7766238 , 0.9185119 , 0.8154292 ]], dtype=float32)), 'index': BufferAttribute(array=array([ 0, 1, 2, ..., 14901, 14902, 14903], dtype=uint16), normalized=False), 'uv': BufferAttribute(array=array([[ 0. , 0. ],\n",
" [ 0. , 0. ],\n",
" [ 0. , 0. ],\n",
" ...,\n",
" [0., 0.],\n",
" [0., 0.],\n",
" [0., 0.]], dtype=float32)), 'normal': BufferAttribute(array=array([[-0.8607535 , 0.1269212 , -0.4929447 ],\n",
" [ 0. , 0. ],\n",
" [ 0.00803294, -0.0471043 ],\n",
" [ 0.02723481, -0.08777347]], dtype=float32)), '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",
......@@ -131,13 +102,13 @@
" ...,\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.41804713, 0.3630384 , 0.55066955],\n",
" [0.41804713, 0.3630384 , 0.55066955],\n",
" [0.3918132 , 0.5544737 , 0.18690161],\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.01003403, 0.45385548, 0.7758159 ],\n",
" [0.01003403, 0.45385548, 0.7758159 ],\n",
" [0.7655369 , 0.3169551 , 0.85059947],\n",
" ...,\n",
" [0.78927505, 0.7185339 , 0.9068611 ],\n",
" [0.71406925, 0.7876062 , 0.39225307],\n",
" [0.71406925, 0.7876062 , 0.39225307]], 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.27643302, 0.85323256, 0.719638 ],\n",
" [0.7488284 , 0.2272273 , 0.37840167],\n",
" [0.7488284 , 0.2272273 , 0.37840167]], 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",
......@@ -201,13 +172,13 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 20,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "fdd4e66717484e1d9d5a29f716bcae14",
"model_id": "5688f785b1a141d0b4d52bd30c0a66ab",
"version_major": 2,
"version_minor": 0
},
......@@ -227,7 +198,13 @@
"</p>\n"
],
"text/plain": [
"Renderer(background='#dddddd', camera=PerspectiveCamera(aspect=1.5, 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.5, 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.5, 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)), LineSegments(geometry=BufferGeometry(attributes={'color': BufferAttribute(array=array([[1., 0., 0.],\n",
"Renderer(background='#dddddd', camera=PerspectiveCamera(aspect=1.5, 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.5355339059327378, 3.5355339059327378, 3.5355339059327378), 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.5, 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.5355339059327378, 3.5355339059327378, 3.5355339059327378), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), target=(0.5, 0.5, 0.0)), Picker(controlling=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.5, 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.5355339059327378, 3.5355339059327378, 3.5355339059327378), 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([[1., 0., 0.],\n",
" [0., 1., 0.],\n",
" [0., 0., 1.],\n",
" [1., 0., 1.]], dtype=float32)), 'index': BufferAttribute(array=array([0, 1, 2, 3], dtype=uint16), normalized=False), 'position': BufferAttribute(array=array([[0., 0., 0.],\n",
" [1., 0., 0.],\n",
" [1., 1., 0.],\n",
" [0., 1., 0.]], dtype=float32), normalized=False)}), material=LineBasicMaterial(color=u'white', 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))), 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)), event=u'dblclick', object=None)], 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.5, 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.5355339059327378, 3.5355339059327378, 3.5355339059327378), 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([[1., 0., 0.],\n",
" [0., 1., 0.],\n",
" [0., 0., 1.],\n",
" [1., 0., 1.]], dtype=float32)), 'index': BufferAttribute(array=array([0, 1, 2, 3], dtype=uint16), normalized=False), 'position': BufferAttribute(array=array([[0., 0., 0.],\n",
......@@ -261,13 +238,13 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "75933c25d9d14a68ba0154cf016f01a7",
"model_id": "0547730d134f47eeb6309c376f9bad1e",
"version_major": 2,
"version_minor": 0
},
......@@ -287,7 +264,8 @@
"</p>\n"
],
"text/plain": [
"Renderer(background='#dddddd', camera=PerspectiveCamera(aspect=1.5, 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.5, 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.5, 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)), Points(geometry=BufferGeometry(attributes={'position': BufferAttribute(array=array([[0., 0., 0.],\n",
"Renderer(background='#dddddd', camera=PerspectiveCamera(aspect=1.5, 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=(2.5, 2.5, 2.5), 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.5, 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=(2.5, 2.5, 2.5), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), target=(0.5, 0.0, 0.0)), Picker(controlling=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.5, 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=(2.5, 2.5, 2.5), 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., 0., 0.],\n",
" [1., 0., 0.]], dtype=float32), normalized=False)}), material=PointsMaterial(color=u'blue', map=None, size=10.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)), event=u'dblclick', object=None)], 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.5, 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=(2.5, 2.5, 2.5), 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., 0., 0.],\n",
" [1., 0., 0.]], dtype=float32), normalized=False)}), material=PointsMaterial(color=u'blue', map=None, size=10.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())"
]
},
......@@ -301,13 +279,13 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 23,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "2e1d5a77841b4557b1ce7a81d5359f97",
"model_id": "a3d7dfec9eb642c28b75eb86c1ed0a8f",
"version_major": 2,
"version_minor": 0
},
......@@ -327,22 +305,43 @@
"</p>\n"
],
"text/plain": [
"Renderer(background='#dddddd', camera=PerspectiveCamera(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(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(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([[1., 0., 0.],\n",
"Renderer(background='#dddddd', camera=PerspectiveCamera(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=(7.0710678118654755, 7.0710678118654755, 7.0710678118654755), 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(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=(7.0710678118654755, 7.0710678118654755, 7.0710678118654755), quaternion=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), up=(0.0, 1.0, 0.0)), target=(0.0, 0.0, 1.0)), Picker(controlling=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(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=(7.0710678118654755, 7.0710678118654755, 7.0710678118654755), 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([[1., 0., 0.],\n",
" [0., 1., 0.],\n",
" [0., 0., 1.],\n",
" [1., 0., 0.],\n",
" [0., 0., 1.],\n",
" [1., 0., 1.]], dtype=float32)), 'index': BufferAttribute(array=array([0, 1, 2, 3, 4, 5], dtype=uint16), normalized=False), 'normal': BufferAttribute(array=array([[0., 0., 1.],\n",
" [0., 0., 1.],\n",
" [1., 0., 1.]], dtype=float32)), 'index': BufferAttribute(array=array([0, 1, 2, 3, 4, 5], dtype=uint16), normalized=False), 'uv': BufferAttribute(array=array([[0., 0.],\n",
" [1., 0.],\n",
" [1., 1.],\n",
" [0., 0.],\n",
" [1., 1.],\n",
" [0., 1.]], dtype=float32)), 'position': BufferAttribute(array=array([[-1., -1., 1.],\n",
" [ 1., -1., 1.],\n",
" [ 1., 1., 1.],\n",
" [-1., -1., 1.],\n",
" [ 1., 1., 1.],\n",
" [-1., 1., 1.]], dtype=float32), normalized=False)}), material=MeshLambertMaterial(alphaMap=None, aoMap=None, color=u'white', emissiveMap=None, envMap=None, lightMap=None, map=ImageTexture(imageUri=u'textures/checkerboard.png', repeat=(1.0, 1.0)), 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)), Points(geometry=BufferGeometry(attributes={'color': BufferAttribute(array=array([[1., 0., 0.],\n",
" [0., 1., 0.],\n",
" [0., 0., 1.],\n",
" [1., 0., 1.]], dtype=float32)), 'position': BufferAttribute(array=array([[-1., -1., 1.],\n",
" [ 1., -1., 1.],\n",
" [ 1., 1., 1.],\n",
" [-1., 1., 1.]], dtype=float32), normalized=False)}), material=PointsMaterial(color=u'#dddddd', map=None, size=5.0, sizeAttenuation=False, 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))), 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)), event=u'dblclick', object=None)], 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(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=(7.0710678118654755, 7.0710678118654755, 7.0710678118654755), 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([[1., 0., 0.],\n",
" [0., 1., 0.],\n",
" [0., 0., 1.],\n",
" [1., 0., 0.],\n",
" [0., 0., 1.],\n",
" [0., 0., 1.]], dtype=float32)), 'position': BufferAttribute(array=array([[-1., -1., 1.],\n",
" [1., 0., 1.]], dtype=float32)), 'index': BufferAttribute(array=array([0, 1, 2, 3, 4, 5], dtype=uint16), normalized=False), 'uv': BufferAttribute(array=array([[0., 0.],\n",
" [1., 0.],\n",
" [1., 1.],\n",
" [0., 0.],\n",
" [1., 1.],\n",
" [0., 1.]], dtype=float32)), 'position': BufferAttribute(array=array([[-1., -1., 1.],\n",
" [ 1., -1., 1.],\n",
" [ 1., 1., 1.],\n",
" [-1., -1., 1.],\n",
" [ 1., 1., 1.],\n",
" [-1., 1., 1.]], 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)), Points(geometry=BufferGeometry(attributes={'color': BufferAttribute(array=array([[1., 0., 0.],\n",
" [-1., 1., 1.]], dtype=float32), normalized=False)}), material=MeshLambertMaterial(alphaMap=None, aoMap=None, color=u'white', emissiveMap=None, envMap=None, lightMap=None, map=ImageTexture(imageUri=u'textures/checkerboard.png', repeat=(1.0, 1.0)), 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)), Points(geometry=BufferGeometry(attributes={'color': BufferAttribute(array=array([[1., 0., 0.],\n",
" [0., 1., 0.],\n",
" [0., 0., 1.],\n",
" [1., 0., 1.]], dtype=float32)), 'position': BufferAttribute(array=array([[-1., -1., 1.],\n",
......@@ -380,9 +379,19 @@
" [0, 0, 1]\n",
"]\n",
"\n",
"uvs = [\n",
" [0, 0],\n",
" [1, 0],\n",
" [1, 1],\n",
" [0, 1]\n",
"]\n",
"\n",
"ctx = meshvis.Context(width=300, height=300)\n",
"\n",
"ctx.draw_faces(verts, indices, colors= meshvis.PointAttribute(vcolors))\n",
"ctx.draw_faces(verts, indices, \n",
" colors = meshvis.PointAttribute(vcolors),\n",
" uvs = meshvis.PointAttribute(uvs),\n",
" texture = meshvis.ImageTexture(imageUri='textures/checkerboard.png'))\n",
"\n",
"ctx.draw_vertices(verts, point_size=5, colors=vcolors)\n",
"\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment