{ "cells": [ { "cell_type": "code", "execution_count": null, "id": "8b121d33", "metadata": {}, "outputs": [], "source": [ "import k3d\n", "import numpy as np" ] }, { "cell_type": "code", "execution_count": null, "id": "82f20dbe", "metadata": {}, "outputs": [], "source": [ "s = 2000\n", "planes = []\n", "\n", "for idx, i in enumerate(np.linspace(0, 0.01, 10)):\n", " planes.append(\n", " k3d.mesh([-s, i, -s,\n", " s, i, -s,\n", " s, i, s,\n", " -s, i, s],\n", " [0, 1, 2,\n", " 2, 3, 0], color=k3d.nice_colors[idx % 21])\n", " )\n", " \n", "camera = [49.83663876247088,\n", " -88.39210943730646,\n", " -72.69520130183793,\n", " 0,\n", " 0,\n", " 0,\n", " 0.32447335829264295,\n", " -0.5361534842542378,\n", " 0.7792666302879482]" ] }, { "cell_type": "code", "execution_count": null, "id": "142c2590", "metadata": {}, "outputs": [], "source": [ "# with logarithmic_depth_buffer\n", "plot1 = k3d.plot(camera_auto_fit=False)\n", "\n", "plot1.camera = camera\n", "for p in planes:\n", " plot1 += p\n", "\n", "plot1.display()" ] }, { "cell_type": "code", "execution_count": null, "id": "91bb8465", "metadata": {}, "outputs": [], "source": [ "# without logarithmic_depth_buffer\n", "plot2 = k3d.plot(logarithmic_depth_buffer=False, camera_auto_fit=False)\n", "\n", "plot2.camera = camera\n", "for p in planes:\n", " plot2 += p\n", "\n", "plot2.display()" ] }, { "cell_type": "code", "execution_count": null, "id": "25afb255", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.8.12" } }, "nbformat": 4, "nbformat_minor": 5 }