How to draw a circle not in the middle?

Trying to use pen to draw a circle, the way i learned how to do that was basically:
for i in range 1-360 { go to x:((sin of i)*circleSize) y:((cos of i)*circleSize) }
but that will just draw it in the centre (0,0), but i can't quite work out how to move that circle somewhere else.

Just add a addition function to the x and y, with the x and y being the center

You guys have made the mistake of going to School, where they taught you the dreaded Cartesian geometry. This is all much easier if you think in terms of turtle geometry! To draw a circle, you just move a tiny bit, turn a tiny bit, repeat. No trig needed!


untitled script pic (5)
(Where'd that formula come from? The circumference of the circle is 2𝜋r, and each step is 1/360th of the circumference. But in practice people don't worry about the exact radius; they just pick a small step length, say 0.5, to get something roughly similar in size to radius-30 circles.)

If you really want to start and end in the center of the circle, that's straightforward too, but a longer script:

that worked!! tysm!

That seems like 10 times more complicated in my brain but pretty interesing so ill look into this once i finished the project im on haha
I think my mistake was actually not going to school i know how to do this from a sticky note on my pinboard in my dad's handwriting so god knows where this info came from loll

I learned how to create a circle just by messing with the sin and cos functions, I never learned it in school either.

Tan function: Am I a joke to you?

NGL, but tan is kinda useless.

tan = sin/cos. Also how is tan useless?

You can only use $$\tan$$ to find $$\sin$$ or $$\cos$$ if you know one of them already. But, if you know one already, you can just use the inverse of it to find the angle, and the angle to find the other one. So, yeah. Useless. (also, it's undefined whenever $$\cos\theta=0$$.)

Or when angle is 90

If $$\theta=90$$° or $$180$$°, $$\cos\theta=0$$

270?

$$\cos270=0$$.

Ok. So what about 360 or 0?

$$\cos360=1$$
$$\cos0=1$$

If what you're trying to do is draw graphs, yes, but arctan is totally useful!

And there are lots of uses of trig functions having nothing to do with geometry.

Ah, so your mistake was having a dad who went to School! ;~P

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.