Skip to main content

Trigonometric functions generalized for parabolas and polygons

Project description

Generalized Trigonometry
By Katherine Rose, Alexander Joseph and Joshua Piety

Generalized Trigonometry

Generalized Trigonometry is a python extension that provides trigonometric functions for systems other than a circle. For example, the following function draws a square:

A parametric equation square of t where x is equal to polygonal cosine 4 of t and y is equal to polygonal sine 4 of t

Functions

import gentrig as gt

Parabolic

gt.sinp(x)
gt.cosp(x)
gt.tanp(x)
gt.cscp(x)
gt.secp(x)
gt.cotp(x)

Self-explanatory: Parabolic trig is similar to hyperbolic trig, but applied to a parabola instead of a hyperbola.

Linear

gt.sinl(x)
gt.cosl(x)
gt.tanl(x)
gt.cscl(x)
gt.secl(x)
gt.cotl(x)

Trigonometry applied to a line. This is actually equivalent to polygonal trig with 2 sides. For example:

linear sine of x is equal to polygonal sine 2 of x

However, due to implementation details the sinl(x) function in this library is much faster than sinpoly(x,2).

Polygonal

# Where n is the number of sides
gt.sinpoly(x,n)
gt.cospoly(x,n)
gt.tanpoly(x,n)
gt.cscpoly(x,n)
gt.secpoly(x,n)
gt.cotpoly(x,n)

Polygonal trig is fun! You can draw regular polygons of "radius" 1 (unit polygons, perhaps) with arbitrary numbers of sides using just sinpoly and cospoly! The library won't stop you from using sinpoly(x,n) with when n is less than one or not an integer, but behavior in those cases is undefined. It's also worth noting that as n approaches infinity sinpoly(x,n) approaches sin(x), which is pretty intuitive if you think of a circle as an infinite-sided polygon. You can plot this to get a unit polygon with n sides:

A parametric equation where x is equal to polygonal cosine n of t and y is equal to polygonal sine n of t

Installing gentrig...

From PyPI

gentrig has been released on PyPI! You can install it with pip install gentrig and use it like any other python library!

From source

  1. Clone this repo: git clone https://github.com/KiARC/gentrig.git
  2. Move into the repository's directory: cd gentrig
  3. Build and install with pip: pip install .

gentrig can now be imported within whichever environment's pip was used to install it.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

gentrig-0.1.2-cp314-cp314t-win_amd64.whl (16.4 kB view details)

Uploaded CPython 3.14tWindows x86-64

gentrig-0.1.2-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (33.8 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

gentrig-0.1.2-cp314-cp314t-macosx_11_0_arm64.whl (12.3 kB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

gentrig-0.1.2-cp314-cp314t-macosx_10_13_x86_64.whl (12.6 kB view details)

Uploaded CPython 3.14tmacOS 10.13+ x86-64

gentrig-0.1.2-cp314-cp314-win_amd64.whl (16.0 kB view details)

Uploaded CPython 3.14Windows x86-64

gentrig-0.1.2-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (30.3 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

gentrig-0.1.2-cp314-cp314-macosx_11_0_arm64.whl (12.0 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

gentrig-0.1.2-cp314-cp314-macosx_10_13_x86_64.whl (12.3 kB view details)

Uploaded CPython 3.14macOS 10.13+ x86-64

gentrig-0.1.2-cp313-cp313-win_amd64.whl (15.5 kB view details)

Uploaded CPython 3.13Windows x86-64

gentrig-0.1.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (30.2 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

gentrig-0.1.2-cp313-cp313-macosx_11_0_arm64.whl (12.0 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

gentrig-0.1.2-cp313-cp313-macosx_10_13_x86_64.whl (12.3 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

gentrig-0.1.2-cp312-cp312-win_amd64.whl (15.5 kB view details)

Uploaded CPython 3.12Windows x86-64

gentrig-0.1.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (30.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

gentrig-0.1.2-cp312-cp312-macosx_11_0_arm64.whl (12.0 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

gentrig-0.1.2-cp312-cp312-macosx_10_13_x86_64.whl (12.3 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

gentrig-0.1.2-cp311-cp311-win_amd64.whl (15.5 kB view details)

Uploaded CPython 3.11Windows x86-64

gentrig-0.1.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (29.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

gentrig-0.1.2-cp311-cp311-macosx_11_0_arm64.whl (12.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

gentrig-0.1.2-cp311-cp311-macosx_10_9_x86_64.whl (12.4 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

gentrig-0.1.2-cp310-cp310-win_amd64.whl (15.5 kB view details)

Uploaded CPython 3.10Windows x86-64

gentrig-0.1.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (29.3 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

gentrig-0.1.2-cp310-cp310-macosx_11_0_arm64.whl (12.1 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

gentrig-0.1.2-cp310-cp310-macosx_10_9_x86_64.whl (12.4 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

Details for the file gentrig-0.1.2-cp314-cp314t-win_amd64.whl.

File metadata

File hashes

Hashes for gentrig-0.1.2-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 373ee94c3e5dd791d7ab561a7ee17fca10636c393fca8ca1a1f9c56ad0a0c5ba
MD5 de63cd844a80679a73b14d708661b13b
BLAKE2b-256 4e1581f99993315f7b928dfef3bc825d5e1439040a6c6c3bf3ace37850639fca

See more details on using hashes here.

File details

Details for the file gentrig-0.1.2-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for gentrig-0.1.2-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 07879423b5ef947d98a75839ae053c18581e8805af34ebd2e39a3d6bd3337a7d
MD5 490b2dae46c8cedfd5ab546d94e7f032
BLAKE2b-256 6471854bab354e3bfc678fa73c5470e1000bc6a6caed9a379cfe03c890c2a22f

See more details on using hashes here.

File details

Details for the file gentrig-0.1.2-cp314-cp314t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gentrig-0.1.2-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c408c7fcee4d8e010c9b30a23672021a29de5ca6a93f5711b5e80ebd5655584d
MD5 96e84c4fd0131cdb9c9a6156aca6d68f
BLAKE2b-256 817a21e0482d403ddc455841c5f58ac2d6754fef1f470dcbbae18f0b0c48ff37

See more details on using hashes here.

File details

Details for the file gentrig-0.1.2-cp314-cp314t-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for gentrig-0.1.2-cp314-cp314t-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 94377c3125a118ecc53461b8d88b476a2dd99aa0652e56976bf589ccb68b84a1
MD5 6e2dc2ae80a40993861ad7f6e65c30c2
BLAKE2b-256 88ba87d04f9fab7fc571bf91b4890438efc11fa6bf80b740c17c3b3ef66bba48

See more details on using hashes here.

File details

Details for the file gentrig-0.1.2-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for gentrig-0.1.2-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 670fd5b54f2f7f0a642287a4777638d82be57bd4869175e8cc60282f85bf7769
MD5 ee1038a5de78cc636286fba92c1efc31
BLAKE2b-256 7402dcaea8b37aca91982c61e26c544dfb68f773361ada66ae1445266d762eea

See more details on using hashes here.

File details

Details for the file gentrig-0.1.2-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for gentrig-0.1.2-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e992a03d0ae8f7bdeacbb5d14670cc7d5618dc5ec3e123fbd12b8bfa45fa2bba
MD5 12ee3b8e2b86d31f57cbd18afe07e577
BLAKE2b-256 76e2868fecbfc16f3b35e2ebb8bdcda9d814b46e817b76cfac6ae433658fa407

See more details on using hashes here.

File details

Details for the file gentrig-0.1.2-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gentrig-0.1.2-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 792adfff37100404710ca49b4fb477a9eac6b6d2d4653f8ff77b0913fef5b2ce
MD5 cd44fb23732eb6288321b990c308dfde
BLAKE2b-256 f9b506c19ba1ad53c247e379bd307447bfa82868bd9cadea4be2656441846960

See more details on using hashes here.

File details

Details for the file gentrig-0.1.2-cp314-cp314-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for gentrig-0.1.2-cp314-cp314-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 ec5c8766e2489f39772b1a24220d5a8dde29f06c23351a547a5628bed0c32f6e
MD5 bb8f01e05d07a21518afb9cc63571954
BLAKE2b-256 c182f38ac4f57d492399ba3f587aa15d6ebdf63108b97c32fd4ffe1bec590034

See more details on using hashes here.

File details

Details for the file gentrig-0.1.2-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for gentrig-0.1.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 31cdd8319092ba9ca6cc84d7946250b7f350e06a455ec471c06c1e18b5f9af06
MD5 e18996883f7155a06207b313a9280abf
BLAKE2b-256 9d48841a1fc4c49cabc6d4978d780780424125377d0b0e39180d07015a8b8bdb

See more details on using hashes here.

File details

Details for the file gentrig-0.1.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for gentrig-0.1.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 900e77f01ae4f17fdcf7284501e468f77cc201dcdf7519d903163bc5bd627821
MD5 2faca145f1667190d9209b2d9d7cc5c2
BLAKE2b-256 aa20ded2fe40907d40d6b15678e36fcbfc7fb6ba631337e47c3a7f1ec4cff7ee

See more details on using hashes here.

File details

Details for the file gentrig-0.1.2-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gentrig-0.1.2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2d82b919348da0426158e55f985dac99d309b028ed13c00baa7106f0313ca2c6
MD5 48c790d6e34af29c0c2b539a40470f5e
BLAKE2b-256 0483474c31a72de0ed365564a8da0c71d25d0eef20f42f007bbdb1bad8b4ab15

See more details on using hashes here.

File details

Details for the file gentrig-0.1.2-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for gentrig-0.1.2-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 ac0b8281e9b56a19dce8dec52db9e76462a2f2ced34e13688382c170d1a0beab
MD5 bd49504f45f995ffb4ed50ceadffff2f
BLAKE2b-256 9b891ac532f411b6d9a27e0caf9204a9e25157e36a6c140d66e302cb8b764a05

See more details on using hashes here.

File details

Details for the file gentrig-0.1.2-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for gentrig-0.1.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 64b749d8a336fc3d2d4eb75bf35070ffbfe2b913e391e4976c8bfdb86889137d
MD5 7b594d62f64017759894fa185a50ed3a
BLAKE2b-256 12a81020df7181a8b61999979adfadc7c663abab0d85767e4278c74223a1646c

See more details on using hashes here.

File details

Details for the file gentrig-0.1.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for gentrig-0.1.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 33e442e201e355971bf15a25e258b171dd2af4d27ef6a3c3ba773d1333d4f231
MD5 c7c63cc7514ffd423cfb215697ce8d8b
BLAKE2b-256 b72ccfc2ac1bd4981961bfa7cf0077b7f879b68ec002fd16d7c6ffc6d145cafb

See more details on using hashes here.

File details

Details for the file gentrig-0.1.2-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gentrig-0.1.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c378144c8d5ee9202e5b43ff78104937108090e7e88d4bb1f9b59db9428033f5
MD5 6d766de4a0196836ac177e3d288e1cef
BLAKE2b-256 1857df18e88751cdcab0c7fbbde04a0c4252d2b8af6fee610e5290a9d68b540b

See more details on using hashes here.

File details

Details for the file gentrig-0.1.2-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for gentrig-0.1.2-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 0f50b782c35f08b520577975b3c2182ad99657f527c52488212bd00e272828a7
MD5 a7e0772a0b33e341ad254102ca4cf9ed
BLAKE2b-256 6b37f3e09d8c5e2035b92b7e042a29e4786ddcebb705adf1f6db6477f8038eb7

See more details on using hashes here.

File details

Details for the file gentrig-0.1.2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for gentrig-0.1.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 132cb4ba317ca482585985419a4b869066e879729f03e12c832de2a4cde35c2f
MD5 63296dbbe827d6ac92a664e90c1fed6d
BLAKE2b-256 599ba7f3f9777c24058546106ebed3dcbefe1995ef78c06c18f9c9a4c37ed444

See more details on using hashes here.

File details

Details for the file gentrig-0.1.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for gentrig-0.1.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a8d442f7c8d86efbcc45f2e7f019ad134b338fd220bd44e9618ffd414c5b493b
MD5 f86031a03ef3ba80f404b312a79a6d8d
BLAKE2b-256 5a912e7456f0d2510b1124c189c903b2f6da1e54b63ff690b9f25f077443da85

See more details on using hashes here.

File details

Details for the file gentrig-0.1.2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gentrig-0.1.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1f79bf17f5bb9c9919836fe612eccc58f1374546d350e52f15b6388b8a624a4a
MD5 8fd9140bf7e9cd06ffa713b3f22ed8ff
BLAKE2b-256 6ea126b76b39e57306c6150d698a8e3a4c2d1c81bdc0b69f97d3f2f2d81690c8

See more details on using hashes here.

File details

Details for the file gentrig-0.1.2-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for gentrig-0.1.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b405b120e767e10e63a46c46f712ae19563bad7dc179b02fc43f2c8df5c7fb70
MD5 e546a45ddad9d9d31d543f8a3fbf1a12
BLAKE2b-256 32cad8f5b218173ad7c17f3b05469d5c5ccd3aeb780c8e3c655c72a61a44d71a

See more details on using hashes here.

File details

Details for the file gentrig-0.1.2-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for gentrig-0.1.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ed97941cb680e6ae6f2fe03c2d6d260d245c44f207e4e976733b5354ea266742
MD5 d5ee6ed0fd967cbf46b59032bc764684
BLAKE2b-256 925fba3e829df899ba68e07d6d08fe003fd1d8e66f938cee27b4d4d9585adb54

See more details on using hashes here.

File details

Details for the file gentrig-0.1.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for gentrig-0.1.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 725f05be83ec60e76db931fdf4c05756f601c177c50f68a72ba8ff638a342dfd
MD5 ec11aff3e09438063069b87657fa7d15
BLAKE2b-256 41d7d39b00756dc49e68d103faf880fd83297c5510235c4ead5ff6f6d296dc5b

See more details on using hashes here.

File details

Details for the file gentrig-0.1.2-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gentrig-0.1.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f952ef592ce0c3bfe3fac6449be39066b37032a6101e2e659bba2bd6db716d7f
MD5 fffce6d75a2dfc9524c9ac933da140a7
BLAKE2b-256 1cfd7bf2df7cae6955594e19433634da170d1d3de29ec9d057d44977b85c043c

See more details on using hashes here.

File details

Details for the file gentrig-0.1.2-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for gentrig-0.1.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 202d64e741ee58ce03c493aa40786a21fe065dca42a9dca10cea11d0cfbd9f86
MD5 ce6b795adfa818484feaaf11fe91ac8d
BLAKE2b-256 95ac335f4e6d1e56d55e9bcc4d8ba30447af0dba0a377c154f0828067677648d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page