|
230 | 230 | "display(renderer)"
|
231 | 231 | ]
|
232 | 232 | },
|
233 |
| - { |
234 |
| - "cell_type": "markdown", |
235 |
| - "metadata": {}, |
236 |
| - "source": [ |
237 |
| - "# Camera" |
238 |
| - ] |
239 |
| - }, |
240 |
| - { |
241 |
| - "cell_type": "code", |
242 |
| - "execution_count": null, |
243 |
| - "metadata": { |
244 |
| - "collapsed": false |
245 |
| - }, |
246 |
| - "outputs": [], |
247 |
| - "source": [ |
248 |
| - "geometry = SphereGeometry(radius=4)\n", |
249 |
| - "t = ImageTexture(imageuri='')\n", |
250 |
| - "material = LambertMaterial(color='white', map=t)\n", |
251 |
| - "\n", |
252 |
| - "sphere = Mesh(geometry=geometry, material=material)\n", |
253 |
| - "\n", |
254 |
| - "point = Mesh(geometry=SphereGeometry(radius=.1), \n", |
255 |
| - " material=LambertMaterial(color='red'))\n", |
256 |
| - "\n", |
257 |
| - "\n", |
258 |
| - "c = PerspectiveCamera(position=[0, 10, 10], fov=40,\n", |
259 |
| - " children=[DirectionalLight(color='white', \n", |
260 |
| - " position=[3,5,1], \n", |
261 |
| - " intensity=0.5)])\n", |
262 |
| - "\n", |
263 |
| - "scene = Scene(children=[sphere, point, AmbientLight(color='#777777')])\n", |
264 |
| - "p=Picker(event='mousemove', root=sphere)\n", |
265 |
| - "renderer = Renderer(camera=c, scene=scene, controls=[OrbitControls(controlling=c), p])\n", |
266 |
| - "coords = Text()\n", |
267 |
| - "display(coords)\n", |
268 |
| - "display(renderer)\n", |
269 |
| - "\n", |
270 |
| - "#dlink((p,'point'), (point, 'position'), (coords, 'value'))\n", |
271 |
| - "#\n", |
272 |
| - "#camera=WebCamera()\n", |
273 |
| - "#display(camera)\n", |
274 |
| - "#display(Link(widgets=[[camera, 'imageurl'], [t, 'imageuri']]))" |
275 |
| - ] |
276 |
| - }, |
277 | 233 | {
|
278 | 234 | "cell_type": "markdown",
|
279 | 235 | "metadata": {},
|
|
326 | 282 | "source": [
|
327 | 283 | "# Examples to do\n",
|
328 | 284 | "- image texture (with webcam picture!)\n",
|
329 |
| - "- set background color\n", |
330 | 285 | "- animate something through space\n",
|
331 | 286 | "- scaled object: point that doesn't change size\n",
|
332 | 287 | "- vertex shade\n",
|
333 | 288 | "- parametric geometry\n",
|
334 |
| - "- switch between phong, lambert, depth, and wireframe materials, normalmaterial\n" |
| 289 | + "- switch between phong, lambert, depth, and wireframe materials, normalmaterial" |
335 | 290 | ]
|
336 | 291 | }
|
337 | 292 | ],
|
|
0 commit comments