Skip to content

Commit 45a62a3

Browse files
committed
minor changes
1 parent 77b3ed4 commit 45a62a3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

examples/3_projects/simplex/simplex_curves-in-sphere.ipynb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"import copy\n",
1717
"import math\n",
1818
"import numpy as np\n",
19-
"from matplotlib import cm\n",
2019
"\n",
2120
"from plotoptix import TkOptiX\n",
2221
"from plotoptix.materials import m_diffuse, m_plastic, m_metallic, m_clear_glass\n",
@@ -292,7 +291,7 @@
292291
],
293292
"metadata": {
294293
"kernelspec": {
295-
"display_name": "Python 3",
294+
"display_name": "Python 3 (ipykernel)",
296295
"language": "python",
297296
"name": "python3"
298297
},
@@ -306,7 +305,7 @@
306305
"name": "python",
307306
"nbconvert_exporter": "python",
308307
"pygments_lexer": "ipython3",
309-
"version": "3.7.4"
308+
"version": "3.10.6"
310309
}
311310
},
312311
"nbformat": 4,

examples/3_projects/simplex/simplex_curves_basic.ipynb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"outputs": [],
88
"source": [
99
"import numpy as np\n",
10-
"from matplotlib import cm\n",
10+
"import matplotlib\n",
1111
"\n",
1212
"from plotoptix import TkOptiX\n",
1313
"from plotoptix.materials import m_plastic, m_metallic\n",
@@ -46,6 +46,7 @@
4646
"rnd = simplex(inp)\n",
4747
"\n",
4848
"rprev = np.copy(rnd)\n",
49+
"cmap = matplotlib.colormaps[\"bone\"]\n",
4950
"for t in range(n):\n",
5051
" rt = 2.0 * (t+1) / (n+2) - 1\n",
5152
" rt = 1 - rt*rt\n",
@@ -59,7 +60,7 @@
5960
" pos[c,t] = inp[c,0,:3]\n",
6061
" \n",
6162
" fi = (1/(dt*dt)) * np.dot(rnd[c], rprev[c])\n",
62-
" cc = cm.get_cmap(\"bone\")(np.power(2*fi-1,19))[:3]\n",
63+
" cc = cmap(np.power(2*fi-1,19))[:3]\n",
6364
" col[c,t] = make_color(cc)\n",
6465
" \n",
6566
" rprev = np.copy(rnd)\n",
@@ -125,7 +126,7 @@
125126
],
126127
"metadata": {
127128
"kernelspec": {
128-
"display_name": "Python 3",
129+
"display_name": "Python 3 (ipykernel)",
129130
"language": "python",
130131
"name": "python3"
131132
},
@@ -139,7 +140,7 @@
139140
"name": "python",
140141
"nbconvert_exporter": "python",
141142
"pygments_lexer": "ipython3",
142-
"version": "3.7.4"
143+
"version": "3.10.6"
143144
}
144145
},
145146
"nbformat": 4,

0 commit comments

Comments
 (0)