2 Questions!

Howdy all,

Is a mathmatically accurate circle considered to have 1 side, or an infinity of sides?

Another question, whats 0/0? is it 1 for the same reason 4/4 is 1?

Circle has no sides, so I suppose inifinite number could also apply…

0/0 is undefined. You cannot divide anything (including 0) by 0.

Here’s an interesting comment on the circle thing:

  1. The word CIRCLE sometimes refers to a circular disk (because it is common to talk about "the area of a circle"), but often the word refers only to the boundary of the disk (namely, the points that are equally distant from the point at the center of the figure).

  2. The meaning of the word SIDE depends on its context. A polygon in the plane has, by definition, n vertices and each pair of consecutive vertices are joined by a side. It is clear that a polygon with n vertices has n sides. In general, the word side depends on the dimension of the figure – a side is always part of the boundary.

    So what is the side of a circle? If you think of the circle as a disk then it it has an up-side and a down-side. If you think of it as a curve, then it has an inside and an outside. If you think of it as the limit of an n-sided regular polygon, then one can justify the answer that the circle has infinitely many infinitesimal sides. Our conclusion:

    the question, "How many sides does a circle have?", is too ambiguous to have a definite answer.

aaaah, kewl. but surely if it had no sides, then there would be no circle in the first place?

i say infinity because like a hexagon, 6 sides, increase it to 64 or 128, you are still in polygon land!

by why isn’t 1, because there is no exact end or finish to that line?

Yeah, I’d say my 0 sides answer is decidedly wrong. I’d think in the context of your question it’s infinite.

so really a circle is neither lives in polygon land, nor in rectangle land. Nor in line land. So a circle is its own entity. 8-O

Actually, I’d think it’s an N-sided Polygon where N = infinity.

is it then possible to create a mathmatically accurate circle using this formula in jME?

y^2 + x^2 = Radius

because using Derive 5 ( a mathmatical package) this makes a perfect circle, what do you think?

Sure, you can do that, but you’ll have to express it in terms the renderer can understand. That is, a series of points to draw as connected lines. So instead of:

y^2 + x^2 = radius you’ll have to solve for x and y.

x = cos(angle) * radius

y = sin(angle) * radius

angle (0, 360) incrementing by a value, smaller the value the better looking the circle.

so we really can’t make a mathmatically accurate circle, because there is always one more level of accuracy to go down to.

So how does Java2D do it then?

That is perfectly accurate mathematically, in fact, that’s the same way Java2D renders a circle and most likely how Derive 5 does it, after the original equation is translated. A computer cannot render a perfect circle, it’s limited to single pixel accuracy. And a pixel is nothing more than a least length line that a computer can render.

So make the incrementing value small enough and the circle will be as accurate as the computer is capable of displaying.

speaking of circles, if we add a random() thing to every shape, we can, if a circle, make a ring of fire very easily! :smiley:

I’ll make a Circle class as well as Line. That would be cool.

I’ll let you know when it’s usable.

Erm … 0/0 is not “undefined”. Technically it is “indeterminate”.

Oh, and on the topic of circles, I’m working on a little geometry demo using them to make some cool structures. I’m creating a PQ torus to be exact, if that means anything to you. If not, you’ll have to wait and see!

(Oh, and if you do understand what I’m talking about, don’t worry about the demo being a processor hog. There simple ways to accurately - and simply! - solve the partial differential equations of the Frenet Frame.)

Oh yeah, Mr. smarty pants! :stuck_out_tongue:



Although division by zero is not defined for reals

EDIT: I maintain that I was talking solely about real numbers and nothing else. ;)

It would be great to get a Torus as part of the regular geometry. It's so great to test lighting effects, and various special effects. I'd be very interested in using it.

Two can play at the Mathworld game! :stuck_out_tongue:


For example, a limit of the form 0/0 [...] is indeterminate

And I'd also like to use my PQ torus! If only I could get the blasted normals to work! Actually, I'd appreciate any help with this. I can calculate all the vertices just fine, and also the indexes for making a mesh out of them. However, I'm lost when it comes to normals. I know that I have to somehow add the normals for each face the vertex is part of, but all of my implementations don't do much of anything. Help?!

Oh come on, just admit it, you are wrong! :slight_smile:

To get you started, the normal is the cross product of two vertices (counter-clockwise winding for our right handed coordinate system).




normal of:

0 - 2 cross 1

1 - 0 cross 2

2 - 3 cross 1

3 - 1 cross 2

However, since you have a smoothly curved surface you’ll want to average the normals out.

Take a look at the MD2Model class. Md2 doesn’t define the normals, so they are calculated in the class. That might help. If not let me know, and I can help further.

How’s the torus coming? I was thinking about making a utility class Normalizer that would build a list of normals for you.

The pq torus been on temporary hiatus while I’ve been scrabbling to free up some time. I’m a bit stuck, however, as this is my first attempt at really doing anything with jME and I’m not quite sure if I’m doing things correctly. If you’re willing, I’ll post the code for critique. It’s a bit long, however, about 205 lines.

yeah, Eric, post it. Having a torus in the library would be great, because it’s fantastic to testing out texture and lighting effects. I’ll try to help you out with any of the design weirdness that is TriMesh.