summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony LaTorre <devnull@localhost>2017-11-10 10:55:44 -0600
committertlatorre <tlatorre@uchicago.edu>2021-05-09 08:42:39 -0700
commit96d16c8f17e5ae1c027d7c9392b7518be9762f24 (patch)
tree8e464da61991495533d47562bb0307ffb8a57f87
parentf8b175bfb79451578fdc8d831bb01833749ce38b (diff)
downloadchroma-96d16c8f17e5ae1c027d7c9392b7518be9762f24.tar.gz
chroma-96d16c8f17e5ae1c027d7c9392b7518be9762f24.tar.bz2
chroma-96d16c8f17e5ae1c027d7c9392b7518be9762f24.zip
fix torus function to use radius argument
-rw-r--r--chroma/make.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/chroma/make.py b/chroma/make.py
index 0daea78..64ff6e6 100644
--- a/chroma/make.py
+++ b/chroma/make.py
@@ -144,7 +144,7 @@ def torus(radius, offset, nsteps=64, circle_steps=None):
if circle_steps is None:
circle_steps = nsteps
profile_angles = np.linspace(0, 2*np.pi, circle_steps)
- return rotate_extrude(np.cos(profile_angles) + offset, np.sin(profile_angles), nsteps)
+ return rotate_extrude(radius*np.cos(profile_angles) + offset, radius*np.sin(profile_angles), nsteps)
def convex_polygon(x, y):
"""