![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| G-Code Programing Discuss G-code programing and problems here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
hello sorry.my English is very weak i hope that you understand my message i am trying to write a program g-code with delphi but i have problems about G02 and draw a circle becuse i can not use Arc and i had to draw a circle with lines.please help me to find a solution for this problem.how draw line and what kind of parameters i need? please help me |
|
#2
| |||
| |||
| Hi In order to draw a circle using lines consider the equation of the circle X^2+Y^2 = R^2 You know the radius of the circle. Consider a point on circle. Let it be (X1,Y1). Now increment the X1 value to X2 = X1+0.01 and calculate the corresponding Y2 value from equation Y2 = squareroot(R^2 - X2^2). Iterate the process by incrementing the X value to 0.01 until Xn = X1 + 2R. So now u will get a set points and by joining those points you will get a semicircle. Proceed in the reverse way i.e. from Xn to X1 to get the other semicircle. |
|
#3
| |||
| |||
u mean the new equation of the circle is x2^2+y2^2=R2^2 but i want to write this equation in delphi or other programming langauge.for example in delphi it write by lineto(x,y) so how i can write it? |
|
#4
| ||||
| ||||
| i dont think it is a good idea to set a linear increment, cause it is a trigonometric function. With a linear increment, acuracy won't be the same all aroud the circle.Instead, use an angular increment. A=Angle R=radius I=increment Do this loop while A is less that the value you want to reach X=cosA*R y=sinA*R lineto(x,y) A=A+I |
|
#6
| |||
| |||
|
you have to iterate the equation several times and use the numeric values arrived from the equation |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Draw Bar | g29cc | Novakon Systems | 2 | 08-12-2010 08:58 AM |
| Need Help!- How to draw this? | SPEEDRE | Solidworks | 9 | 06-15-2009 09:10 PM |
| cut circle | bbrown2005 | Mach Wizards, Macros, & Addons | 2 | 02-04-2009 06:41 PM |
| Need Help!- ?s on How to draw a Hex. | Stampede | BobCad-Cam | 12 | 02-03-2009 08:26 PM |
| Need Help!- okk-mha-400 draw bar | Ethan H | OKK | 0 | 10-07-2008 08:39 PM |