Help w/Plotting a circle...

Dave Harris Dave.Harris at f14.n15.z1.fidonet.org
Thu Jun 20 23:57:20 AEST 1991


 >From: joe at proto.com (Joe Huffman)

 >Dave.Harris at f14.n15.z1.fidonet.org (Dave Harris) writes:

>Now if you need some real speed, use the Brezenheim circle alogithm.  It 
>reduces the problem such that you do not need to call the sqrt() function.

 >The real problem with everything I have seen so far is plotting just an 
 >arc.
 >Like from 10 degrees to 25 degrees.  The start and end points are a pain 
 >without trig functions (which are slow).

Nothing good comes to mind immediately.  It does look like you at least need 
to calculate the end points, then you should be able to use the standard 
circle function covered with condition statements.  If you need to plot many 
arcs then you can store the trig values in tables.   The tables can get big 
though if you a granularity of .01 or more.

 


 

--  
Uucp: ...{gatech,ames,rutgers}!ncar!asuvax!stjhmc!15!14!Dave.Harris
Internet: Dave.Harris at f14.n15.z1.fidonet.org



More information about the Comp.lang.c mailing list