[OT]Circle rant

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
LuaWeaver
Party member
Posts: 183
Joined: Wed Mar 02, 2011 11:15 pm
Location: Ohio, USA

[OT]Circle rant

Post by LuaWeaver »

A circle is not techniclly possible... it is just a regular polygon on a 2d plane with points connected by segments. A shape with 1,000,000 sides appears to be a circle, but is not. Same with "circles". The segments are invisible to the human eye. Any thoughts?
"your actions cause me to infer your ego is the size of three houses" -finley
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Denver, CO
Contact:

Re: [OT]Circle rant

Post by TechnoCat »

LuaWeaver wrote:A circle is not techniclly possible... it is just a regular polygon on a 2d plane with points connected by segments. A shape with 1,000,000 sides appears to be a circle, but is not. Same with "circles". The segments are invisible to the human eye. Any thoughts?
r(θ) = 1
User avatar
bmelts
Party member
Posts: 380
Joined: Fri Jan 30, 2009 3:16 am
Location: Wiscönsin
Contact:

Re: [OT]Circle rant

Post by bmelts »

A distinction has to be drawn (heh) between a visual circle and a conceptual circle. Sure, in practice you can't draw an actual circle - if you zoom in far enough you can see that it's actually made up of a whole bunch of tiny tiny segments. But the mathematical equation for a circle exists (TechnoCat posted it) and is completely legitimate. Our ability to render it may be tragically limited by the discrete nature of things, but that doesn't mean a circle is impossible. It just means drawing one is.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: [OT]Circle rant

Post by kikito »

LuaWeaver wrote:A circle is not techniclly possible... it is just a regular polygon on a 2d plane with points connected by segments. A shape with 1,000,000 sides appears to be a circle, but is not. Same with "circles". The segments are invisible to the human eye. Any thoughts?
Where do you draw the line? (pun intended :) ).

Even if the circle was internally represented as a "circle equation" and not as a "polygon", when you draw it on the screen it gets translated into a bunch of pixels. One could say "That is instead not a real circle! It's just a bunch of colored pixels!" :rofl:

One of the first questions I had when I entered these forums was very similar to yours: "How many segments should I use in love.graphics.circle, to make a realistic-looking circle without wasting resources?" . The answer was 3*r, if you are curious.
When I write def I mean function.
User avatar
tentus
Inner party member
Posts: 1060
Joined: Sun Oct 31, 2010 7:56 pm
Location: Appalachia
Contact:

Re: [OT]Circle rant

Post by tentus »

kikito wrote: One could say "That is instead not a real circle! It's just a bunch of colored pixels!" :rofl:
This is not a pipe?
Kurosuke needs beta testers
User avatar
Kadoba
Party member
Posts: 399
Joined: Mon Jan 10, 2011 8:25 am
Location: Oklahoma

Re: [OT]Circle rant

Post by Kadoba »

Lots of things in computers are approximated. Floating point numbers are often inaccurate and random numbers aren't really random. Computing is built on the foundation of "good enough".
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: [OT]Circle rant

Post by Robin »

kikito wrote:One of the first questions I had when I entered these forums was very similar to yours: "How many segments should I use in love.graphics.circle, to make a realistic-looking circle without wasting resources?" . The answer was 3*r, if you are curious.
I tend to use a logarithmic scale for that, which seems to work absolutely fine. On the other hand, that might mean that I draw too many segments for really small circles.
Help us help you: attach a .love.
Post Reply

Who is online

Users browsing this forum: No registered users and 225 guests