BoxTurtle


NameBoxTurtle JSON
Version 1.1.5 PyPI version JSON
download
home_page
SummarySimple turtle graphics library with 3D integration
upload_time2023-12-13 16:37:57
maintainer
docs_urlNone
author
requires_python>=3.10
licenseCopyright © 2023 Chadwick Milliman Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords turtle 3d graphics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # BoxTurtle v1.1.5

BoxTurtle will automatically import and translate all regular turtle functions. This means that you do not have to import turtle on it's own to perform any regular turtle functions, just use BoxTurtle.

For example, you do not have to do:

    import turtle
    import BoxTurtle
    turtle.bgcolor("white")
    BoxTurtle.goto(0, 30, 0)
    turtle.done()

You can simply do:

    import BoxTurtle
    BoxTurtle.bgcolor("white")
    BoxTurtle.goto(0, 30, 0)
    BoxTurtle.done()

However, even though BoxTurtle will import turtle on its own, you must have turtle installed with your version of Python.

---

*Note: I did not write any original turtle commands, I just redefined them. The only functions that I wrote on my own are the ones documented below, all of which were written using various different functions from the original turtle library. All credit goes to the creators of the original turtle module, and for information on the usage of any turtle functions not shown below, please consult documentation for the original turtle library.*

---

Functions:

---

- goto(x, y, z)

As with the original turtle module, the goto function makes the turtle travel to the point specified. However, now it must account for the z axis as well. This means that goto now takes three arguments (x, y and z) instead of just two (x and y).

    BoxTurtle.goto(x, y, z)

Example:

    BoxTurtle.goto(0, 30, 0)

*(Turtle will travel to 0, 30, 0)*

---

- line(startX, startY, startZ, endX, endY, endZ)

Draws a line from a point defined by startX, startY and startZ to a point definded by endX, endY and endZ.

    BoxTurtle.line(startX, startY, startZ, endX, endY, endZ)

Example:

    BoxTurtle.line(0, -30, 0, 0, 30, 0)

*(Draws a line from 0, -30, 0 to 0, 30, 0)*

---

- cube(x, y, z, size)

Draws a three dimensional cube. The first three arguments, x, y and z, define the point of which the center of the cube will be located. Note that unlike the square function in the original turtle module, this is NOT where the corner of the cube is, but where the center of the cube is, meaning the cube will be centered at that point. Size will determine the length of each edge of the cube. If no parameters are set, they will automatically be set as (0, 0, 0, 10)

    BoxTurtle.cube(x, y, z, size)

Example:

    BoxTurtle.cube(0, 0, 0, 10)

*(Creates a cube centered at 0, 0, 0 with a height, width and length of 10)*

---

- rotate(x, y, z)

Rotate the position of the turtle around any of the three axis. It takes three arguments, x, y, and z. The function will modify the rotation around each axis by the number stated. Note that it rotates AROUND each axis, so increasing x rotation will rotate flip it up, increasing y rotation will flip left, etc. This will also only rotate anything rendered after the function call, so all previous points will remain the same untill clear() is called.

    BoxTurtle.rotate(x, y, z)

Example:

    BoxTurtle.rotate(0, 5, 0)
    BoxTurtle.cube(0, 0, 0, 10)

*(This will create a cube that has been rotated around the x axis slightly)*

---

- stampaxis(size)

Draw the x, y and z axis on the plane to help to show rotations. Note that this will not update when rotations are increased or decreased, and can only be hidden by calling clear(). It effectively acts the same as the regular stamp() method, only it draws the axis instead of the turtle. The function takes an argument for size, but if none is given it will default to 20.

    BoxTurtle.stampaxis(size)

Example:

    BoxTurtle.stampaxis(20)

*(Will draw the x, y and z axis scaled to 20)*

---

- movecam(x, y, z)

Move the camera through the plane. The function takes three arguments, one for x, y, and z, and each determine how much the cam is moved. Just like the rotate function, this only applies to anything drawn after the function is called.

    BoxTurtle.movecam(x, y, z)

Example:

    BoxTurtle.movecam(5, -5, 0)

*(Will move the cam right 5 and down 5)

---

- Other functions

*Note: The functions listed below are the only functions from the original turtle module usable BoxTurtle library. Any other functions that you wish to use from the original turtle library can only be used if you import the turtle library seperatly. Be wary of doing this, as it may override any functions called from BoxTurtle or cause errors.*

*Once again, I do not claim credit for any of the functions in this library shown below, I simply imported the turtle package and redefined them so they could be used in combonation with BoxTurtle. The only functions I wrote are the ones displayed above, all of which were written using the 3D projection formula and existing turtle functions.*

---

bgcolor()

speed()

title()

done()

penup()

pendown()

color()

pensize()

clear()

tracer()

*Note: tracer() can now only take one argument. In order to turn off refreshing use tracer(False), or tracer(True) to turn it back on.*

update()

Screen()

Turtle()

mainloop()

setup()

stamp()

BoxTurtle()

exitonclick()

bye()

---

*Build v1.1.5*

---

*GitHub: https://github.com/chadwickjr*

---

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "BoxTurtle",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "turtle,3D,graphics",
    "author": "",
    "author_email": "chadwickjr <chadmillimanjr@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/51/a8/481df2525ec89534d66953c2a8cf75e5ffff0ee3f325fb7a2a5fb5ace9a9/BoxTurtle-1.1.5.tar.gz",
    "platform": null,
    "description": "# BoxTurtle v1.1.5\n\nBoxTurtle will automatically import and translate all regular turtle functions. This means that you do not have to import turtle on it's own to perform any regular turtle functions, just use BoxTurtle.\n\nFor example, you do not have to do:\n\n    import turtle\n    import BoxTurtle\n    turtle.bgcolor(\"white\")\n    BoxTurtle.goto(0, 30, 0)\n    turtle.done()\n\nYou can simply do:\n\n    import BoxTurtle\n    BoxTurtle.bgcolor(\"white\")\n    BoxTurtle.goto(0, 30, 0)\n    BoxTurtle.done()\n\nHowever, even though BoxTurtle will import turtle on its own, you must have turtle installed with your version of Python.\n\n---\n\n*Note: I did not write any original turtle commands, I just redefined them. The only functions that I wrote on my own are the ones documented below, all of which were written using various different functions from the original turtle library. All credit goes to the creators of the original turtle module, and for information on the usage of any turtle functions not shown below, please consult documentation for the original turtle library.*\n\n---\n\nFunctions:\n\n---\n\n- goto(x, y, z)\n\nAs with the original turtle module, the goto function makes the turtle travel to the point specified. However, now it must account for the z axis as well. This means that goto now takes three arguments (x, y and z) instead of just two (x and y).\n\n    BoxTurtle.goto(x, y, z)\n\nExample:\n\n    BoxTurtle.goto(0, 30, 0)\n\n*(Turtle will travel to 0, 30, 0)*\n\n---\n\n- line(startX, startY, startZ, endX, endY, endZ)\n\nDraws a line from a point defined by startX, startY and startZ to a point definded by endX, endY and endZ.\n\n    BoxTurtle.line(startX, startY, startZ, endX, endY, endZ)\n\nExample:\n\n    BoxTurtle.line(0, -30, 0, 0, 30, 0)\n\n*(Draws a line from 0, -30, 0 to 0, 30, 0)*\n\n---\n\n- cube(x, y, z, size)\n\nDraws a three dimensional cube. The first three arguments, x, y and z, define the point of which the center of the cube will be located. Note that unlike the square function in the original turtle module, this is NOT where the corner of the cube is, but where the center of the cube is, meaning the cube will be centered at that point. Size will determine the length of each edge of the cube. If no parameters are set, they will automatically be set as (0, 0, 0, 10)\n\n    BoxTurtle.cube(x, y, z, size)\n\nExample:\n\n    BoxTurtle.cube(0, 0, 0, 10)\n\n*(Creates a cube centered at 0, 0, 0 with a height, width and length of 10)*\n\n---\n\n- rotate(x, y, z)\n\nRotate the position of the turtle around any of the three axis. It takes three arguments, x, y, and z. The function will modify the rotation around each axis by the number stated. Note that it rotates AROUND each axis, so increasing x rotation will rotate flip it up, increasing y rotation will flip left, etc. This will also only rotate anything rendered after the function call, so all previous points will remain the same untill clear() is called.\n\n    BoxTurtle.rotate(x, y, z)\n\nExample:\n\n    BoxTurtle.rotate(0, 5, 0)\n    BoxTurtle.cube(0, 0, 0, 10)\n\n*(This will create a cube that has been rotated around the x axis slightly)*\n\n---\n\n- stampaxis(size)\n\nDraw the x, y and z axis on the plane to help to show rotations. Note that this will not update when rotations are increased or decreased, and can only be hidden by calling clear(). It effectively acts the same as the regular stamp() method, only it draws the axis instead of the turtle. The function takes an argument for size, but if none is given it will default to 20.\n\n    BoxTurtle.stampaxis(size)\n\nExample:\n\n    BoxTurtle.stampaxis(20)\n\n*(Will draw the x, y and z axis scaled to 20)*\n\n---\n\n- movecam(x, y, z)\n\nMove the camera through the plane. The function takes three arguments, one for x, y, and z, and each determine how much the cam is moved. Just like the rotate function, this only applies to anything drawn after the function is called.\n\n    BoxTurtle.movecam(x, y, z)\n\nExample:\n\n    BoxTurtle.movecam(5, -5, 0)\n\n*(Will move the cam right 5 and down 5)\n\n---\n\n- Other functions\n\n*Note: The functions listed below are the only functions from the original turtle module usable BoxTurtle library. Any other functions that you wish to use from the original turtle library can only be used if you import the turtle library seperatly. Be wary of doing this, as it may override any functions called from BoxTurtle or cause errors.*\n\n*Once again, I do not claim credit for any of the functions in this library shown below, I simply imported the turtle package and redefined them so they could be used in combonation with BoxTurtle. The only functions I wrote are the ones displayed above, all of which were written using the 3D projection formula and existing turtle functions.*\n\n---\n\nbgcolor()\n\nspeed()\n\ntitle()\n\ndone()\n\npenup()\n\npendown()\n\ncolor()\n\npensize()\n\nclear()\n\ntracer()\n\n*Note: tracer() can now only take one argument. In order to turn off refreshing use tracer(False), or tracer(True) to turn it back on.*\n\nupdate()\n\nScreen()\n\nTurtle()\n\nmainloop()\n\nsetup()\n\nstamp()\n\nBoxTurtle()\n\nexitonclick()\n\nbye()\n\n---\n\n*Build v1.1.5*\n\n---\n\n*GitHub: https://github.com/chadwickjr*\n\n---\n",
    "bugtrack_url": null,
    "license": "Copyright \u00a9 2023 Chadwick Milliman  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \u201cSoftware\u201d), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \u201cAS IS\u201d, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Simple turtle graphics library with 3D integration",
    "version": "1.1.5",
    "project_urls": null,
    "split_keywords": [
        "turtle",
        "3d",
        "graphics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fb24d80799d4f0ad87dab5c215b790e7725afccbf5ce87dd02461d7d21a5c1b7",
                "md5": "c516f0b9529cf9bc6f243a07b2954968",
                "sha256": "b4cecba192600e7a45918e167c6adc09c2ff70109512f4502c7abf792d313cbc"
            },
            "downloads": -1,
            "filename": "BoxTurtle-1.1.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c516f0b9529cf9bc6f243a07b2954968",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 5708,
            "upload_time": "2023-12-13T16:37:53",
            "upload_time_iso_8601": "2023-12-13T16:37:53.944621Z",
            "url": "https://files.pythonhosted.org/packages/fb/24/d80799d4f0ad87dab5c215b790e7725afccbf5ce87dd02461d7d21a5c1b7/BoxTurtle-1.1.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "51a8481df2525ec89534d66953c2a8cf75e5ffff0ee3f325fb7a2a5fb5ace9a9",
                "md5": "86b6ba81fa8289fd9b2bfff0f6ad05f3",
                "sha256": "8c6dfaebde433525b8df218f1ef64c8f29032fcc1c67bf8f43ec7c46b145ca8e"
            },
            "downloads": -1,
            "filename": "BoxTurtle-1.1.5.tar.gz",
            "has_sig": false,
            "md5_digest": "86b6ba81fa8289fd9b2bfff0f6ad05f3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 4878,
            "upload_time": "2023-12-13T16:37:57",
            "upload_time_iso_8601": "2023-12-13T16:37:57.604009Z",
            "url": "https://files.pythonhosted.org/packages/51/a8/481df2525ec89534d66953c2a8cf75e5ffff0ee3f325fb7a2a5fb5ace9a9/BoxTurtle-1.1.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-13 16:37:57",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "boxturtle"
}
        
Elapsed time: 0.15135s