Plot Ellipse ***RESOLVED***
This is the routine I am running to plot an ellipse:
XCENTER=6100
YCENTER=4600
XLEN=60000
YLEN=30000
FOR ANGLE=0 TO 360
XPOS = XCENTER + YLEN * COS(ANGLE) * (PI/180)
YPOS = YCENTER + XLEN * SIN(ANGLE) * (PI/180)
PLOT(XPOS,YPOS)
NEXT ANGLE
THIS WILL DRAW AN ELLIPSE WITH ITS MAJOR AXIS (X) ORIENTED 0-180
(NORTH-SOUTH).
HOW CAN I PLOT THE SAME ELLIPSE ROTATING THE MAJOR AXIS (CHANGE THE
THE X AXIS INCLINATION)?
REGARDS
DALTON SERKEZ
[edited by - DSERKEZ on June 16, 2003 1:06:21 PM]
[edited by - DSERKEZ on June 16, 2003 1:07:06 PM]
Original equations
x (q) := xT + xLcos q
y (q) := yT + yLsin q
where C(xT, yT) is the center,
xL, yL are the umm... whadaya call its...
Rotated about C by f radians
x, (q) := xT + xLcos q cos f - yLsin q sin f
y, (q) := yT + xLcos q sin f + yLsin q cos f.
EDIT: Damn fonts!
BTW, quit yellin'! + hasn't this been asked before?
[edited by - GaulerTheGoat on June 15, 2003 3:24:46 AM]
x (q) := xT + xLcos q
y (q) := yT + yLsin q
where C(xT, yT) is the center,
xL, yL are the umm... whadaya call its...
Rotated about C by f radians
x, (q) := xT + xLcos q cos f - yLsin q sin f
y, (q) := yT + xLcos q sin f + yLsin q cos f.
EDIT: Damn fonts!
BTW, quit yellin'! + hasn't this been asked before?
[edited by - GaulerTheGoat on June 15, 2003 3:24:46 AM]
Didn''t mean to be rude, Dalton. I didn''t realize you just signed up. But check the last few weeks worth of posts. Rotation questions are asked every 6 days.
20: ...Qg2 ++
20: ...Qg2 ++
there is big faq on circles and ellips on flipcode.
3D Side-Scroller game demo Project-X2 "playable"Lashkar: A 3D Game & Simulation Project demo @ lashkar.berlios.de
THANKS EVERYONE AND I AM SORRY. I DID SOME FORUM RESEARCH AND HONESTLY I COULD NOT FIND WHAT I WANTED.
I STUDIED YOUR REPPLIES, APPLIED TO MY ROUTINE, MADE SOME CHANGES AND NOW EVERYTHING IS WORKING FINE.
AGAIN, THANKS A MILLION AND SORRY FOR ANY INCONVENIENCE.
REGARDS
DSERKEZ
I STUDIED YOUR REPPLIES, APPLIED TO MY ROUTINE, MADE SOME CHANGES AND NOW EVERYTHING IS WORKING FINE.
AGAIN, THANKS A MILLION AND SORRY FOR ANY INCONVENIENCE.
REGARDS
DSERKEZ
June 17, 2003 03:59 PM
Quick tip, using all capitals on the Internet is considered the text equivalent of yelling, and is seen by many as very rude.
I don''t think you meant this at all, so no harm done, but in the future you might want to turn off that caps lock key
I don''t think you meant this at all, so no harm done, but in the future you might want to turn off that caps lock key

TO:Anonymous Poster
I LIKE CAPITAL LETTERS... SO WHAT????
ANYTHING WRONG WITH THAT????? GET LOST!!!!
TAKE CARE OF YOUR OWN BUSINESS.
BYE
I LIKE CAPITAL LETTERS... SO WHAT????
ANYTHING WRONG WITH THAT????? GET LOST!!!!
TAKE CARE OF YOUR OWN BUSINESS.
BYE
wow. what a jerk.
[edited by - vanillacoke on June 20, 2003 11:47:51 PM]
[edited by - vanillacoke on June 20, 2003 11:47:51 PM]
You know what I never noticed before?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement