Previous in Forum: Spacer Dots   Next in Forum: SMPS
Close
Close
Close
4 comments
Rate Comments: Nested
Anonymous Poster

planning circuit

11/22/2008 1:48 AM

I'd be happy if you offer me a formula to draw a circle on the two axes Thanks, Moshe Deutsch

Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Guru

Join Date: Jul 2007
Posts: 4448
Good Answers: 143
#1

Re: planning circuit

11/22/2008 8:03 AM

r = √(x2 + y2)

Was this a more complicated question than it seems?

__________________
"Well, I've wrestled with reality for 35 years, Doctor, and I'm happy to state I finally won out over it." Elwood P. Dowd
Reply
Guru
Popular Science - Biology - New Member Hobbies - Musician - New Member APIX Pilot Plant Design Project - Member - New Member Hobbies - CNC - New Member Fans of Old Computers - ZX-81 - New Member

Join Date: Jan 2007
Location: Centurion, South Africa
Posts: 3921
Good Answers: 97
#2

Re: planning circuit

11/22/2008 9:17 AM

Are you trying to draw on a machine using steppers?

If so you would need a different approach because near to 90deg a big variation in x result in less than 1 step in y.

If the x increment is too small you may actually end up with a stepped arc.

The best is to draw the arc with a series of relative vectors of unequal length. actually selecting the best xy intersections on the path of the arc.

I am a bit capacity deprived at the moment and cannot get to my notes.

There are some potent formula on the web as well

__________________
Never do today what you can put of until tomorrow - Student motto
Reply
Anonymous Poster
#3

Re: planning circuit

11/23/2008 3:52 PM

In Matlab type

t=0:1/100:2*pi;

plot(sin(t),cos(t))

Reply Off Topic (Score 5)
Anonymous Poster
#4

Re: planning circuit

11/24/2008 7:46 AM

drawing circles is far easier if you use a parametric approach.

for ang = 0 to 6.3 step 0.01;

x:= rad*cos(ang);

y:= rad*sin(ang);

plot(x,y);

next ang;

you will have to play with the step size to get a curve with no holes and offsets in the plot statement to move the circle where you want it on the screen. (And of course translate this into whatever programming language you are using...)

Reply
Reply to Forum Thread 4 comments
Copy to Clipboard

Users who posted comments:

Anonymous Poster (2); Hendrik (1); TVP45 (1)

Previous in Forum: Spacer Dots   Next in Forum: SMPS

Advertisement