Newsgroups: comp.lang.c++,comp.object,comp.theory,comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!cam-news-feed3.bbnplanet.com!cam-news-hub1.bbnplanet.com!news.bbnplanet.com!news.maxwell.syr.edu!frii.com!coopnews.coop.net!indra.com!net.indra.com!roger
From: "Roger T." <roger@indra.com>
Subject: Re: Opinions on Ellipse-Circle dilemma?
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Lex Spoon <sspoon@clemson.edu>
Sender: usenet@indra.com (System Administrator)
Organization: Indra's Net, Inc. -- Public Access Internet.
Message-ID: <Pine.BSI.3.95q.970216141844.14475B-100000@net.indra.com>
References: <5d4fmf$7gk@bagan.srce.hr> <u8rvi86ntcx.fsf@miris10.leeds.ac.uk><32FA2A1C.6B31@arscorp.com> <5dm3g8$pr6@news2.delphi.com><32ffa121.20952788@news.igs.net> <33009040.76543834@news.wyoming.com><33029662.5F5@erols.com><01bc19ee$55787600$371883cc@beast.advancedsw.com> <m2g1yywra7.fsf@chaos.mccabe.clemson.edu>
Mime-Version: 1.0
In-Reply-To: <m2g1yywra7.fsf@chaos.mccabe.clemson.edu>
X-Nntp-Posting-Host: net.indra.com
Date: Sun, 16 Feb 1997 21:46:16 GMT
Lines: 81
Xref: glinda.oz.cs.cmu.edu comp.lang.c++:248256 comp.object:61229 comp.theory:18006 comp.lang.smalltalk:51721


On 15 Feb 1997, Lex Spoon wrote:

> Pretty cool that you did conics in 7th grade.  In American (or at
> least South Carolinean) public schools we don't do algebra until at
> least 8th grade, and we don't do conics until Algebra II, which is at
> least 9th grade and is typically 10th or 11th even for students on
> "advanced" tracks.  :(

I guess I just had some math teachers in 7th grade that were overzealous.
:-)

> Anyway, while (focus, focus, center) does not define an ellipse (you
> need some measure of radius, whatever it's called for an ellipse),

What we call radius is actually a function. For a circle that function 
just happens to be constant, (e.g., f(x,y) = r). You can derive a similar
funtion for any ellipse but that function will not be constant. It will be
a non-linear function of x and y.

> your definition forces the ellipse to be at the origin and forces 
> its axes to be parallel to the x- and y- axes.

You are right. The equation I gave is not the general equation. That can
be easily remedied by adding the offset parameters. THough as others
have mentioned, the more general definition from conics is
probably even better if you are going to do a real bangup job. However, It
doesn't change my point in either case.

> The definitions most people seem to have in mind (and which I like)
> are:
> 
> 	Ellipse has: focus1, focus2, "radius" (what's it called??)

Don't know that it has a name but you can easily derive the equation for
it. I would guess it is likely called "radius" as well.

> 	Circle has:  focus, radius
> 
> A Circle can masquerade perfectly as an Ellipse by returning the same
> point for both foci.  The only problem appears when you allow
> methods that modify the foci....
> 
> So here's my take on the "dilemna".
> 
> Mathematically, a circle is-an ellipse.  However, in mathematics,
> you can't alter an object after you create it

<boggle>

 I guess my instructors weren't so sharp. They never talked about
the "in mathematics,  you can't alter an object after you create it"
thereom. (IMYCAAOAYCI Thereom)

>--you can just create
> a new object which is similar to the old one.

Well this all gets very philisophical as it begs the questions: " What is
an object?" and "what is creation?".

> On a computer, if you allow your "Ellipse" to be modified, then
> it is no longer a mathematical ellipse, 

Hmmm. Now we have another type of entity. The Mathematical Ellipse versus
The Ellipse. Soory. I'm not familiar with this mathematical tenet. A
serious oversight I fear.

>and it's not such a
> terrible thing that a "Circle" isn't-an "Ellipse".

It really isn't so terrible to believe in Santa either. :-)

> One final note.  There IS a point in bothering with the subclass: the
> subclass is more efficient!

Efficiency at all cost, eh? Now there's a great guideline. Isn't all the
overhead created by OO capabilities in computer languages a violation of
that guideline?

Roger T.

