What is an Oval ? ( was Re: Newbie: Machining an oval?
Posted by
Indy123456
on 2003-05-19 00:31:26 UTC
--- In CAD_CAM_EDM_DRO@yahoogroups.com, "gglines1" <gglines@c...>
wrote:
You calculate point on a circle at a given angle by...
X = R * cos(angle)
Y = R * sin(angle)
For an ellipse, use half the long length for the R in the X calc and
half the short width for the R in the Y calc...
X = (length/2) * cos(angle)
Y = (width/2) * sin(angle)
In IBasic...
DEF win:WINDOW
WINDOW win, 200, 50, 400, 400, @caption, 0, "120 Segment Ellipse",
main
deg2rad=(4*atan(1))/180 : 'trig functions require angles in radians
DIAX=220 : 'long length
DIAY=90 : 'short length
XC=130 : 'X center
YC=130 : 'Y center
R1=DIAX/2 : R2=DIAY/2
FOR Ang=0 to 360 #3
if Ang>0
oldx=x : oldy=y
endif
x = R1 * cos(Ang*deg2rad)
y = R2 * sin(Ang*deg2rad)
'draw segment
if Ang>0
line win, XC+oldx, YC+oldy, XC+x, YC+y
endif
NEXT Ang
run = 1: WAITUNTIL run = 0: CLOSEWINDOW win: END
SUB main
SELECT @CLASS
CASE @IDCLOSEWINDOW
run = 0
ENDSELECT
RETURN
wrote:
>George,
> Where did you find those mathemtical relationships? I've found
> references to drawing them by hand using a string anchored to two
> points, but nothing about how to calculate the relationships.
>
> George
You calculate point on a circle at a given angle by...
X = R * cos(angle)
Y = R * sin(angle)
For an ellipse, use half the long length for the R in the X calc and
half the short width for the R in the Y calc...
X = (length/2) * cos(angle)
Y = (width/2) * sin(angle)
In IBasic...
DEF win:WINDOW
WINDOW win, 200, 50, 400, 400, @caption, 0, "120 Segment Ellipse",
main
deg2rad=(4*atan(1))/180 : 'trig functions require angles in radians
DIAX=220 : 'long length
DIAY=90 : 'short length
XC=130 : 'X center
YC=130 : 'Y center
R1=DIAX/2 : R2=DIAY/2
FOR Ang=0 to 360 #3
if Ang>0
oldx=x : oldy=y
endif
x = R1 * cos(Ang*deg2rad)
y = R2 * sin(Ang*deg2rad)
'draw segment
if Ang>0
line win, XC+oldx, YC+oldy, XC+x, YC+y
endif
NEXT Ang
run = 1: WAITUNTIL run = 0: CLOSEWINDOW win: END
SUB main
SELECT @CLASS
CASE @IDCLOSEWINDOW
run = 0
ENDSELECT
RETURN
Discussion Thread
gglines1
2003-05-17 06:44:07 UTC
Newbie: Machining an oval?
turbulatordude
2003-05-17 07:24:43 UTC
Re: Newbie: Machining an oval?
ccq@x...
2003-05-17 08:37:21 UTC
Re: [CAD_CAM_EDM_DRO] Re: Newbie: Machining an oval?
Indy123456
2003-05-17 15:15:04 UTC
Re: Newbie: Machining an oval?
Raymond Heckert
2003-05-17 16:17:47 UTC
Re: [CAD_CAM_EDM_DRO] Newbie: Machining an oval?
gglines1
2003-05-17 16:34:31 UTC
Re: Newbie: Machining an oval?
gglines1
2003-05-17 16:36:26 UTC
Re: Newbie: Machining an oval?
gglines1
2003-05-17 16:38:21 UTC
Re: Newbie: Machining an oval?
gglines1
2003-05-17 16:46:00 UTC
Re: Newbie: Machining an oval?
turbulatordude
2003-05-17 16:49:25 UTC
What is an Oval ? ( was Re: Newbie: Machining an oval?
turbulatordude
2003-05-17 17:09:26 UTC
Re: Newbie: Machining an oval?
gglines1
2003-05-17 20:17:13 UTC
What is an Oval ? ( was Re: Newbie: Machining an oval?
turbulatordude
2003-05-17 21:40:02 UTC
What is an Oval ? ( was Re: Newbie: Machining an oval?
Raymond Heckert
2003-05-18 16:23:44 UTC
Re: [CAD_CAM_EDM_DRO] Re: Newbie: Machining an oval?
glee@i...
2003-05-18 17:01:14 UTC
I am looking for Lathe Cutting tool parameters for CNC
gglines1
2003-05-18 23:40:35 UTC
What is an Oval ? ( was Re: Newbie: Machining an oval?
Indy123456
2003-05-19 00:31:26 UTC
What is an Oval ? ( was Re: Newbie: Machining an oval?
glee@i...
2003-05-19 09:53:14 UTC
Re: I am looking for Lathe Cutting tool parameters for CNC
Andrew Mawson
2003-05-19 10:13:18 UTC
Re: I am looking for Lathe Cutting tool parameters for CNC
glee@i...
2003-05-19 10:25:18 UTC
Re: [CAD_CAM_EDM_DRO] Re: I am looking for Lathe Cutting tool parameters for CNC
David A. Frantz
2003-05-19 10:35:25 UTC
Re: [CAD_CAM_EDM_DRO] Re: I am looking for Lathe Cutting tool parameters for CNC
glee@i...
2003-05-19 10:42:37 UTC
Re: [CAD_CAM_EDM_DRO] Re: I am looking for Lathe Cutting tool parameters for CNC
gglines1
2003-05-19 13:35:41 UTC
What is an Oval ? ( was Re: Newbie: Machining an oval?
Andrew Mawson
2003-05-19 15:03:41 UTC
Re: I am looking for Lathe Cutting tool parameters for CNC
doug98105
2003-05-19 17:42:43 UTC
Re: I am looking for Lathe Cutting tool parameters for CNC
Jon Elson
2003-05-19 22:30:04 UTC
Re: [CAD_CAM_EDM_DRO] Re: I am looking for Lathe Cutting tool parameters for CNC
glee@i...
2003-05-21 21:51:54 UTC
Re: [CAD_CAM_EDM_DRO] Re: I am looking for Lathe Cutting tool parameters for CNC
glee@i...
2003-05-22 00:25:37 UTC
Re: [CAD_CAM_EDM_DRO] Re: I am looking for Lathe Cutting tool parameters for CNC
glee@i...
2003-05-22 21:01:24 UTC
CAD/CAM Tutorial posted on my web site: