Computer Science Canada How to draw a circle by using sine and cosine??? |
Author: | 8749236 [ Thu Feb 03, 2011 8:25 pm ] | ||
Post subject: | How to draw a circle by using sine and cosine??? | ||
What is it you are trying to achieve? i was trying to draw a circle by not using drawoval... What is the problem you are having? how do i make a program to draw a circle by using sine and cosine??? Describe what you have tried to solve this problem i have tryied to put the sin or cos functiion in X coordinate of drawlin function, but it is not working... Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) <Answer Here>
Please specify what version of Turing you are using Turing 4.1.1 |
Author: | Tony [ Thu Feb 03, 2011 8:38 pm ] |
Post subject: | Re: How to draw a circle by using sine and cosine??? |
8749236 @ Thu Feb 03, 2011 8:25 pm wrote: ... by using sine and cosine ... .. i have tryied to put the sin or cos ... The problem is that of Math and understanding what sine and cosine are. ![]() |
Author: | TerranceN [ Thu Feb 03, 2011 8:40 pm ] |
Post subject: | RE:How to draw a circle by using sine and cosine??? |
Just a word of warning, you might want cosd and sind instead, cause cos and sin use radians, while cosd and sind use degrees. I would suggest looking at <a href="http://en.wikipedia.org/wiki/Unit_circle">this</a>. You might first want to just use sin(i) and cos(i) to keep it simple, and Draw.Dot to make sure each of your points is actually on the circle. Also, you should multiply those x and y values by 50 or 100 cause a 1pixel circle would be hard to see. |
Author: | 8749236 [ Fri Feb 04, 2011 10:29 am ] |
Post subject: | RE:How to draw a circle by using sine and cosine??? |
i got it.. thank you guys ![]() |