From 32b8f13d8f9483e0742376508c3ae4b94763f1b2 Mon Sep 17 00:00:00 2001 From: Vikram Date: Sun, 21 Feb 2021 19:36:40 -0700 Subject: [PATCH 01/18] implemented dist() and made a test for dist --- spark/core.py | 3 + spark/util/helper_functions/misc_functions.py | 8 + startserver.bat | 1 + test/DistTest.ipynb | 266 ++++++++++++++++++ 4 files changed, 278 insertions(+) create mode 100644 startserver.bat create mode 100644 test/DistTest.ipynb diff --git a/spark/core.py b/spark/core.py index 46ba78b..6438670 100644 --- a/spark/core.py +++ b/spark/core.py @@ -463,3 +463,6 @@ def collided(self, *args): pass @extern def axis_overlapped(self, *args): pass + + @extern + def dist(self, *args): pass diff --git a/spark/util/helper_functions/misc_functions.py b/spark/util/helper_functions/misc_functions.py index 92b5f9e..4d02b30 100644 --- a/spark/util/helper_functions/misc_functions.py +++ b/spark/util/helper_functions/misc_functions.py @@ -4,6 +4,7 @@ from ..Errors import * from numbers import Real from math import pi +from math import sqrt import random @@ -131,3 +132,10 @@ def helper_axis_overlapped(self, *args): return point1 + length1 >= point2 and point2 + length2 >= point1 else: return point1 + length1 > point2 and point2 + length2 > point1 + +@validate_args([Real, Real, Real, Real]) +@ignite_global +def helper_dist(self, *args): + x1, y1, x2, y2 = args[:4] + return sqrt((y2 - y1)**2 + (x2 - x1)**2) + diff --git a/startserver.bat b/startserver.bat new file mode 100644 index 0000000..600d9ee --- /dev/null +++ b/startserver.bat @@ -0,0 +1 @@ +jupyter lab \ No newline at end of file diff --git a/test/DistTest.ipynb b/test/DistTest.ipynb new file mode 100644 index 0000000..65ee102 --- /dev/null +++ b/test/DistTest.ipynb @@ -0,0 +1,266 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "formal-canberra", + "metadata": {}, + "outputs": [], + "source": [ + "import spark\n", + "%reload_ext spark" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "valid-northeast", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
Done drawing.\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "Done drawing.\n", + "\\end{Verbatim}\n" + ], + "text/plain": [ + "Done drawing." + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "d2b6088e05284531a522c5c2ba0fa37f", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Canvas(height=100, width=100)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
1.4142135623730951\n",
+       "0.0\n",
+       "15.556349186104045\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "\\PY{l+m+mf}{1}\\PY{l+m+mf}{.4142135623730951}\n", + "\\PY{l+m+mf}{0}\\PY{l+m+mf}{.0}\n", + "\\PY{l+m+mf}{15}\\PY{l+m+mf}{.556349186104045}\n", + "\\end{Verbatim}\n" + ], + "text/plain": [ + "1.4142135623730951\n", + "0.0\n", + "15.556349186104045" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%%ignite\n", + "\n", + "# distance between (1,1) and (2,2) sqrt(2) which is about 1.414\n", + "print(dist(1,1,2,2))\n", + "\n", + "# distance between (1,1) and (1,1) is 0\n", + "print(dist(1,1,1,1))\n", + "\n", + "# distance between (-1,-1) and (10,10) is sqrt(242) which is about 15.56\n", + "print(dist(-1,-1,10,10))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "tired-sculpture", + "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.8.6" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} From 49b0b6856a8b15ccb08281348a2f4fa2adbaef46 Mon Sep 17 00:00:00 2001 From: Vikram Date: Sun, 21 Feb 2021 19:37:36 -0700 Subject: [PATCH 02/18] implemented dist() and made a test for dist --- startserver.bat | 1 - 1 file changed, 1 deletion(-) delete mode 100644 startserver.bat diff --git a/startserver.bat b/startserver.bat deleted file mode 100644 index 600d9ee..0000000 --- a/startserver.bat +++ /dev/null @@ -1 +0,0 @@ -jupyter lab \ No newline at end of file From 82c64081c569e6e24c5e7d7b3ef75858e640ee6e Mon Sep 17 00:00:00 2001 From: Vikram Date: Mon, 22 Feb 2021 11:52:39 -0700 Subject: [PATCH 03/18] finished docs --- docs/img/dist.png | Bin 0 -> 6203 bytes docs/img/dist_2.png | Bin 0 -> 4640 bytes docs/utilities.md | 34 ++++++++++++++++++++++++- test/DistTest.ipynb | 60 ++++++++++++++++++++++++++------------------ 4 files changed, 69 insertions(+), 25 deletions(-) create mode 100644 docs/img/dist.png create mode 100644 docs/img/dist_2.png diff --git a/docs/img/dist.png b/docs/img/dist.png new file mode 100644 index 0000000000000000000000000000000000000000..5c5a58ea2c3c00be50be4e6f4b623d9b682dd2b9 GIT binary patch literal 6203 zcmds*{a;eqzQ;FNXh(+BN-;@I(`LqpP%FU@LK zJ1IYVwB9K3jE`ZWt6}a11Y@;3kWM$)eQWdXTYiNQ3whRI65V zBO>@2+J*i{jg8wQTLzjht0rfz+OVFo$5Mx~19;TIJ!uPNacQ%oF9&5}o}zBEooqs^ zpOuPsov=;~uZrY99xu$$EUl`yZd1F3Xv9r?cM=QF0mHE+3$yq6b)HjE{k%QXMUh~Z~wNWJRK zS99*hZFHxU^P+~-9{=k1+@#Z#8*Z*ik9qDLli#^7OrPtcm*Apy9DUWhaTOYj-XAYS zC!48eb|TH=)tqEgY|zDtm-ElBuH%09tp2Dk9(m({i?@xuqR{l9feyRo6kEciPK&F3 z^qcWWkI(SC^pJ8URsjzQiOZ;ZB&G`t#xD{Yk5|r*f-Mg!Rvn;yjr(u!8GsVMa`HG zG1>+xT+c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DMLPQsniOn4CCvLdQ^z;S_Xdrrq^lK?rhj2tfiqHi8m4&${*;(R4=zw`aJ2kyVcmQ?m$aNO z(wnS-Yx
1.4142135623730951\n",
-       "0.0\n",
-       "15.556349186104045\n",
+       ".output_html .il { color: #666666 } /* Literal.Number.Integer.Long */
\n",
        "
\n" ], "text/latex": [ "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", - "\\PY{l+m+mf}{1}\\PY{l+m+mf}{.4142135623730951}\n", - "\\PY{l+m+mf}{0}\\PY{l+m+mf}{.0}\n", - "\\PY{l+m+mf}{15}\\PY{l+m+mf}{.556349186104045}\n", + "\n", "\\end{Verbatim}\n" ], - "text/plain": [ - "1.4142135623730951\n", - "0.0\n", - "15.556349186104045" - ] + "text/plain": [] }, "metadata": {}, "output_type": "display_data" @@ -223,20 +215,40 @@ "source": [ "%%ignite\n", "\n", - "# distance between (1,1) and (2,2) sqrt(2) which is about 1.414\n", - "print(dist(1,1,2,2))\n", - "\n", - "# distance between (1,1) and (1,1) is 0\n", - "print(dist(1,1,1,1))\n", - "\n", - "# distance between (-1,-1) and (10,10) is sqrt(242) which is about 15.56\n", - "print(dist(-1,-1,10,10))" + "def setup():\n", + " # set up window size\n", + " size(500, 500)\n", + " \n", + " # draw point at (125, 125)\n", + " fill_circle(125, 125, 10)\n", + " text(\"(125, 125)\", 125, 107)\n", + " \n", + " # draw point at (375, 375)\n", + " fill_circle(375, 375, 10)\n", + " text(\"(375, 375)\", 375, 357)\n", + " \n", + " # draw a line between the points\n", + " stroke_style(\"red\")\n", + " draw_line(125, 125, 375, 375)\n", + " \n", + " # write distance between points as text\n", + " text(\"The distance between the two points is about \", 260, 240)\n", + " text(dist(125, 125, 375, 375), 280, 260)\n", + " text(\"pixels!\", 393, 260)" ] }, { "cell_type": "code", "execution_count": null, - "id": "tired-sculpture", + "id": "seasonal-oklahoma", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "located-terrorism", "metadata": {}, "outputs": [], "source": [] From 859a212bed8814c49d68563eee513ca5ae944361 Mon Sep 17 00:00:00 2001 From: Vikram Date: Mon, 22 Feb 2021 15:22:27 -0700 Subject: [PATCH 04/18] fixed test --- test/DistTest.ipynb | 50 ++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/test/DistTest.ipynb b/test/DistTest.ipynb index c7ca127..5566c9b 100644 --- a/test/DistTest.ipynb +++ b/test/DistTest.ipynb @@ -2,8 +2,8 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, - "id": "quarterly-slope", + "execution_count": 2, + "id": "wanted-crown", "metadata": {}, "outputs": [], "source": [ @@ -13,8 +13,8 @@ }, { "cell_type": "code", - "execution_count": 23, - "id": "narrow-vessel", + "execution_count": 5, + "id": "european-lewis", "metadata": {}, "outputs": [ { @@ -111,7 +111,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "0b00da91470f429893d34c68e1d334f1", + "model_id": "67ec2a95eafc4430abe3bcc14f232ec2", "version_major": 2, "version_minor": 0 }, @@ -198,15 +198,17 @@ ".output_html .vg { color: #19177C } /* Name.Variable.Global */\n", ".output_html .vi { color: #19177C } /* Name.Variable.Instance */\n", ".output_html .vm { color: #19177C } /* Name.Variable.Magic */\n", - ".output_html .il { color: #666666 } /* Literal.Number.Integer.Long */
\n",
+       ".output_html .il { color: #666666 } /* Literal.Number.Integer.Long */
ERROR! Expected distance to be 6 actual value:  5.0\n",
        "
\n" ], "text/latex": [ "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", - "\n", + "ERROR! Expected distance to be 6 actual value: 5.0\n", "\\end{Verbatim}\n" ], - "text/plain": [] + "text/plain": [ + "ERROR! Expected distance to be 6 actual value: 5.0" + ] }, "metadata": {}, "output_type": "display_data" @@ -216,31 +218,29 @@ "%%ignite\n", "\n", "def setup():\n", - " # set up window size\n", - " size(500, 500)\n", " \n", - " # draw point at (125, 125)\n", - " fill_circle(125, 125, 10)\n", - " text(\"(125, 125)\", 125, 107)\n", + " # defining x and y coordinate for first point\n", + " x1 = 1\n", + " y1 = 2\n", + " \n", + " # defining x and y coordinates for second point\n", + " x2 = 4\n", + " y2 = 6\n", " \n", - " # draw point at (375, 375)\n", - " fill_circle(375, 375, 10)\n", - " text(\"(375, 375)\", 375, 357)\n", + " # the distance between (1,2) and (4,6) is 5\n", + " expected_value = 5\n", " \n", - " # draw a line between the points\n", - " stroke_style(\"red\")\n", - " draw_line(125, 125, 375, 375)\n", + " # use dist function to calculate distance between the points (x1, y1) and (x2, y2) \n", + " actual_value = dist(x1, y1, x2, y2)\n", " \n", - " # write distance between points as text\n", - " text(\"The distance between the two points is about \", 260, 240)\n", - " text(dist(125, 125, 375, 375), 280, 260)\n", - " text(\"pixels!\", 393, 260)" + " if abs(expected_value - actual_value) > 0.001: # Floating point comparison\n", + " print(\"ERROR! Expected distance to be\", expected_value, \"actual value: \", actual_value)" ] }, { "cell_type": "code", "execution_count": null, - "id": "seasonal-oklahoma", + "id": "surprised-increase", "metadata": {}, "outputs": [], "source": [] @@ -248,7 +248,7 @@ { "cell_type": "code", "execution_count": null, - "id": "located-terrorism", + "id": "commercial-toolbox", "metadata": {}, "outputs": [], "source": [] From 1ea80fd2ca6d8fa6fc3f07ea06358ad4a9a3a986 Mon Sep 17 00:00:00 2001 From: Tim Date: Mon, 22 Feb 2021 17:27:24 -0700 Subject: [PATCH 05/18] Added a FRAME_RATE variable to global_constants{} Not sure if this is the right place to put it but I was getting a key error trying to put it as property --- spark/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spark/core.py b/spark/core.py index 46ba78b..acf64e2 100644 --- a/spark/core.py +++ b/spark/core.py @@ -31,7 +31,8 @@ class Core: # All constants that will be injected into global scope in the user"s cell global_constants = { - "pi": pi + "pi": pi, + "FRAME_RATE": FRAME_RATE } ignite_globals = _ignite_globals From 43b4432e3041891ac4e0e2e78f383b21297ac0a1 Mon Sep 17 00:00:00 2001 From: Tim Date: Sat, 27 Feb 2021 21:31:58 -0700 Subject: [PATCH 06/18] Added documentation mentioning the frame rate --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 1a9d138..335b753 100644 --- a/docs/index.md +++ b/docs/index.md @@ -102,7 +102,7 @@ def setup(): size(200, 200) # You can change 200, 200 to any integers ``` -You can also use the draw() function, which will execute the code constantly that is inside it. This makes it ideal for things like animation, and any code that will update itself over time. **Most of the time this will be the setup you want**: +You can also use the draw() function, which will execute the code constantly that is inside it. The draw function executes 30 times per second. This makes it ideal for things like animation, and any code that will update itself over time. **Most of the time this will be the setup you want**: ```python %%ignite From 3631226f018308eb9263e1b5c148994ebc754a04 Mon Sep 17 00:00:00 2001 From: Tim Date: Sat, 27 Feb 2021 21:35:55 -0700 Subject: [PATCH 07/18] Unit test for for frame rate tests different cases of trying to re-assign FRAME_RATE --- FrameRateTest.ipynb | 685 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 685 insertions(+) create mode 100644 FrameRateTest.ipynb diff --git a/FrameRateTest.ipynb b/FrameRateTest.ipynb new file mode 100644 index 0000000..9e67f0c --- /dev/null +++ b/FrameRateTest.ipynb @@ -0,0 +1,685 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 45, + "id": "difficult-membership", + "metadata": {}, + "outputs": [], + "source": [ + "import spark\n", + "%reload_ext spark\n", + "\n", + "# 'Unit test' for FRAME_RATE" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "id": "cooperative-galaxy", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
Done drawing.\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "\\PY{err}{D}\\PY{err}{o}\\PY{err}{n}\\PY{err}{e}\\PY{err}{ }\\PY{err}{d}\\PY{err}{r}\\PY{err}{a}\\PY{err}{w}\\PY{err}{i}\\PY{err}{n}\\PY{err}{g}\\PY{err}{.}\n", + "\\end{Verbatim}\n" + ], + "text/plain": [ + "Done drawing." + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "b979b65b533c4dd1bc4871df23cb73fe", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Canvas(height=100, width=100)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
frame rate: 30\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "\\PY{err}{f}\\PY{err}{r}\\PY{err}{a}\\PY{err}{m}\\PY{err}{e}\\PY{err}{ }\\PY{err}{r}\\PY{err}{a}\\PY{err}{t}\\PY{err}{e}\\PY{err}{:}\\PY{err}{ }\\PY{err}{3}\\PY{err}{0}\n", + "\\end{Verbatim}\n" + ], + "text/plain": [ + "frame rate: 30" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%%ignite\n", + "\n", + "def setup():\n", + " size(200, 100)\n", + " background(\"light blue\")\n", + " print(\"frame rate:\", FRAME_RATE)\n", + " # this prints 30, the actual frame rate" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "id": "monetary-killer", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
Done drawing.\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "\\PY{err}{D}\\PY{err}{o}\\PY{err}{n}\\PY{err}{e}\\PY{err}{ }\\PY{err}{d}\\PY{err}{r}\\PY{err}{a}\\PY{err}{w}\\PY{err}{i}\\PY{err}{n}\\PY{err}{g}\\PY{err}{.}\n", + "\\end{Verbatim}\n" + ], + "text/plain": [ + "Done drawing." + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "768bb7ac20e843528a812a505ad79625", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Canvas(height=100, width=100)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
frame rate: 1\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "\\PY{err}{f}\\PY{err}{r}\\PY{err}{a}\\PY{err}{m}\\PY{err}{e}\\PY{err}{ }\\PY{err}{r}\\PY{err}{a}\\PY{err}{t}\\PY{err}{e}\\PY{err}{:}\\PY{err}{ }\\PY{err}{1}\n", + "\\end{Verbatim}\n" + ], + "text/plain": [ + "frame rate: 1" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%%ignite\n", + "\n", + "def setup():\n", + " size(200, 100)\n", + " background(\"light blue\")\n", + " FRAME_RATE = 1\n", + " print(\"frame rate:\", FRAME_RATE)\n", + " # this prints 1, not what I want\n" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "id": "insured-amino", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
Error in setup() function: local variable 'FRAME_RATE' referenced before assignment\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "\\PY{n}{Error} \\PY{o+ow}{in} \\PY{n}{setup}\\PY{p}{(}\\PY{p}{)} \\PY{n}{function}\\PY{p}{:} \\PY{n}{local} \\PY{n}{variable} \\PY{l+s+s1}{\\PYZsq{}}\\PY{l+s+s1}{FRAME\\PYZus{}RATE}\\PY{l+s+s1}{\\PYZsq{}} \\PY{n}{referenced} \\PY{n}{before} \\PY{n}{assignment}\n", + "\\end{Verbatim}\n" + ], + "text/plain": [ + "Error in setup() function: local variable 'FRAME_RATE' referenced before assignment" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "62bace9c8b6a472b8eda88eb47e25ec0", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Canvas(height=100, width=100)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "\n", + "\\end{Verbatim}\n" + ], + "text/plain": [] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%%ignite\n", + "\n", + "def setup():\n", + " size(200, 100)\n", + " background(\"light blue\")\n", + " print(\"frame rate:\", FRAME_RATE)\n", + " FRAME_RATE = 10\n", + " # this gives an error, FRAME_RATE is referenced before assignment" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "mediterranean-limit", + "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.1" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} From 626bad0bf9e673e9bb31941558cadd355009c5dc Mon Sep 17 00:00:00 2001 From: Tim Date: Sat, 27 Feb 2021 21:38:57 -0700 Subject: [PATCH 08/18] Added FRAME_RATE variable FRAME_RATE is a @property and an @ignite_global. @FRAME_RATE.setter is supposed to prevent the user from re-assigning. --- spark/core.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/spark/core.py b/spark/core.py index acf64e2..20c9035 100644 --- a/spark/core.py +++ b/spark/core.py @@ -31,8 +31,7 @@ class Core: # All constants that will be injected into global scope in the user"s cell global_constants = { - "pi": pi, - "FRAME_RATE": FRAME_RATE + "pi": pi } ignite_globals = _ignite_globals @@ -140,6 +139,18 @@ def height(self, val): self._globals_dict["height"] = val self.canvas.height = val + # this is working + @property + @ignite_global + def FRAME_RATE(self, mutable=False): + return FRAME_RATE + + # this is not working + @FRAME_RATE.setter + def FRAME_RATE(self, val): + raise RuntimeError("FRAME_RATE cannot be reassigned") + + ### Library init ### # Updates last activity time From 939a0799afecd4b1186a0c8f1e10f35aaa1641af Mon Sep 17 00:00:00 2001 From: Vikram Date: Sun, 28 Feb 2021 17:05:19 -0700 Subject: [PATCH 09/18] added translate, scale, their test files, and docs --- docs/img/scale_1.png | Bin 0 -> 9283 bytes docs/img/scale_2.png | Bin 0 -> 6058 bytes docs/img/translate.png | Bin 0 -> 5671 bytes docs/utilities.md | 103 +- spark/core.py | 6 + .../util/helper_functions/canvas_functions.py | 13 + test/ScaleTest.ipynb | 1322 +++++++++++++++++ test/TranslateTest.ipynb | 1101 ++++++++++++++ 8 files changed, 2544 insertions(+), 1 deletion(-) create mode 100644 docs/img/scale_1.png create mode 100644 docs/img/scale_2.png create mode 100644 docs/img/translate.png create mode 100644 test/ScaleTest.ipynb create mode 100644 test/TranslateTest.ipynb diff --git a/docs/img/scale_1.png b/docs/img/scale_1.png new file mode 100644 index 0000000000000000000000000000000000000000..265608a8990199021371f06ae539445ba6fc37e9 GIT binary patch literal 9283 zcmeHNc|4Ts+ka4$&S;ggq*8?FBtv$RDBED@kfjsZW-K+hdCVj9dGF_|H> z5|L$SkbUez_8A86J)LuYzu!6MegAp?d_V6WK7F3Kp8L73`?|0Ddw;L*T@=DZAI2}t z4?z&@qQQA{2;yo7e|g(@!7ul>wikncxG?7W=OE%|(FyRd#YM+h2ZBoCcd&om3ZA!n z8(3o?NZ=jkkE_lL?*u^-ofpsRAOq~DdmZjuj#bsp#Y7#oM}9vS&wnH;OXz0mo-^II zc^h^g*V(Rb_Bkr?cD-@TdEVQid!$uhosxR`I~q!kjgIR*8#YpmmLuB_j~hoFaXWP^ zJLRdtwRWnThQS&8r@k3373FrQY5(>cebzzitdM~tvwfv5v*f;|pniw;l&aZ_5cHbT zir|9oheh&3+FKNn5OfrOU3dLkX>+2GeZUdcCx?x;3YVevA)y+BjDVr21UfII*es^p zzEhKVIPm)$zB4Mf7G0+bN6zVPh4y(E!It#3R$H4SM`{Oo&1>_!W5IV_UsihJm28qc zHn)EXbw@2Y27iT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qg&O`kbM|XJm==(;?mx^SxfX-#QF=?$>gnwIdWY1 z-zYS7=|2>zJ3P2MA0lq&$LYijVliz4O@RKt^MC3id@x8l0(V|=fYj;tr2v2Kg7kHa KwaahXKl?Ah5Q^sj literal 0 HcmV?d00001 diff --git a/docs/utilities.md b/docs/utilities.md index 767e1af..247be95 100644 --- a/docs/utilities.md +++ b/docs/utilities.md @@ -92,4 +92,105 @@ def setup(): Results in: -![rotate demo](img/rotate.png) \ No newline at end of file +![rotate demo](img/rotate.png) + +### Scale (one parameter) + +Scales the canvas units by x horizontally and vertically. + +Usage: + +```python +scale(x) +``` +**Parameters** + +- x: (float) The factor by which the canvas is scaled. + +**Example(s):** + +*Scale horizontal and vertical canvas units by a factor of 2* + +```python hl_lines="6" +%%ignite +def setup(): + size(400, 400) + circle(100, 100, 100) + fill_style("red") + + # apply scale of 2, this will scale canvas units by factor of 2 horizontally and vertically + scale(2) + circle(100, 100, 100) +``` + +Results in: + +![scale demo](img/scale_1.png) + +### Scale (two parameters) + +Scales the canvas units by x horizontally and by y vertically. + +Usage: + +```python +scale(x,y) +``` +**Parameters** + +- x: (float) The factor by which the canvas is scaled horizontally. +- y: (float) The factor by which the canvas is scaled vertically. + +**Example(s):** + +*Scale horizontal and vertical canvas units by factors of 0.75 and 1.25 respectively* + +```python hl_lines="6" +%%ignite +def setup(): + size(400, 400) + circle(100, 100, 100) + fill_style("red") + + # apply scale of (0.75, 1.25), this will scale canvas units by factor of 0.75 horizontally and 1.25 vertically + scale(0.75, 1.25) + circle(100, 100, 100) +``` + +Results in: + +![scale demo](img/scale_2.png) + +### Translate + +Moves the canvas and its origin on the grid. x indicates the horizontal distance to move, and y indicates vertical distance to move. + +Usage: + +```python +translate(x,y) +``` +**Parameters** + +- x: (float) The horizontal distance to translate the canvas. +- y: (float) The vertical distance to translate the canvas. + +**Example(s):** + +*Translate the canvas 50 units right and 75 units down* + +```python hl_lines="6" +%%ignite +def setup(): + size(400, 400) + circle(100, 100, 100) + fill_style("red") + + # move canvas 50 units right, and 75 units down + translate(50, 75) + circle(100, 100, 100) +``` + +Results in: + +![translate demo](img/translate.png) diff --git a/spark/core.py b/spark/core.py index 46ba78b..760228e 100644 --- a/spark/core.py +++ b/spark/core.py @@ -333,6 +333,12 @@ def background(self, *args): pass @extern def rotate(self, *args): pass + + @extern + def translate(self, *args): pass + + @extern + def scale(self, *args): pass # From util.helper_functions.rect_functions diff --git a/spark/util/helper_functions/canvas_functions.py b/spark/util/helper_functions/canvas_functions.py index ceb6c17..181407b 100644 --- a/spark/util/helper_functions/canvas_functions.py +++ b/spark/util/helper_functions/canvas_functions.py @@ -40,3 +40,16 @@ def helper_background(self, *args): @ignite_global def helper_rotate(self, *args): self.canvas.rotate(args[0]) + +@validate_args([Real, Real]) +@ignite_global +def helper_translate(self, *args): + self.canvas.translate(args[0], args[1]) + +@validate_args([Real], [Real, Real]) +@ignite_global +def helper_scale(self, *args): + if len(args) == 1: + self.canvas.scale(args[0]) + else: + self.canvas.scale(args[0], args[1]) diff --git a/test/ScaleTest.ipynb b/test/ScaleTest.ipynb new file mode 100644 index 0000000..38515eb --- /dev/null +++ b/test/ScaleTest.ipynb @@ -0,0 +1,1322 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "infinite-webster", + "metadata": {}, + "outputs": [], + "source": [ + "import spark\n", + "%reload_ext spark" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "id": "affiliated-hopkins", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
Done drawing.\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "Done drawing.\n", + "\\end{Verbatim}\n" + ], + "text/plain": [ + "Done drawing." + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "36adef58bab442ceb9792fd10e871a30", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Canvas(height=100, width=100)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "\n", + "\\end{Verbatim}\n" + ], + "text/plain": [] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%%ignite\n", + "def setup():\n", + " size(400, 400)\n", + " circle(100, 100, 100)\n", + " fill_style(\"red\")\n", + " \n", + " # apply scale of 1, should not change anything\n", + " scale(1)\n", + " circle(100, 100, 100)" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "id": "surrounded-medication", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
Done drawing.\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "Done drawing.\n", + "\\end{Verbatim}\n" + ], + "text/plain": [ + "Done drawing." + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "482847c670a44454a5d53c09d81c082b", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Canvas(height=100, width=100)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "\n", + "\\end{Verbatim}\n" + ], + "text/plain": [] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%%ignite\n", + "def setup():\n", + " size(400, 400)\n", + " circle(100, 100, 100)\n", + " fill_style(\"red\")\n", + " \n", + " # apply scale of 2, this will scale canvas units by factor of 2 horizontally and vertically\n", + " scale(2)\n", + " circle(100, 100, 100)" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "id": "stainless-envelope", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
Done drawing.\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "Done drawing.\n", + "\\end{Verbatim}\n" + ], + "text/plain": [ + "Done drawing." + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "92ba410863a84bcab3483e90b7430cea", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Canvas(height=100, width=100)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "\n", + "\\end{Verbatim}\n" + ], + "text/plain": [] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%%ignite\n", + "def setup():\n", + " size(400, 400)\n", + " circle(100, 100, 100)\n", + " fill_style(\"red\")\n", + " \n", + " # apply scale of 0.5, this will scale canvas units by factor of 0.5 horizontally and vertically\n", + " scale(0.5)\n", + " circle(100, 100, 100)" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "id": "false-graduate", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
Done drawing.\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "Done drawing.\n", + "\\end{Verbatim}\n" + ], + "text/plain": [ + "Done drawing." + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "c6bfbc56c2ab44af9c9c35df77a95004", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Canvas(height=100, width=100)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "\n", + "\\end{Verbatim}\n" + ], + "text/plain": [] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%%ignite\n", + "def setup():\n", + " size(400, 400)\n", + " circle(100, 100, 100)\n", + " fill_style(\"red\")\n", + " \n", + " # apply scale of (1, 3), this will scale canvas units by factor of 3 vertically\n", + " scale(1, 3)\n", + " circle(100, 100, 100)" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "id": "professional-moses", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
Done drawing.\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "Done drawing.\n", + "\\end{Verbatim}\n" + ], + "text/plain": [ + "Done drawing." + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "7743615c75c944be8c29d0ff5a3c82e8", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Canvas(height=100, width=100)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "\n", + "\\end{Verbatim}\n" + ], + "text/plain": [] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%%ignite\n", + "def setup():\n", + " size(400, 400)\n", + " circle(100, 100, 100)\n", + " fill_style(\"red\")\n", + " \n", + " # apply scale of (3, 1), this will scale canvas units by factor of 3 horizontally\n", + " scale(3, 1)\n", + " circle(100, 100, 100)" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "id": "stable-standard", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
Done drawing.\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "Done drawing.\n", + "\\end{Verbatim}\n" + ], + "text/plain": [ + "Done drawing." + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "83cbb21bd81c482e90dc34e8da50f28d", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Canvas(height=100, width=100)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "\n", + "\\end{Verbatim}\n" + ], + "text/plain": [] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%%ignite\n", + "def setup():\n", + " size(400, 400)\n", + " circle(100, 100, 100)\n", + " fill_style(\"red\")\n", + " \n", + " # apply scale of (0.75, 1.25), this will scale canvas units by factor of 0.75 horizontally and 1.25 vertically\n", + " scale(0.75, 1.25)\n", + " circle(100, 100, 100)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "banner-patch", + "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.8.6" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/test/TranslateTest.ipynb b/test/TranslateTest.ipynb new file mode 100644 index 0000000..c17057a --- /dev/null +++ b/test/TranslateTest.ipynb @@ -0,0 +1,1101 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "mounted-bathroom", + "metadata": {}, + "outputs": [], + "source": [ + "import spark\n", + "%reload_ext spark" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "chronic-rental", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
Done drawing.\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "Done drawing.\n", + "\\end{Verbatim}\n" + ], + "text/plain": [ + "Done drawing." + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "31c3b1fd61914814bee2e5b5e90586e6", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Canvas(height=100, width=100)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "\n", + "\\end{Verbatim}\n" + ], + "text/plain": [] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%%ignite\n", + "def setup():\n", + " size(400, 400)\n", + " circle(100, 100, 100)\n", + " fill_style(\"red\")\n", + " \n", + " # move by 0 units on the x-axis and 0 units on the y-axis --- should not change anything\n", + " translate(0, 0)\n", + " circle(100, 100, 100)" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "collectible-commerce", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
Done drawing.\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "Done drawing.\n", + "\\end{Verbatim}\n" + ], + "text/plain": [ + "Done drawing." + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "a5aa3bbeb47f406caa87f80e858cb20a", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Canvas(height=100, width=100)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "\n", + "\\end{Verbatim}\n" + ], + "text/plain": [] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%%ignite\n", + "def setup():\n", + " size(400, 400)\n", + " circle(100, 100, 100)\n", + " fill_style(\"red\")\n", + " \n", + " # move canvas 125 units left, and 10 units up\n", + " translate(-25, -10)\n", + " circle(100, 100, 100)" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "liked-exploration", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
Done drawing.\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "Done drawing.\n", + "\\end{Verbatim}\n" + ], + "text/plain": [ + "Done drawing." + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "e56d236f558345eba65586f98b4452ff", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Canvas(height=100, width=100)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "\n", + "\\end{Verbatim}\n" + ], + "text/plain": [] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%%ignite\n", + "def setup():\n", + " size(400, 400)\n", + " circle(100, 100, 100)\n", + " fill_style(\"red\")\n", + " \n", + " # move canvas 30 units right, and 60 units up\n", + " translate(30, -60)\n", + " circle(100, 100, 100)" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "stupid-understanding", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
Done drawing.\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "Done drawing.\n", + "\\end{Verbatim}\n" + ], + "text/plain": [ + "Done drawing." + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "fea9cdb438cd449284a7a42f94771d9b", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Canvas(height=100, width=100)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "\n", + "\\end{Verbatim}\n" + ], + "text/plain": [] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%%ignite\n", + "def setup():\n", + " size(400, 400)\n", + " circle(100, 100, 100)\n", + " fill_style(\"red\")\n", + " \n", + " # move canvas 50 units right, and 75 units down\n", + " translate(50, 75)\n", + " circle(100, 100, 100)" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "basic-operator", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
Done drawing.\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "Done drawing.\n", + "\\end{Verbatim}\n" + ], + "text/plain": [ + "Done drawing." + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "57ef185dfe334543b309043a819905a9", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Canvas(height=100, width=100)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "\n", + "\\end{Verbatim}\n" + ], + "text/plain": [] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%%ignite\n", + "def setup():\n", + " size(400, 400)\n", + " circle(100, 100, 100)\n", + " fill_style(\"red\")\n", + " \n", + " # move canvas 50 units left, and 80 units down\n", + " translate(-50, 80)\n", + " circle(100, 100, 100)" + ] + } + ], + "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.8.6" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} From 585dd6b7ee1c1e5ed8ae471effc1e3c4917ca8ca Mon Sep 17 00:00:00 2001 From: Vikram Date: Sun, 28 Feb 2021 17:11:23 -0700 Subject: [PATCH 10/18] resolve conflict --- docs/utilities.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/docs/utilities.md b/docs/utilities.md index 247be95..b864b39 100644 --- a/docs/utilities.md +++ b/docs/utilities.md @@ -94,6 +94,38 @@ Results in: ![rotate demo](img/rotate.png) +### Distance between two points (x1, y1) and (x2, y2) + +![dist explanation](img/dist.png) + +To find the distance between two points (x1, y1) and (x2, y2), use the following command: + +```python +dist(x1, y1, x2, y2) +``` + +**Parameters** + +- x1: (float) The x-coordinate of the first point +- y1: (float) The y-coordinate of the first point +- x2: (float) The x-coordinate of the second point +- y2: (float) The y-coordinate of the second point + +**Example(s):** + +*Print the distance between (125, 125) and (375, 375)* + +```python hl_lines="6" +%%ignite + +def setup(): + print(dist(125, 125, 375, 375)) +``` + +Results in: + +![dist demo](img/dist_2.png) + ### Scale (one parameter) Scales the canvas units by x horizontally and vertically. From 8fa33fe019f7738fbd18851efc27490c80e23daf Mon Sep 17 00:00:00 2001 From: Tim Date: Sun, 28 Feb 2021 21:21:28 -0700 Subject: [PATCH 11/18] Moved FrameRateTest.ipynb to the correct folder (test) --- FrameRateTest.ipynb => test/FrameRateTest.ipynb | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename FrameRateTest.ipynb => test/FrameRateTest.ipynb (100%) diff --git a/FrameRateTest.ipynb b/test/FrameRateTest.ipynb similarity index 100% rename from FrameRateTest.ipynb rename to test/FrameRateTest.ipynb From 00356c518015281d1047786d991a658c4f68abbc Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 2 Mar 2021 07:30:43 -0700 Subject: [PATCH 12/18] Removed non-functional code --- spark/core.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/spark/core.py b/spark/core.py index df5b2c4..7c8f58f 100644 --- a/spark/core.py +++ b/spark/core.py @@ -139,17 +139,11 @@ def height(self, val): self._globals_dict["height"] = val self.canvas.height = val - # this is working @property @ignite_global - def FRAME_RATE(self, mutable=False): + def FRAME_RATE(self): return FRAME_RATE - # this is not working - @FRAME_RATE.setter - def FRAME_RATE(self, val): - raise RuntimeError("FRAME_RATE cannot be reassigned") - ### Library init ### From 1e896e9f89f2b25bdee7726c3e30d3d487fe14f2 Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 2 Mar 2021 07:35:43 -0700 Subject: [PATCH 13/18] Just adjusted a comment --- test/FrameRateTest.ipynb | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/test/FrameRateTest.ipynb b/test/FrameRateTest.ipynb index 9e67f0c..e1cf320 100644 --- a/test/FrameRateTest.ipynb +++ b/test/FrameRateTest.ipynb @@ -2,21 +2,31 @@ "cells": [ { "cell_type": "code", - "execution_count": 45, - "id": "difficult-membership", + "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "ModuleNotFoundError", + "evalue": "No module named 'spark'", + "output_type": "error", + "traceback": [ + "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[1;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", + "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[1;32mimport\u001b[0m \u001b[0mspark\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 2\u001b[0m \u001b[0mget_ipython\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mrun_line_magic\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'reload_ext'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m'spark'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 3\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[1;31m# Unit test for FRAME_RATE\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", + "\u001b[1;31mModuleNotFoundError\u001b[0m: No module named 'spark'" + ] + } + ], "source": [ - "import spark\n", - "%reload_ext spark\n", - "\n", - "# 'Unit test' for FRAME_RATE" + "import spark\r\n", + "%reload_ext spark\r\n", + "\r\n", + "# Unit test for FRAME_RATE" ] }, { "cell_type": "code", "execution_count": 47, - "id": "cooperative-galaxy", "metadata": {}, "outputs": [ { @@ -229,7 +239,6 @@ { "cell_type": "code", "execution_count": 46, - "id": "monetary-killer", "metadata": {}, "outputs": [ { @@ -443,7 +452,6 @@ { "cell_type": "code", "execution_count": 48, - "id": "insured-amino", "metadata": {}, "outputs": [ { @@ -655,7 +663,6 @@ { "cell_type": "code", "execution_count": null, - "id": "mediterranean-limit", "metadata": {}, "outputs": [], "source": [] @@ -677,9 +684,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.1" + "version": "3.9.1-final" } }, "nbformat": 4, "nbformat_minor": 5 -} +} \ No newline at end of file From 738ce3858735813ac405db9a6759b72bdf6b6113 Mon Sep 17 00:00:00 2001 From: Vikram Date: Fri, 5 Mar 2021 17:44:25 -0700 Subject: [PATCH 14/18] Made several revisions --- docs/img/scale_1.png | Bin 9283 -> 7934 bytes docs/img/scale_2.png | Bin 6058 -> 4811 bytes docs/img/translate.png | Bin 5671 -> 4557 bytes docs/utilities.md | 143 +++--- spark/core.py | 6 +- .../util/helper_functions/canvas_functions.py | 5 +- test/ScaleTest.ipynb | 445 +++++++++++++++++- test/TranslateTest.ipynb | 30 +- 8 files changed, 532 insertions(+), 97 deletions(-) diff --git a/docs/img/scale_1.png b/docs/img/scale_1.png index 265608a8990199021371f06ae539445ba6fc37e9..fddee84edb19c9c4a9c038911fb16395d1674879 100644 GIT binary patch literal 7934 zcmeG>`9IWM+k>RCcBh8M)?IfgWvP%RgOpaXD_JH=8CgdrS%wyrEZtO6jBG4G>Iuk|~A z4hw_H)CnIEs&C#!7)&MU#1RwQ>n>AF*O*6_1k~w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;$=b)uk?<-&m1szAt}~ z%0jT}F`O4`>|BnH)7Kdo{X+rNDJpr@jJHIwM$v7l#NK`vOLS!Q?KcFOJWfGF1k}T` zved$qrOna8 z9OyZZ>JDfr__AL_`T#JcAx7D zrKC})hp(bbwg80Tr7mg2jh>(yc~|jG4*Kp_g#A&t2V>!!6i`1pDrOVV?M?5J`n9pe zPmf3$iT-Z;rk)ihM#5p_K>Isjcr;dLtiS^@_ReEgvX`0(HPwEyPXzo}q`Kk9`?Xm~ zxbaS3>XEg1+`a$gSFo{~*Q3z9g~uOgL&nC(jrI@1W!2TyB|jx9NFv@-#vOA1u7w@9 z!aqojig@t#b7420c0BgED4?HuKg@R z(b9a~zCc)orxxxSocvee47=FLqg&O`kbM|XJm==(;?mx^SxfX-#QF=?$>gnwIdWY1 z-zYS7=|2>zJ3P2MA0lq&$LYijVliz4O@RKt^MC3id@x8l0(V|=fYj;tr2v2Kg7kHa KwaahXKl?Ah5Q^sj diff --git a/docs/utilities.md b/docs/utilities.md index b864b39..ffe69c5 100644 --- a/docs/utilities.md +++ b/docs/utilities.md @@ -56,173 +56,174 @@ Results in: ![random demo](img/randint.png) +### Distance between two points (x1, y1) and (x2, y2) +![dist explanation](img/dist.png) -### Rotation - -![rotation explanation](rotation_explanation.png) - -Transformations are always done to the **canvas**, not the individual shapes themselves. Rotation is done around the origin, point (0, 0) and affects all shapes drawn afterwards. You can use our built-in `pi` variable to express radians, or convert from degrees to radians by multiplying your number of degrees by `pi / 180`. - -Note that canvas transformations are not removed automatically. In other words, if you want to rotate just one shape in your `draw()` function, you should rotate the canvas by `r` radians, draw your shape, and then rotate by `-r` radians to undo the effect. - -To rotate the canvas clockwise around the origin, use: +To find the distance between two points (x1, y1) and (x2, y2), use the following command: ```python -rotate(r) +dist(x1, y1, x2, y2) ``` **Parameters** -- r: (float) The angle, in radians to rotate the canvas +- x1: (float) The x-coordinate of the first point +- y1: (float) The y-coordinate of the first point +- x2: (float) The x-coordinate of the second point +- y2: (float) The y-coordinate of the second point **Example(s):** -*Rotating a rectangle by 30 degrees clockwise* +*Print the distance between (125, 125) and (375, 375)* -```python hl_lines="6" +```python hl_lines="4" %%ignite def setup(): - size(300, 300) - - rotate(pi / 6) # Rotate pi/6 radians (30 degrees) clockwise - rect(100, 0, 80, 50) + print(dist(125, 125, 375, 375)) ``` Results in: -![rotate demo](img/rotate.png) +![dist demo](img/dist_2.png) -### Distance between two points (x1, y1) and (x2, y2) +### Translate -![dist explanation](img/dist.png) +Change the origin of the canvas. -To find the distance between two points (x1, y1) and (x2, y2), use the following command: +Usage: ```python -dist(x1, y1, x2, y2) +translate(x, y) ``` - **Parameters** -- x1: (float) The x-coordinate of the first point -- y1: (float) The y-coordinate of the first point -- x2: (float) The x-coordinate of the second point -- y2: (float) The y-coordinate of the second point +- x: (float) The horizontal distance to translate the canvas. +- y: (float) The vertical distance to translate the canvas. **Example(s):** -*Print the distance between (125, 125) and (375, 375)* +*Translate the canvas 50 units right and 75 units down* -```python hl_lines="6" +```python hl_lines="8" %%ignite def setup(): - print(dist(125, 125, 375, 375)) + size(400, 400) + fill_style("red") + + # move canvas 50 units right, and 75 units down + translate(50, 75) + circle(0, 0, 100) ``` Results in: -![dist demo](img/dist_2.png) +![translate demo](img/translate.png) -### Scale (one parameter) +### Rotation -Scales the canvas units by x horizontally and vertically. +![rotation explanation](rotation_explanation.png) -Usage: +Transformations are always done to the **canvas**, not the individual shapes themselves. Rotation is done around the origin, point (0, 0) and affects all shapes drawn afterwards. You can use our built-in `pi` variable to express radians, or convert from degrees to radians by multiplying your number of degrees by `pi / 180`. + +Note that canvas transformations are not removed automatically. In other words, if you want to rotate just one shape in your `draw()` function, you should rotate the canvas by `r` radians, draw your shape, and then rotate by `-r` radians to undo the effect. Also note that you can rotate on a point other than the origin by first calling `translate` to change the origin to the new point. + +To rotate the canvas clockwise around the origin, use: ```python -scale(x) +rotate(r) ``` + **Parameters** -- x: (float) The factor by which the canvas is scaled. +- r: (float) The angle, in radians to rotate the canvas **Example(s):** -*Scale horizontal and vertical canvas units by a factor of 2* +*Rotating a rectangle by 30 degrees clockwise* ```python hl_lines="6" %%ignite + def setup(): - size(400, 400) - circle(100, 100, 100) - fill_style("red") - - # apply scale of 2, this will scale canvas units by factor of 2 horizontally and vertically - scale(2) - circle(100, 100, 100) + size(300, 300) + + rotate(pi / 6) # Rotate pi/6 radians (30 degrees) clockwise + rect(100, 0, 80, 50) ``` Results in: -![scale demo](img/scale_1.png) +![rotate demo](img/rotate.png) -### Scale (two parameters) +### Scale -Scales the canvas units by x horizontally and by y vertically. +Scales the canvas. Note that scaling applies to the canvas, not to individual shapes. You can scale on a point other than the origin by first calling `translate` to change the origin to the new point. -Usage: +There are two ways to use scale: + +| Method | Description | Syntax | +| -------------------------------- | -----------------------------------------------------------------------------|-----------------| +|[1 float](#scale-with-one-float) | Scale canvas width and height by some amount, i.e. 1.5 | scale(1.5) | +|[2 floats](#scale-with-two-floats)| Scale canvas width by first number and height by second number, i.e. 2.5, 3.5| scale(2.5, 3.5) | + +#### Scale with one float ```python -scale(x,y) +scale(n) ``` **Parameters** -- x: (float) The factor by which the canvas is scaled horizontally. -- y: (float) The factor by which the canvas is scaled vertically. +- n: (float) The amount to scale the height and width of the canvas. **Example(s):** -*Scale horizontal and vertical canvas units by factors of 0.75 and 1.25 respectively* +*Double height and width of canvas using scale* -```python hl_lines="6" +```python hl_lines="8" %%ignite + def setup(): size(400, 400) - circle(100, 100, 100) fill_style("red") - # apply scale of (0.75, 1.25), this will scale canvas units by factor of 0.75 horizontally and 1.25 vertically - scale(0.75, 1.25) + # apply scale of 2, this will scale canvas units by factor of 2 horizontally and vertically + scale(2) circle(100, 100, 100) ``` Results in: -![scale demo](img/scale_2.png) - -### Translate - -Moves the canvas and its origin on the grid. x indicates the horizontal distance to move, and y indicates vertical distance to move. +![scale demo](img/scale_1.png) -Usage: +#### Scale with two floats ```python -translate(x,y) +scale(x, y) ``` **Parameters** -- x: (float) The horizontal distance to translate the canvas. -- y: (float) The vertical distance to translate the canvas. +- x: (float) The amount to scale the width of the canvas. +- y: (float) The amount to scale the height of the canvas. **Example(s):** -*Translate the canvas 50 units right and 75 units down* +*Scale canvas width by 0.75 and canvas height by 1.25* -```python hl_lines="6" +```python hl_lines="8" %%ignite + def setup(): size(400, 400) - circle(100, 100, 100) fill_style("red") - # move canvas 50 units right, and 75 units down - translate(50, 75) + # apply scale of (0.75, 1.25), this will scale canvas units by factor of 0.75 horizontally and 1.25 vertically + scale(0.75, 1.25) circle(100, 100, 100) ``` Results in: -![translate demo](img/translate.png) +![scale demo](img/scale_2.png) diff --git a/spark/core.py b/spark/core.py index 39ece27..f4909d6 100644 --- a/spark/core.py +++ b/spark/core.py @@ -331,11 +331,11 @@ def clear(self, *args): pass @extern def background(self, *args): pass - @extern - def rotate(self, *args): pass - @extern def translate(self, *args): pass + + @extern + def rotate(self, *args): pass @extern def scale(self, *args): pass diff --git a/spark/util/helper_functions/canvas_functions.py b/spark/util/helper_functions/canvas_functions.py index 181407b..ad7b15b 100644 --- a/spark/util/helper_functions/canvas_functions.py +++ b/spark/util/helper_functions/canvas_functions.py @@ -49,7 +49,4 @@ def helper_translate(self, *args): @validate_args([Real], [Real, Real]) @ignite_global def helper_scale(self, *args): - if len(args) == 1: - self.canvas.scale(args[0]) - else: - self.canvas.scale(args[0], args[1]) + self.canvas.scale(*args) diff --git a/test/ScaleTest.ipynb b/test/ScaleTest.ipynb index 38515eb..0121178 100644 --- a/test/ScaleTest.ipynb +++ b/test/ScaleTest.ipynb @@ -3,7 +3,7 @@ { "cell_type": "code", "execution_count": 1, - "id": "infinite-webster", + "id": "intimate-crest", "metadata": {}, "outputs": [], "source": [ @@ -14,7 +14,7 @@ { "cell_type": "code", "execution_count": 30, - "id": "affiliated-hopkins", + "id": "original-donna", "metadata": {}, "outputs": [ { @@ -227,7 +227,7 @@ { "cell_type": "code", "execution_count": 31, - "id": "surrounded-medication", + "id": "temporal-caution", "metadata": {}, "outputs": [ { @@ -440,7 +440,7 @@ { "cell_type": "code", "execution_count": 32, - "id": "stainless-envelope", + "id": "rotary-insert", "metadata": {}, "outputs": [ { @@ -653,7 +653,7 @@ { "cell_type": "code", "execution_count": 33, - "id": "false-graduate", + "id": "collectible-hacker", "metadata": {}, "outputs": [ { @@ -866,7 +866,7 @@ { "cell_type": "code", "execution_count": 34, - "id": "professional-moses", + "id": "covered-interest", "metadata": {}, "outputs": [ { @@ -1079,7 +1079,7 @@ { "cell_type": "code", "execution_count": 35, - "id": "stable-standard", + "id": "variable-waste", "metadata": {}, "outputs": [ { @@ -1289,10 +1289,439 @@ " circle(100, 100, 100)" ] }, + { + "cell_type": "code", + "execution_count": 8, + "id": "perfect-carry", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
Done drawing.\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "Done drawing.\n", + "\\end{Verbatim}\n" + ], + "text/plain": [ + "Done drawing." + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "0214b3ea53534ec895bd658b5661edfd", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Canvas(height=100, width=100)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "\n", + "\\end{Verbatim}\n" + ], + "text/plain": [] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%%ignite\n", + "def setup():\n", + " size(400, 400)\n", + " circle(100, 100, 100)\n", + " fill_style(\"red\")\n", + " \n", + " # apply scale of (0, 1.25), meaning the red circle will have no width\n", + " scale(0, 1.25)\n", + " circle(100, 100, 100)" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "metropolitan-prophet", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
Done drawing.\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "Done drawing.\n", + "\\end{Verbatim}\n" + ], + "text/plain": [ + "Done drawing." + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "261976be66d64d97a30ca0884e3cc593", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Canvas(height=100, width=100)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n",
+       "
\n" + ], + "text/latex": [ + "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", + "\n", + "\\end{Verbatim}\n" + ], + "text/plain": [] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%%ignite\n", + "def setup():\n", + " size(400, 400)\n", + " fill_style(\"red\")\n", + " \n", + " # apply scale of (-0.75, 1.25)\n", + " scale(-0.75, 1.25)\n", + " \n", + " # translate to be able to see negative x value locations\n", + " translate(-200, 0)\n", + " \n", + " circle(100, 100, 100)" + ] + }, { "cell_type": "code", "execution_count": null, - "id": "banner-patch", + "id": "unsigned-record", "metadata": {}, "outputs": [], "source": [] diff --git a/test/TranslateTest.ipynb b/test/TranslateTest.ipynb index c17057a..69fb641 100644 --- a/test/TranslateTest.ipynb +++ b/test/TranslateTest.ipynb @@ -2,8 +2,8 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, - "id": "mounted-bathroom", + "execution_count": 2, + "id": "thousand-layer", "metadata": {}, "outputs": [], "source": [ @@ -14,7 +14,7 @@ { "cell_type": "code", "execution_count": 3, - "id": "chronic-rental", + "id": "heated-viking", "metadata": {}, "outputs": [ { @@ -227,7 +227,7 @@ { "cell_type": "code", "execution_count": 13, - "id": "collectible-commerce", + "id": "failing-brooks", "metadata": {}, "outputs": [ { @@ -440,7 +440,7 @@ { "cell_type": "code", "execution_count": 14, - "id": "liked-exploration", + "id": "blind-issue", "metadata": {}, "outputs": [ { @@ -653,7 +653,7 @@ { "cell_type": "code", "execution_count": 15, - "id": "stupid-understanding", + "id": "previous-oklahoma", "metadata": {}, "outputs": [ { @@ -865,8 +865,8 @@ }, { "cell_type": "code", - "execution_count": 12, - "id": "basic-operator", + "execution_count": 3, + "id": "international-congress", "metadata": {}, "outputs": [ { @@ -963,7 +963,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "57ef185dfe334543b309043a819905a9", + "model_id": "c27d788da0564689bf923f301bd4c2cd", "version_major": 2, "version_minor": 0 }, @@ -1071,10 +1071,18 @@ " circle(100, 100, 100)\n", " fill_style(\"red\")\n", " \n", - " # move canvas 50 units left, and 80 units down\n", - " translate(-50, 80)\n", + " # move canvas 50.5 units left, and 80.5 units down\n", + " translate(-50.5, 80.5)\n", " circle(100, 100, 100)" ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "architectural-diploma", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { From 106be038da9e53a08808936d0fb1d3cdcea77744 Mon Sep 17 00:00:00 2001 From: Vikram Date: Fri, 5 Mar 2021 17:55:06 -0700 Subject: [PATCH 15/18] Fixed tests --- test/TranslateTest.ipynb | 46 ++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/test/TranslateTest.ipynb b/test/TranslateTest.ipynb index 69fb641..986cded 100644 --- a/test/TranslateTest.ipynb +++ b/test/TranslateTest.ipynb @@ -3,7 +3,7 @@ { "cell_type": "code", "execution_count": 2, - "id": "thousand-layer", + "id": "legendary-cyprus", "metadata": {}, "outputs": [], "source": [ @@ -13,8 +13,8 @@ }, { "cell_type": "code", - "execution_count": 3, - "id": "heated-viking", + "execution_count": 15, + "id": "invalid-banks", "metadata": {}, "outputs": [ { @@ -111,7 +111,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "31c3b1fd61914814bee2e5b5e90586e6", + "model_id": "fea9cdb438cd449284a7a42f94771d9b", "version_major": 2, "version_minor": 0 }, @@ -219,15 +219,15 @@ " circle(100, 100, 100)\n", " fill_style(\"red\")\n", " \n", - " # move by 0 units on the x-axis and 0 units on the y-axis --- should not change anything\n", - " translate(0, 0)\n", + " # move canvas 50 units right, and 75 units down\n", + " translate(50, 75)\n", " circle(100, 100, 100)" ] }, { "cell_type": "code", - "execution_count": 13, - "id": "failing-brooks", + "execution_count": 3, + "id": "brown-shadow", "metadata": {}, "outputs": [ { @@ -324,7 +324,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "a5aa3bbeb47f406caa87f80e858cb20a", + "model_id": "31c3b1fd61914814bee2e5b5e90586e6", "version_major": 2, "version_minor": 0 }, @@ -432,15 +432,15 @@ " circle(100, 100, 100)\n", " fill_style(\"red\")\n", " \n", - " # move canvas 125 units left, and 10 units up\n", - " translate(-25, -10)\n", + " # move by 0 units on the x-axis and 0 units on the y-axis --- red circle should overlap with black circle\n", + " translate(0, 0)\n", " circle(100, 100, 100)" ] }, { "cell_type": "code", - "execution_count": 14, - "id": "blind-issue", + "execution_count": 13, + "id": "quarterly-discretion", "metadata": {}, "outputs": [ { @@ -537,7 +537,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "e56d236f558345eba65586f98b4452ff", + "model_id": "a5aa3bbeb47f406caa87f80e858cb20a", "version_major": 2, "version_minor": 0 }, @@ -645,15 +645,15 @@ " circle(100, 100, 100)\n", " fill_style(\"red\")\n", " \n", - " # move canvas 30 units right, and 60 units up\n", - " translate(30, -60)\n", + " # move canvas 25 units left, and 10 units up\n", + " translate(-25, -10)\n", " circle(100, 100, 100)" ] }, { "cell_type": "code", - "execution_count": 15, - "id": "previous-oklahoma", + "execution_count": 14, + "id": "african-orbit", "metadata": {}, "outputs": [ { @@ -750,7 +750,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "fea9cdb438cd449284a7a42f94771d9b", + "model_id": "e56d236f558345eba65586f98b4452ff", "version_major": 2, "version_minor": 0 }, @@ -858,15 +858,15 @@ " circle(100, 100, 100)\n", " fill_style(\"red\")\n", " \n", - " # move canvas 50 units right, and 75 units down\n", - " translate(50, 75)\n", + " # move canvas 30 units right, and 60 units up\n", + " translate(30, -60)\n", " circle(100, 100, 100)" ] }, { "cell_type": "code", "execution_count": 3, - "id": "international-congress", + "id": "thick-dance", "metadata": {}, "outputs": [ { @@ -1079,7 +1079,7 @@ { "cell_type": "code", "execution_count": null, - "id": "architectural-diploma", + "id": "encouraging-bones", "metadata": {}, "outputs": [], "source": [] From 36b6aec9c38fb2b63bdf236f47b26d0f19f25d74 Mon Sep 17 00:00:00 2001 From: Tim Date: Mon, 8 Mar 2021 11:22:45 -0700 Subject: [PATCH 16/18] Cleaned up unit test for FRAME_RATE --- test/FrameRateTest.ipynb | 290 ++++++++------------------------------- 1 file changed, 55 insertions(+), 235 deletions(-) diff --git a/test/FrameRateTest.ipynb b/test/FrameRateTest.ipynb index e1cf320..bd52172 100644 --- a/test/FrameRateTest.ipynb +++ b/test/FrameRateTest.ipynb @@ -2,21 +2,10 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 4, + "id": "turned-warrior", "metadata": {}, - "outputs": [ - { - "ename": "ModuleNotFoundError", - "evalue": "No module named 'spark'", - "output_type": "error", - "traceback": [ - "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[1;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", - "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[1;32mimport\u001b[0m \u001b[0mspark\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 2\u001b[0m \u001b[0mget_ipython\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mrun_line_magic\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'reload_ext'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m'spark'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 3\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[1;31m# Unit test for FRAME_RATE\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", - "\u001b[1;31mModuleNotFoundError\u001b[0m: No module named 'spark'" - ] - } - ], + "outputs": [], "source": [ "import spark\r\n", "%reload_ext spark\r\n", @@ -26,7 +15,8 @@ }, { "cell_type": "code", - "execution_count": 47, + "execution_count": 9, + "id": "commercial-islam", "metadata": {}, "outputs": [ { @@ -105,16 +95,30 @@ ".output_html .vg { color: #19177C } /* Name.Variable.Global */\n", ".output_html .vi { color: #19177C } /* Name.Variable.Instance */\n", ".output_html .vm { color: #19177C } /* Name.Variable.Magic */\n", - ".output_html .il { color: #666666 } /* Literal.Number.Integer.Long */
Done drawing.\n",
+       ".output_html .il { color: #666666 } /* Literal.Number.Integer.Long */
Stopped\n",
        "
\n" ], "text/latex": [ "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", - "\\PY{err}{D}\\PY{err}{o}\\PY{err}{n}\\PY{err}{e}\\PY{err}{ }\\PY{err}{d}\\PY{err}{r}\\PY{err}{a}\\PY{err}{w}\\PY{err}{i}\\PY{err}{n}\\PY{err}{g}\\PY{err}{.}\n", + "\\PY{err}{S}\\PY{err}{t}\\PY{err}{o}\\PY{err}{p}\\PY{err}{p}\\PY{err}{e}\\PY{err}{d}\n", "\\end{Verbatim}\n" ], "text/plain": [ - "Done drawing." + "Stopped" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "e90b48a28d754b98a473c7ceef8ca21e", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Button(description='Stop', style=ButtonStyle())" ] }, "metadata": {}, @@ -123,7 +127,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "b979b65b533c4dd1bc4871df23cb73fe", + "model_id": "840a907740a1451cb8e72795767c686e", "version_major": 2, "version_minor": 0 }, @@ -229,16 +233,19 @@ "source": [ "%%ignite\n", "\n", + "# The FRAME_RATE variable is accessible to the user\n", + "# It's value should not be changed.\n", + "\n", "def setup():\n", " size(200, 100)\n", " background(\"light blue\")\n", - " print(\"frame rate:\", FRAME_RATE)\n", - " # this prints 30, the actual frame rate" + " print(\"frame rate:\", FRAME_RATE)" ] }, { "cell_type": "code", - "execution_count": 46, + "execution_count": 19, + "id": "norwegian-estonia", "metadata": {}, "outputs": [ { @@ -317,16 +324,16 @@ ".output_html .vg { color: #19177C } /* Name.Variable.Global */\n", ".output_html .vi { color: #19177C } /* Name.Variable.Instance */\n", ".output_html .vm { color: #19177C } /* Name.Variable.Magic */\n", - ".output_html .il { color: #666666 } /* Literal.Number.Integer.Long */
Done drawing.\n",
+       ".output_html .il { color: #666666 } /* Literal.Number.Integer.Long */
Stopped\n",
        "
\n" ], "text/latex": [ "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", - "\\PY{err}{D}\\PY{err}{o}\\PY{err}{n}\\PY{err}{e}\\PY{err}{ }\\PY{err}{d}\\PY{err}{r}\\PY{err}{a}\\PY{err}{w}\\PY{err}{i}\\PY{err}{n}\\PY{err}{g}\\PY{err}{.}\n", + "\\PY{err}{S}\\PY{err}{t}\\PY{err}{o}\\PY{err}{p}\\PY{err}{p}\\PY{err}{e}\\PY{err}{d}\n", "\\end{Verbatim}\n" ], "text/plain": [ - "Done drawing." + "Stopped" ] }, "metadata": {}, @@ -335,211 +342,12 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "768bb7ac20e843528a812a505ad79625", + "model_id": "7ccab1ce0b2b4ef8ab1db8ea85bfa5e7", "version_major": 2, "version_minor": 0 }, "text/plain": [ - "Canvas(height=100, width=100)" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
frame rate: 1\n",
-       "
\n" - ], - "text/latex": [ - "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", - "\\PY{err}{f}\\PY{err}{r}\\PY{err}{a}\\PY{err}{m}\\PY{err}{e}\\PY{err}{ }\\PY{err}{r}\\PY{err}{a}\\PY{err}{t}\\PY{err}{e}\\PY{err}{:}\\PY{err}{ }\\PY{err}{1}\n", - "\\end{Verbatim}\n" - ], - "text/plain": [ - "frame rate: 1" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%ignite\n", - "\n", - "def setup():\n", - " size(200, 100)\n", - " background(\"light blue\")\n", - " FRAME_RATE = 1\n", - " print(\"frame rate:\", FRAME_RATE)\n", - " # this prints 1, not what I want\n" - ] - }, - { - "cell_type": "code", - "execution_count": 48, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
Error in setup() function: local variable 'FRAME_RATE' referenced before assignment\n",
-       "
\n" - ], - "text/latex": [ - "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", - "\\PY{n}{Error} \\PY{o+ow}{in} \\PY{n}{setup}\\PY{p}{(}\\PY{p}{)} \\PY{n}{function}\\PY{p}{:} \\PY{n}{local} \\PY{n}{variable} \\PY{l+s+s1}{\\PYZsq{}}\\PY{l+s+s1}{FRAME\\PYZus{}RATE}\\PY{l+s+s1}{\\PYZsq{}} \\PY{n}{referenced} \\PY{n}{before} \\PY{n}{assignment}\n", - "\\end{Verbatim}\n" - ], - "text/plain": [ - "Error in setup() function: local variable 'FRAME_RATE' referenced before assignment" + "Button(description='Stop', style=ButtonStyle())" ] }, "metadata": {}, @@ -548,7 +356,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "62bace9c8b6a472b8eda88eb47e25ec0", + "model_id": "d4a8b0faf6a54cf995b9fc7b6ecd7c49", "version_major": 2, "version_minor": 0 }, @@ -635,15 +443,17 @@ ".output_html .vg { color: #19177C } /* Name.Variable.Global */\n", ".output_html .vi { color: #19177C } /* Name.Variable.Instance */\n", ".output_html .vm { color: #19177C } /* Name.Variable.Magic */\n", - ".output_html .il { color: #666666 } /* Literal.Number.Integer.Long */
\n",
+       ".output_html .il { color: #666666 } /* Literal.Number.Integer.Long */
frame rate: 30\n",
        "
\n" ], "text/latex": [ "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n", - "\n", + "\\PY{err}{f}\\PY{err}{r}\\PY{err}{a}\\PY{err}{m}\\PY{err}{e}\\PY{err}{ }\\PY{err}{r}\\PY{err}{a}\\PY{err}{t}\\PY{err}{e}\\PY{err}{:}\\PY{err}{ }\\PY{err}{3}\\PY{err}{0}\n", "\\end{Verbatim}\n" ], - "text/plain": [] + "text/plain": [ + "frame rate: 30" + ] }, "metadata": {}, "output_type": "display_data" @@ -652,17 +462,27 @@ "source": [ "%%ignite\n", "\n", + "# An example use-case is to set speeds in pixels/second using FRAME_RATE\n", + "\n", "def setup():\n", - " size(200, 100)\n", + " size(500, 300)\n", " background(\"light blue\")\n", " print(\"frame rate:\", FRAME_RATE)\n", - " FRAME_RATE = 10\n", - " # this gives an error, FRAME_RATE is referenced before assignment" + "\n", + "x = 0\n", + "speed = 250/FRAME_RATE # this speed will be 200 pixels/second\n", + "\n", + "def draw():\n", + " background(\"light blue\")\n", + " global x, speed\n", + " circle(x, 50, 30)\n", + " x += speed" ] }, { "cell_type": "code", "execution_count": null, + "id": "married-fabric", "metadata": {}, "outputs": [], "source": [] @@ -684,9 +504,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.1-final" + "version": "3.9.1" } }, "nbformat": 4, "nbformat_minor": 5 -} \ No newline at end of file +} From a1b9122a4819f8c0f94f57e6e9926accd49b1653 Mon Sep 17 00:00:00 2001 From: Tim Date: Mon, 8 Mar 2021 11:41:56 -0700 Subject: [PATCH 17/18] Added FRAME_RATE docs Added a description of FRAME_RATE to utilities.md --- docs/img/frame_rate.png | Bin 0 -> 5585 bytes docs/utilities.md | 38 +++++++++++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 docs/img/frame_rate.png diff --git a/docs/img/frame_rate.png b/docs/img/frame_rate.png new file mode 100644 index 0000000000000000000000000000000000000000..e71495973ce4340d68ac5873a9083fbe12aada40 GIT binary patch literal 5585 zcmeHLX*8Q%yNG}1Yb=LRqtn=fn^W$32v-f(QwePj}zOVbb?sOX~QxV|b zKmY(BVs_)Y9RR>*%)?PZ0p3h$xj3Hp;ES*`H3VP=PtNlO`~9z3UIPFcvV^w1`FZ1m z;Wu0&007bMKj7;LtMcJZo{luW6=`(e*E=#WEcBE^V2Cf^vg&0uUDYePs@kX2)O4?? z>t4~xeN^}Z0FclzyME0f#*;-C`p1D%+_SO=0DjjN*zaJXDtP3BX{q-G6Y(>0-y+n$ z-)$-jzN(0E1!WAF+&$>@H0Ow=(oNN_JEtWi?`7tl&3L?DXrEyAbH}r*!o7F*d+q1< ze(+#%+iGTHo6$L>YM`{90CvPLeV>Xao6DK&vkOPLqjM68;l5$WmSK#Xlxu_YGstD z2I{!=kw~omD`epaKw71MbA~@M^65b9asncJZPIDzvV`I)Nm3H^(3&)DjKVi@5-B~2 z92L|Bw?==4Qh|#4s$S$S2R@( zm56}Q??N2|Zlbb_y_J9e{=G3*o|S4wnzVCwhX_e3|7Xx92aO$5&SF?Hd0Bduui0~v zPir^tnBOA5Zvofgrq9k&(CpDQ*Em|lFlQ&&(GRRNryaP6>f2s!!9~wnj0H0$1l7=LB708 z_9o7H!Pt)4=bcg#_ipqkoI_a^2R%F>hQVeH9wxsrPDJS^41cYa|gl_?|Kj-53;hryDcKpy6PSxgGD-5AX&MLBAtku;Bkz%n}eNQHfa3O!J}Ob zBPeSzhC{(K83XD~bMx*f7OGXu5im)qDy`ys5%1*=kwktT99+0n0HNdE64yNtJ0wpo z)WRbV9DBV=V2>kd>LhjRun5`#LvE_uEByO~LPwi#i%e^WqM~B9T+?Zz)C%IqV!ddb zW3?0f=f2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(EW!2?TO>7_-UW)#-y}j)t2DtI5b*bsE#+H_eu^N}7V|r1G$1xXnw;5n- z=d1-g*`)0iEZPjv+iEj99_Apy>*8IksU|5Myv2G*m`_3%Q-LS z*3YZGaMhM03W8~((m_pr13;z*jqjB1qS0YMqXL8H$A=F67is;kGW&n;z2fDL>;yeN W>f%eQ2fU6ez|7d{I>zvJ%6|ZS;$eXR literal 0 HcmV?d00001 diff --git a/docs/utilities.md b/docs/utilities.md index 1d29de3..a4a01c6 100644 --- a/docs/utilities.md +++ b/docs/utilities.md @@ -124,4 +124,40 @@ def setup(): Results in: -![dist demo](img/dist_2.png) \ No newline at end of file +![dist demo](img/dist_2.png) + +### Accessing the canvas frame rate + +The frame rate of the canvas can be accessed through the built-in variable + +```python +FRAME_RATE +``` + +The value of FRAME_RATE is set to 30 by default, and should not be changed by the user. Changing this manually will not change the actual frame rate, and will likely result in errors. + +**Example:** + +```python +%%ignite + +def setup(): + print(FRAME_RATE) +``` + +Results in: + +![FRAME_RATE demo](img/frame_rate.png) + +The use-cases of this of this variable are fairly limited, but can be used for example to set a speed variable in terms of the frame rate. For example: + +```python +x = 10 +speed = 300/FRAME_RATE + +def draw(): + global x, speed + circle(x, 100, 50) + x += speed +``` +will result in the circle moving across the screen at 300 pixels per second. \ No newline at end of file From f273f6490ce75dc4ad741b8e961021657b71642c Mon Sep 17 00:00:00 2001 From: R Lee Date: Tue, 16 Mar 2021 18:28:55 -0600 Subject: [PATCH 18/18] Bumped version number to v0.1.3 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 7a86262..bb9da52 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="schulich-ignite", - version="0.1.2", + version="0.1.3", author="Schulich Ignite", author_email="info@shulichignite.com", description="Spark library for Shulich Ignite sessions",