# Thread: Help!! Using Formulae to turn ovals with Mach3

1. ## Help!! Using Formulae to turn ovals with Mach3

I need to turn an oval object where elliptical path around the object axis can be defined by a standard equation describing an ellipse. I can see Mach3 should be able to do this by using its formula function... only I don't know how to go about it.

How about guiding the lathe x-axis along a sinusoidal or cosine path around the turning axis? I think there is a huge potential here...

Can anyone help?

Rajiv

2. Here is a post I did a short while ago.
http://www.cnczone.com/forums/showpo...22&postcount=4 (milling an elipse)

And playing with it a bit more, I added some Sin wave noise to the ellipse.

Code:
```G0X0Y0

#102=0.25(ANGLE STEP)
#104=30.0(ROTATE PATTERN)
#106=60.0(MULTIPLIER FOR NOISE FREQ)
#107=0.3(MULTIPLIER FOR NOISE AMP)
(****************)
#103=-1(COUNTER)
G68X0Y0R#104
#105=#107*SIN[#106*#103]
G1G41X[[#100+#105]*COS[#103]] Y[[#101+#105]*SIN[#103]] D1 F10.0
WHILE [#103 LE 360] DO1
#105=#107*SIN[#106*#103]
G1X[[#100+#105]*COS[#103]] Y[[#101+#105]*SIN[#103]] F10.0
#103=#103+#102
END1
G1G40X0Y0
G69```
Here is a good book for learning this type of programming.
Not all of it will apply to controls like Mach3 but still a good referance.

3. Why not post on the Mach 3 site? www.artofcnc.ca and goto the general discussion forum, those guys are VERY helpfull. Good luck!