{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import pgljupyter" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "tags": [] }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "c8d848a985ee4d11a9a7ca7b25902623", "version_major": 2, "version_minor": 0 }, "text/plain": [ "LsystemWidget(animate=True, derivationLength=101, is_magic=True, scene={'data': b'x\\xdaSLrw\\xf5\\xf7e`Pp\\xe0\\xe…" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%%lpy -u cm -w 1 -s 600,400 -a True\n", "\n", "from openalea.plantgl.all import *\n", "from math import radians\n", "\n", "Axiom: ;(1)+(10)_(2)F(10);(0)@g(Paraboloid(10,10,2,False))F(7)\n", "\n", "derivation length: 100\n", "production:\n", "\n", "F(x) --> F(x+0.2)\n", "\n", "@g(p) :\n", " produce @g(Paraboloid(p.radius + 0.15, p.height + 0.2, 2, False))\n", "\n", "_(x) --> _(x+0.02)\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "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.2" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": { "6c798a8f6e994e469bcfaf7b37d0df4c": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "c8d848a985ee4d11a9a7ca7b25902623": { "buffers": [ { "data": "eNpTTHJ39fdlYFBw4OVSUFZWZGdgYGBiZQjOSCxIZQaymTkYfBNLUosyE3OYgFxeDgbnypzMvJTUIhBXnIPBvygzNa8kNQWkWIKLISCxKDEpPyc/M4URKCDLxhCcnJiTCuYocDGEFCXmFecAzUsB6VYE6WGSYAj2cAxw9XSJN463NDEyNzI0MzY3NDc0NgNJs4FsYQADkBkNMTI19lcuGNrxQsQ4gEIODAwfHBmY2RmcgfYWxRsuCLxUZOOoy8/A4OCAZLopzHQToPEmpmasIN+BnMUAB8c3LzswPeqNIzYLZWGKGuxhWIKBoYPnapEJA8MJR1Q3GDTkny6yR7LcDMlrpsZmBiBvsRJvOapvbzgyMIIsAABThFkP", "encoding": "base64", "path": [ "scene", "data" ] } ], "model_module": "pgljupyter", "model_module_version": "^1.0.4", "model_name": "LsystemWidgetModel", "state": { "_model_module_version": "^1.0.4", "_view_module_version": "^1.0.4", "axes_helper": false, "derivationLength": 101, "is_magic": true, "layout": "IPY_MODEL_6c798a8f6e994e469bcfaf7b37d0df4c", "light_helper": false, "plane": true, "scene": { "derivationStep": 100, "id": 100, "scene": "" }, "size_display": [ 600, 400 ], "size_world": 1, "unit": 2 } } }, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 4 }