Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ellipse trouble
#2
James,

Solving the equation for x is the easy part:
x^2/a^2 + y^2/b^2 = 1
x^2/a^2 = 1 - y^2/b^2
x^2 = (1 - y^2/b^2 )*a^2
x = +sqr((1 - y^2/b^2 )*a^2)
and
x = -sqr((1 - y^2/b^2 )*a^2)
if I haven't made a mistake.

But you can use CIRCLE to draw ellipses.  Or, if you are into self-flagellation, there are algorithms using PSET.

Here is a start using CIRCLE (the ASPECT parameter!):

Code: (Select All)
Screen _NewImage(1024, 768, 256)
Cls 0, 15
Color 0, 15

Circle (512, 384), 200
Circle (512, 384), 100
Circle (512, 384), 200, 9, , , 2 ' blue
Circle (512, 384), 200, 10, , , .5 ' green
___________________________________________________________________________________
I am mostly grateful for the people who came before me.  Will the people after me be grateful for me?
Reply


Messages In This Thread
Ellipse trouble - by james2464 - 08-23-2022, 03:29 PM
RE: Ellipse trouble - by dcromley - 08-23-2022, 04:07 PM
RE: Ellipse trouble - by james2464 - 08-23-2022, 06:37 PM
RE: Ellipse trouble - by bplus - 08-23-2022, 04:54 PM
RE: Ellipse trouble - by james2464 - 08-23-2022, 06:43 PM
RE: Ellipse trouble - by James D Jarvis - 08-23-2022, 05:37 PM
RE: Ellipse trouble - by james2464 - 08-23-2022, 06:48 PM
RE: Ellipse trouble - by bplus - 08-23-2022, 08:51 PM
RE: Ellipse trouble - by james2464 - 08-23-2022, 11:33 PM
RE: Ellipse trouble - by Pete - 08-24-2022, 12:47 AM
RE: Ellipse trouble - by james2464 - 08-24-2022, 01:59 PM
RE: Ellipse trouble - by Pete - 08-25-2022, 02:23 AM
RE: Ellipse trouble - by james2464 - 08-25-2022, 11:38 AM
RE: Ellipse trouble - by Pete - 08-25-2022, 08:58 PM
RE: Ellipse trouble - by james2464 - 08-25-2022, 10:52 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  trouble filling in a closed vector shape madscijr 31 2,530 11-11-2025, 03:41 PM
Last Post: bplus
  trouble building ansiprint by a740g hsiangch_ong 2 590 01-09-2025, 12:57 AM
Last Post: hsiangch_ong
  Having trouble Windows command line SORT via SHELL GTC 19 4,421 08-26-2023, 04:19 AM
Last Post: GTC
  Drawing an ellipse PhilOfPerth 26 5,120 07-06-2023, 09:30 PM
Last Post: OldMoses
  help moving a sprite in a ellipse Cobalt 8 1,736 07-06-2023, 06:52 PM
Last Post: TerryRitchie

Forum Jump:


Users browsing this thread: 1 Guest(s)