{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/plain": [ "roll (generic function with 1 method)" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "using Plots\n", "pyplot()\n", "function roll(k₁, k₂, k₃)\n", " x = append!(append!([(3i,3i) for i=30:-1:0],[(3i,0) for i=0:30]),\n", " [(90,3i) for i=0:30])\n", " @gif for (i,j) in x\n", "        plot(\n", "           θ->cos(k₁*θ),θ->sin(k₂*θ),θ->sin(k₃*θ),0,2π,\n", "          xlims=(-1,1), ylims=(-1,1),zlims=(-1,1), leg=false,\n", "            camera=(i,j)\n", "      )\n", " end\n", "end" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "\u001b[1m\u001b[36mINFO: \u001b[39m\u001b[22m\u001b[36mSaved animation to /mnt/juliabox/tmp.gif\n", "\u001b[39m" ] }, { "data": { "text/html": [ "\" />" ], "text/plain": [ "Plots.AnimatedGif(\"/mnt/juliabox/tmp.gif\")" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "roll(5,6,7)" ] } ], "metadata": { "kernelspec": { "display_name": "Julia 0.6.2", "language": "julia", "name": "julia-0.6" }, "language_info": { "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", "version": "0.6.2" } }, "nbformat": 4, "nbformat_minor": 2 }