Disabled external gits
This commit is contained in:
@@ -0,0 +1,311 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import meshplot as mp\n",
|
||||
"import numpy as np\n",
|
||||
"import sys\n",
|
||||
"import json\n",
|
||||
"from matplotlib import pyplot as plt\n",
|
||||
"sys.path.append(\"../src/\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# 1. Load OBJ model"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"with open('../data/gym.json', 'r') as infile:\n",
|
||||
" [V, F] = json.load(infile)\n",
|
||||
" V = np.array(V)\n",
|
||||
" F = np.array(F)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# 2. Mesh Plotting"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"def draw_mesh(V, F):\n",
|
||||
" shading = {\"flat\":True, # Flat or smooth shading of triangles\n",
|
||||
" \"wireframe\":True, \"wire_width\": 0.03, \"wire_color\": \"black\", # Wireframe rendering\n",
|
||||
" \"width\": 600, \"height\": 600, # Size of the viewer canvas\n",
|
||||
" \"antialias\": True, # Antialising, might not work on all GPUs\n",
|
||||
" \"scale\": 2.0, # Scaling of the model\n",
|
||||
" \"side\": \"DoubleSide\", # FrontSide, BackSide or DoubleSide rendering of the triangles\n",
|
||||
" \"colormap\": \"viridis\", \"normalize\": [None, None], # Colormap and normalization for colors\n",
|
||||
" \"background\": \"#ffffff\", # Background color of the canvas\n",
|
||||
" \"line_width\": 1.0, \"line_color\": \"black\", # Line properties of overlay lines\n",
|
||||
" \"bbox\": False, # Enable plotting of bounding box\n",
|
||||
" \"point_color\": \"red\", \"point_size\": 0.01 # Point properties of overlay points\n",
|
||||
" }\n",
|
||||
" #p = mp.plot(V, F, shading=shading, return_plot=True)\n",
|
||||
" mp.plot(V, F)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"/home/sora/.local/lib/python3.9/site-packages/jupyter_client/session.py:716: UserWarning: Message serialization failed with:\n",
|
||||
"Out of range float values are not JSON compliant\n",
|
||||
"Supporting this message is deprecated in jupyter-client 7, please make sure your message is JSON-compliant\n",
|
||||
" content = self.pack(content)\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"application/vnd.jupyter.widget-view+json": {
|
||||
"model_id": "c463e93a5b0044fbba0746c52a887176",
|
||||
"version_major": 2,
|
||||
"version_minor": 0
|
||||
},
|
||||
"text/plain": [
|
||||
"Renderer(camera=PerspectiveCamera(children=(DirectionalLight(color='white', intensity=0.6, position=(0.5660395…"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"draw_mesh(V, F)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# 3. Mesh Centroid Plotting"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from geometry import compute_mesh_centroid\n",
|
||||
"def draw_mesh_with_centroid(V, F):\n",
|
||||
" shading = {\"flat\":True, # Flat or smooth shading of triangles\n",
|
||||
" \"wireframe\":True, \"wire_width\": 0.03, \"wire_color\": \"black\", # Wireframe rendering\n",
|
||||
" \"width\": 600, \"height\": 600, # Size of the viewer canvas\n",
|
||||
" \"antialias\": True, # Antialising, might not work on all GPUs\n",
|
||||
" \"scale\": 2.0, # Scaling of the model\n",
|
||||
" \"side\": \"DoubleSide\", # FrontSide, BackSide or DoubleSide rendering of the triangles\n",
|
||||
" \"colormap\": \"viridis\", \"normalize\": [None, None], # Colormap and normalization for colors\n",
|
||||
" \"background\": \"#ffffff\", # Background color of the canvas\n",
|
||||
" \"line_width\": 1.0, \"line_color\": \"black\", # Line properties of overlay lines\n",
|
||||
" \"bbox\": False, # Enable plotting of bounding box\n",
|
||||
" \"point_color\": \"red\", \"point_size\": 0.01 # Point properties of overlay points\n",
|
||||
" }\n",
|
||||
" mesh_plot = mp.plot(V, F, shading=shading, return_plot=True)\n",
|
||||
" center0 = np.array(compute_mesh_centroid(V, F))\n",
|
||||
" center1 = center0.copy()\n",
|
||||
" center1[1] = 0\n",
|
||||
" vertices = np.vstack([center0, center1])\n",
|
||||
" mesh_plot.add_points(vertices, shading={\"point_color\": \"black\", \"point_size\": 0.1})\n",
|
||||
" mesh_plot.add_edges(vertices, np.array([[0, 1]]), shading={\"line_color\": \"black\", \"line_width\" : 0.5});"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"application/vnd.jupyter.widget-view+json": {
|
||||
"model_id": "4f0181b991864ebe91e419ff21dbb932",
|
||||
"version_major": 2,
|
||||
"version_minor": 0
|
||||
},
|
||||
"text/plain": [
|
||||
"Renderer(camera=PerspectiveCamera(children=(DirectionalLight(color='white', intensity=0.6, position=(0.5660395…"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
},
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"[0.70220297 0.14449098 0. ]\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"draw_mesh_with_centroid(V, F)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# 4. Shearing Transformation"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from ipywidgets import interact, interactive, fixed, interact_manual\n",
|
||||
"import ipywidgets as widgets\n",
|
||||
"from shear import shear_transformation\n",
|
||||
"def draw_mesh_after_shear_transformation(V, F, nu):\n",
|
||||
" V1 = shear_transformation(V, nu)\n",
|
||||
" draw_mesh_with_centroid(V1, F)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 8,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"application/vnd.jupyter.widget-view+json": {
|
||||
"model_id": "29b3847a9adc46aab07c80e2d794a69c",
|
||||
"version_major": 2,
|
||||
"version_minor": 0
|
||||
},
|
||||
"text/plain": [
|
||||
"interactive(children=(FloatSlider(value=0.0, description='nu', max=1.0, min=-1.0), Output()), _dom_classes=('w…"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"interact(draw_mesh_after_shear_transformation, V = fixed(V), F = fixed(F), nu = (-1, 1, 0.1));"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# 5. Shear Equilibrium"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 9,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from shear import shear_equilibrium\n",
|
||||
"from geometry import compute_center_support_line\n",
|
||||
"def compute_equilibrium_mesh(V, F):\n",
|
||||
" x_csl = compute_center_support_line(V)\n",
|
||||
" V1 = shear_equilibrium(V, F, x_csl)\n",
|
||||
" draw_mesh_with_centroid(V1, F)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Copy the following codes and find equilibrium shapes for all other examples in ../data folder "
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 10,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"application/vnd.jupyter.widget-view+json": {
|
||||
"model_id": "1a828dcd3277486da42e79e5865c4917",
|
||||
"version_major": 2,
|
||||
"version_minor": 0
|
||||
},
|
||||
"text/plain": [
|
||||
"Renderer(camera=PerspectiveCamera(children=(DirectionalLight(color='white', intensity=0.6, position=(0.5046897…"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
},
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"[0.63531671 0.39031879 0. ]\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"with open('../data/dinosaur.json', 'r') as infile:\n",
|
||||
" [V, F] = json.load(infile)\n",
|
||||
" V = np.array(V)\n",
|
||||
" F = np.array(F)\n",
|
||||
" compute_equilibrium_mesh(V, F)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "gc_course_env",
|
||||
"language": "python",
|
||||
"name": "gc_course_env"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.9.7"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 4
|
||||
}
|
374
cs457-gc/assignment_1_1/notebook/make_it_stand_nb1.ipynb
Normal file
374
cs457-gc/assignment_1_1/notebook/make_it_stand_nb1.ipynb
Normal file
@@ -0,0 +1,374 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import meshplot as mp\n",
|
||||
"import numpy as np\n",
|
||||
"import sys\n",
|
||||
"import json\n",
|
||||
"from matplotlib import pyplot as plt\n",
|
||||
"sys.path.append(\"../src/\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# 1. Load OBJ model"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"with open('../data/gym.json', 'r') as infile:\n",
|
||||
" [V, F] = json.load(infile)\n",
|
||||
" V = np.array(V)\n",
|
||||
" F = np.array(F)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# 2. Mesh Plotting"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"def draw_mesh(V, F):\n",
|
||||
" shading = {\"flat\":True, # Flat or smooth shading of triangles\n",
|
||||
" \"wireframe\":True, \"wire_width\": 0.03, \"wire_color\": \"black\", # Wireframe rendering\n",
|
||||
" \"width\": 600, \"height\": 600, # Size of the viewer canvas\n",
|
||||
" \"antialias\": True, # Antialising, might not work on all GPUs\n",
|
||||
" \"scale\": 2.0, # Scaling of the model\n",
|
||||
" \"side\": \"DoubleSide\", # FrontSide, BackSide or DoubleSide rendering of the triangles\n",
|
||||
" \"colormap\": \"viridis\", \"normalize\": [None, None], # Colormap and normalization for colors\n",
|
||||
" \"background\": \"#ffffff\", # Background color of the canvas\n",
|
||||
" \"line_width\": 1.0, \"line_color\": \"black\", # Line properties of overlay lines\n",
|
||||
" \"bbox\": False, # Enable plotting of bounding box\n",
|
||||
" \"point_color\": \"red\", \"point_size\": 0.01 # Point properties of overlay points\n",
|
||||
" }\n",
|
||||
" #p = mp.plot(V, F, shading=shading, return_plot=True)\n",
|
||||
" mp.plot(V, F)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"/home/sora/.local/lib/python3.9/site-packages/jupyter_client/session.py:716: UserWarning: Message serialization failed with:\n",
|
||||
"Out of range float values are not JSON compliant\n",
|
||||
"Supporting this message is deprecated in jupyter-client 7, please make sure your message is JSON-compliant\n",
|
||||
" content = self.pack(content)\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"application/vnd.jupyter.widget-view+json": {
|
||||
"model_id": "10f6965f0b774229b05913c93cc79731",
|
||||
"version_major": 2,
|
||||
"version_minor": 0
|
||||
},
|
||||
"text/plain": [
|
||||
"Renderer(camera=PerspectiveCamera(children=(DirectionalLight(color='white', intensity=0.6, position=(0.5660395…"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"draw_mesh(V, F)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# 3. Mesh Centroid Plotting"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from geometry import compute_mesh_centroid\n",
|
||||
"def draw_mesh_with_centroid(V, F):\n",
|
||||
" shading = {\"flat\":True, # Flat or smooth shading of triangles\n",
|
||||
" \"wireframe\":True, \"wire_width\": 0.03, \"wire_color\": \"black\", # Wireframe rendering\n",
|
||||
" \"width\": 600, \"height\": 600, # Size of the viewer canvas\n",
|
||||
" \"antialias\": True, # Antialising, might not work on all GPUs\n",
|
||||
" \"scale\": 2.0, # Scaling of the model\n",
|
||||
" \"side\": \"DoubleSide\", # FrontSide, BackSide or DoubleSide rendering of the triangles\n",
|
||||
" \"colormap\": \"viridis\", \"normalize\": [None, None], # Colormap and normalization for colors\n",
|
||||
" \"background\": \"#ffffff\", # Background color of the canvas\n",
|
||||
" \"line_width\": 1.0, \"line_color\": \"black\", # Line properties of overlay lines\n",
|
||||
" \"bbox\": False, # Enable plotting of bounding box\n",
|
||||
" \"point_color\": \"red\", \"point_size\": 0.01 # Point properties of overlay points\n",
|
||||
" }\n",
|
||||
" mesh_plot = mp.plot(V, F, shading=shading, return_plot=True)\n",
|
||||
" center0 = np.array(compute_mesh_centroid(V, F))\n",
|
||||
" center1 = center0.copy()\n",
|
||||
" center1[1] = 0\n",
|
||||
" vertices = np.vstack([center0, center1])\n",
|
||||
" mesh_plot.add_points(vertices, shading={\"point_color\": \"black\", \"point_size\": 0.1})\n",
|
||||
" mesh_plot.add_edges(vertices, np.array([[0, 1]]), shading={\"line_color\": \"black\", \"line_width\" : 0.5});"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"application/vnd.jupyter.widget-view+json": {
|
||||
"model_id": "183e46c464694a4faf5cd2c46de6f0b3",
|
||||
"version_major": 2,
|
||||
"version_minor": 0
|
||||
},
|
||||
"text/plain": [
|
||||
"Renderer(camera=PerspectiveCamera(children=(DirectionalLight(color='white', intensity=0.6, position=(0.5660395…"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"draw_mesh_with_centroid(V, F)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# 4. Shearing Transformation"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from ipywidgets import interact, interactive, fixed, interact_manual\n",
|
||||
"import ipywidgets as widgets\n",
|
||||
"from shear import shear_transformation\n",
|
||||
"def draw_mesh_after_shear_transformation(V, F, nu):\n",
|
||||
" V1 = shear_transformation(V, nu)\n",
|
||||
" draw_mesh_with_centroid(V1, F)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 8,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"application/vnd.jupyter.widget-view+json": {
|
||||
"model_id": "89d3fc02da0847b598183789c019b6da",
|
||||
"version_major": 2,
|
||||
"version_minor": 0
|
||||
},
|
||||
"text/plain": [
|
||||
"interactive(children=(FloatSlider(value=0.0, description='nu', max=1.0, min=-1.0), Output()), _dom_classes=('w…"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"interact(draw_mesh_after_shear_transformation, V = fixed(V), F = fixed(F), nu = (-1, 1, 0.1));"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# 5. Shear Equilibrium"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 9,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from shear import shear_equilibrium\n",
|
||||
"from geometry import compute_center_support_line\n",
|
||||
"def compute_equilibrium_mesh(V, F):\n",
|
||||
" x_csl = compute_center_support_line(V)\n",
|
||||
" V1 = shear_equilibrium(V, F, x_csl)\n",
|
||||
" draw_mesh_with_centroid(V1, F)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Copy the following codes and find equilibrium shapes for all other examples in ../data folder "
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 11,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"application/vnd.jupyter.widget-view+json": {
|
||||
"model_id": "9a4f8c51812b477ea4a39f964a209826",
|
||||
"version_major": 2,
|
||||
"version_minor": 0
|
||||
},
|
||||
"text/plain": [
|
||||
"Renderer(camera=PerspectiveCamera(children=(DirectionalLight(color='white', intensity=0.6, position=(0.3502894…"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"with open('../data/dance.json', 'r') as infile:\n",
|
||||
" [V, F] = json.load(infile)\n",
|
||||
" V = np.array(V)\n",
|
||||
" F = np.array(F)\n",
|
||||
" compute_equilibrium_mesh(V, F)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 12,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"application/vnd.jupyter.widget-view+json": {
|
||||
"model_id": "37e4dae7a1c540a4899ae36f48424cc3",
|
||||
"version_major": 2,
|
||||
"version_minor": 0
|
||||
},
|
||||
"text/plain": [
|
||||
"Renderer(camera=PerspectiveCamera(children=(DirectionalLight(color='white', intensity=0.6, position=(0.3594106…"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"with open('../data/dinosaur.json', 'r') as infile:\n",
|
||||
" [V, F] = json.load(infile)\n",
|
||||
" V = np.array(V)\n",
|
||||
" F = np.array(F)\n",
|
||||
" compute_equilibrium_mesh(V, F)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 13,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"application/vnd.jupyter.widget-view+json": {
|
||||
"model_id": "ae4038d1f44949b08cf9bb12b2f55d22",
|
||||
"version_major": 2,
|
||||
"version_minor": 0
|
||||
},
|
||||
"text/plain": [
|
||||
"Renderer(camera=PerspectiveCamera(children=(DirectionalLight(color='white', intensity=0.6, position=(0.0364573…"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"with open('../data/fans.json', 'r') as infile:\n",
|
||||
" [V, F] = json.load(infile)\n",
|
||||
" V = np.array(V)\n",
|
||||
" F = np.array(F)\n",
|
||||
" compute_equilibrium_mesh(V, F)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"application/vnd.jupyter.widget-view+json": {
|
||||
"model_id": "ebee92986c1b47b683c696990b8bb13b",
|
||||
"version_major": 2,
|
||||
"version_minor": 0
|
||||
},
|
||||
"text/plain": [
|
||||
"Renderer(camera=PerspectiveCamera(children=(DirectionalLight(color='white', intensity=0.6, position=(0.4445750…"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"with open('../data/gym.json', 'r') as infile:\n",
|
||||
" [V, F] = json.load(infile)\n",
|
||||
" V = np.array(V)\n",
|
||||
" F = np.array(F)\n",
|
||||
" compute_equilibrium_mesh(V, F)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "gc_course_env",
|
||||
"language": "python",
|
||||
"name": "gc_course_env"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.9.7"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 4
|
||||
}
|
Reference in New Issue
Block a user